diff --git a/ChangeLog b/ChangeLog index f2c0b1fefa..0ee65131bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Sep 12 20:32:00 2005 Hirokazu Yamamoto + + * win32/win32.[hc] (rb_w32_argv_size, ...): reverted my latest change + to avoid incompatible pointer warning. (mingw32) + Mon Sep 12 19:58:53 2005 Hirokazu Yamamoto * dln.c: avoid warning of const to non-const convertion. diff --git a/win32/win32.c b/win32/win32.c index 784d585e14..53939d4ec9 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -618,9 +618,10 @@ rb_w32_get_osfhandle(int fh) } int -rb_w32_argv_size(const char *const *argv) +rb_w32_argv_size(char *const *argv) { - const char *p, *const *t; + const char *p; + char *const *t; int len, n, bs, quote; for (t = argv, len = 0; *t; t++) { @@ -648,10 +649,10 @@ rb_w32_argv_size(const char *const *argv) } char * -rb_w32_join_argv(char *cmd, const char *const *argv) +rb_w32_join_argv(char *cmd, char *const *argv) { - const char *p, *s, *const *t; - char *q; + const char *p, *s; + char *q, *const *t; int n, bs, quote; for (t = argv, q = cmd; p = *t; t++) { @@ -846,7 +847,7 @@ rb_w32_spawn(int mode, const char *cmd, const char *prog) } int -rb_w32_aspawn(int mode, const char *prog, const char *const *argv) +rb_w32_aspawn(int mode, const char *prog, char *const *argv) { int len = rb_w32_argv_size(argv); char *cmd = ALLOCA_N(char, len); diff --git a/win32/win32.h b/win32/win32.h index e6bb50ca8a..bbc855e13f 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -187,10 +187,10 @@ extern int chown(const char *, int, int); extern int link(const char *, const char *); extern int gettimeofday(struct timeval *, struct timezone *); extern rb_pid_t waitpid (rb_pid_t, int *, int); -extern int rb_w32_argv_size(const char *const *); -extern char *rb_w32_join_argv(char *, const char *const *); -extern int rb_w32_spawn(int, const char *, const char *); -extern int rb_w32_aspawn(int, const char *, const char *const *); +extern int rb_w32_argv_size(char *const *); +extern char *rb_w32_join_argv(char *, char *const *); +extern int rb_w32_spawn(int, const char *, const char*); +extern int rb_w32_aspawn(int, const char *, char *const *); extern int kill(int, int); extern int fcntl(int, int, ...); extern rb_pid_t rb_w32_getpid(void);