--- p/units/pipesc.c.orig Mon Oct 25 19:45:12 2004 +++ p/units/pipesc.c Fri Dec 17 02:16:24 2004 @@ -34,6 +34,12 @@ #define GLOBAL(decl) decl; decl +#ifdef __MINGW32__ +#define SPAWN_ARG_CONST const +#else +#define SPAWN_ARG_CONST +#endif + /* Keep this consistent with the one in pipes.pas */ #if !(defined (MSDOS) || defined (__MINGW32__)) @@ -115,7 +121,7 @@ #include #include -GLOBAL (int _p_CPipe (char *path, char *argv[], char *envp[], char *name_stdin, char *name_stdout, char *name_stderr, void (*ChildProc) ())) +GLOBAL (int _p_CPipe (char *path, SPAWN_ARG_CONST char *argv[], SPAWN_ARG_CONST char *envp[], char *name_stdin, char *name_stdout, char *name_stderr, void (*ChildProc) ())) { int executable = *path && !access (path, X_OK), save_stdin = -1, save_stdout = -1, save_stderr = -1, h, r; if (*path && !executable) @@ -417,8 +423,8 @@ /* This is a kludge to get around the Microsoft C spawn functions' propensity to remove the outermost set of double quotes from all arguments. */ -static char * const *fix_argv (char **argvec); -static char * const * +static SPAWN_ARG_CONST char * const *fix_argv (char **argvec); +static SPAWN_ARG_CONST char * const * fix_argv (argvec) char **argvec; { @@ -448,7 +454,7 @@ argvec[i] = temp; } - return (char * const *) argvec; + return (SPAWN_ARG_CONST char * const *) argvec; } #endif /* ! defined (__CYGWIN__) */