Author: yamakenz
Date: Mon Aug 13 00:43:01 2007
New Revision: 4840
Modified:
trunk/doc/COMPATIBILITY
trunk/uim/mana.c
trunk/uim/prime.c
trunk/uim/uim-helper-client.c
trunk/uim/uim-ipc.c
trunk/uim/uim-util.h
Log:
* uim/uim-util.h
- (uim_ipc_open_command, uim_ipc_open_command_with_option,
uim_ipc_send_command): Fix invalid type int for PIDs with
pid_t. 64-bit systems are possibly (sizeof(int) < sizeof(pid_t))
* uim/uim-ipc.c
- (uim_ipc_open_command, uim_ipc_open_command_with_option,
uim_ipc_send_command): Ditto
* uim/uim-helper-client.c
- (uim_helper_init_client_fd): Ditto
* uim/prime.c
- (prime_pid): Ditto
* uim/mana.c
- (mana_pid, mana_ipc_send_command): Ditto
* doc/COMPATIBILITY
- Add new section "Fix invalid type assumption on PIDs"
Modified: trunk/doc/COMPATIBILITY
==============================================================================
--- trunk/doc/COMPATIBILITY (original)
+++ trunk/doc/COMPATIBILITY Mon Aug 13 00:43:01 2007
@@ -57,6 +57,23 @@
The changes are described below in most recently updated order.
------------------------------------------------------------------------------
+Summary: Fix invalid type assumption on PIDs
+Affects: IM developers, uim developers
+Updates: C API
+Version: 1.5.0
+Revision: ac4840
+Date: 2007-08-13
+Modifier: YamaKen
+Related:
+URL:
+Changes:
+ (changed) uim_ipc_open_command()
+ (changed) uim_ipc_open_command_with_option()
+ (changed) uim_ipc_send_command()
+Description:
+ Fixed invalid type int for PIDs with pid_t. 64-bit systems are
+ possibly (sizeof(int) < sizeof(pid_t))
+------------------------------------------------------------------------------
Summary: Bit width extension of uim_scm_c_bool() and uim_scm_make_bool()
Affects: uim developers
Updates: C API
Modified: trunk/uim/mana.c
==============================================================================
--- trunk/uim/mana.c (original)
+++ trunk/uim/mana.c Mon Aug 13 00:43:01 2007
@@ -54,9 +54,11 @@
static FILE *mana_r;
static FILE *mana_w;
-static int mana_pid;
+static pid_t mana_pid;
-static char *mana_ipc_send_command(int *pid, FILE **read_fp, FILE **write_fp,
const char *str);
+static char *mana_ipc_send_command(pid_t *pid,
+ FILE **read_fp, FILE **write_fp,
+ const char *str);
static uim_lisp mana_init(void);
static uim_lisp mana_eval(uim_lisp buf_);
static uim_lisp eucjp_string_length(uim_lisp str_);
@@ -66,9 +68,9 @@
#endif
static char *
-mana_ipc_send_command(int *pid,
- FILE **read_fp, FILE **write_fp,
- const char *str)
+mana_ipc_send_command(pid_t *pid,
+ FILE **read_fp, FILE **write_fp,
+ const char *str)
{
char *tmp = strdup("");
char buf[8192];
Modified: trunk/uim/prime.c
==============================================================================
--- trunk/uim/prime.c (original)
+++ trunk/uim/prime.c Mon Aug 13 00:43:01 2007
@@ -56,7 +56,7 @@
#define BUFFER_SIZE (4 * 1024)
static FILE *primer, *primew;
-static int prime_pid = 0;
+static pid_t prime_pid = 0;
static char *prime_command = "prime";
Modified: trunk/uim/uim-helper-client.c
==============================================================================
--- trunk/uim/uim-helper-client.c (original)
+++ trunk/uim/uim-helper-client.c Mon Aug 13 00:43:01 2007
@@ -106,7 +106,7 @@
if (connect(fd, (struct sockaddr *)&server,sizeof(server)) < 0) {
- int serv_pid = 0;
+ pid_t serv_pid = 0;
char buf[128];
serv_pid = uim_ipc_open_command(serv_pid, &serv_r, &serv_w,
Modified: trunk/uim/uim-ipc.c
==============================================================================
--- trunk/uim/uim-ipc.c (original)
+++ trunk/uim/uim-ipc.c Mon Aug 13 00:43:01 2007
@@ -141,11 +141,13 @@
return (pid_t) -1;
}
-int
-uim_ipc_open_command_with_option(int old_pid, FILE **read_fp,
- FILE **write_fp, const char *command, const char *option)
+pid_t
+uim_ipc_open_command_with_option(pid_t old_pid,
+ FILE **read_fp, FILE **write_fp,
+ const char *command, const char *option)
{
- int new_pid, result;
+ int result;
+ pid_t new_pid;
char **ap, *argv[10];
char *str = NULL, *p;
@@ -230,15 +232,16 @@
return new_pid;
}
-int
-uim_ipc_open_command(int old_pid, FILE **read_fp,
- FILE **write_fp, const char *command)
+pid_t
+uim_ipc_open_command(pid_t old_pid,
+ FILE **read_fp, FILE **write_fp, const char *command)
{
- return uim_ipc_open_command_with_option(old_pid, read_fp, write_fp, command,
NULL);
+ return uim_ipc_open_command_with_option(old_pid,
+ read_fp, write_fp, command, NULL);
}
char *
-uim_ipc_send_command(int *pid,
+uim_ipc_send_command(pid_t *pid,
FILE **read_fp, FILE **write_fp,
const char *command, const char *str)
{
Modified: trunk/uim/uim-util.h
==============================================================================
--- trunk/uim/uim-util.h (original)
+++ trunk/uim/uim-util.h Mon Aug 13 00:43:01 2007
@@ -68,13 +68,17 @@
/* command execution in pipe-connected subprocess (like popen(3))*/
-int
-uim_ipc_open_command(int old_pid, FILE **read_handler, FILE **write_handler,
const char *command);
-int
-uim_ipc_open_command_with_option(int old_pid, FILE **read_handler, FILE
**write_handler, const char *command, const char *option);
-char *
-uim_ipc_send_command(int *pid, FILE **read_handler,
- FILE **write_handler, const char *command, const char
*str);
+pid_t uim_ipc_open_command(pid_t old_pid,
+ FILE **read_handler, FILE **write_handler,
+ const char *command);
+pid_t uim_ipc_open_command_with_option(pid_t old_pid,
+ FILE **read_handler,
+ FILE **write_handler,
+ const char *command,
+ const char *option);
+char *uim_ipc_send_command(pid_t *pid,
+ FILE **read_handler, FILE **write_handler,
+ const char *command, const char *str);
/* an uim_code_converter implementation using iconv */
extern struct uim_code_converter *uim_iconv;