Date: Wed, 9 Sep 1998 10:52:52 +0200 (WET) From: Andris Pavenis To: djgpp-workers AT delorie DOT com, dj AT delorie DOT com Subject: Updated diffs for compiling DJLSR-980907 with EGCS-1.1 Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk Hi! Thanks for pointing to macro unconst(). I'm sending modified patch for library to get it built without warnings in that part where compiler option -Werror is being used. After applying these patches there were no problems to do native build of DJLSR with egcs-1.1. I didn't include changes from previous patch I sent that are already included in last alpha. Andris -------------------------------------------------------------------- *** src/libc/dos/process/spawnl.c~ Wed Jan 11 02:45:08 1995 --- src/libc/dos/process/spawnl.c Tue Sep 8 13:29:06 1998 *************** *** 1,10 **** /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ #include #include extern char **environ; int spawnl(int mode, const char *path, const char *argv0, ...) { ! return spawnve(mode, path, (char * const *)&argv0, environ); } --- 1,11 ---- /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ #include + #include #include extern char **environ; int spawnl(int mode, const char *path, const char *argv0, ...) { ! return spawnve(mode, path, unconst(&argv0,char * const *), environ); } *** src/libc/dos/process/spawnle.c~ Mon Dec 26 14:35:20 1994 --- src/libc/dos/process/spawnle.c Tue Sep 8 13:31:42 1998 *************** *** 1,10 **** /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ #include #include #include int spawnle(int mode, const char *path, const char *argv0, ... /*, const char **envp */) { scan_ptr(); ! return spawnve(mode, path, (char * const *)&argv0, (char * const *)ptr); } --- 1,12 ---- /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ #include + #include #include #include int spawnle(int mode, const char *path, const char *argv0, ... /*, const char **envp */) { scan_ptr(); ! return spawnve(mode, path, unconst(&argv0,char * const *), ! unconst(ptr,char * const *)); } *** src/libc/dos/process/spawnlp.c~ Wed Jan 11 02:45:08 1995 --- src/libc/dos/process/spawnlp.c Tue Sep 8 13:32:44 1998 *************** *** 1,10 **** /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ #include #include extern char **environ; int spawnlp(int mode, const char *path, const char *argv0, ...) { ! return spawnvpe(mode, path, (char * const *)&argv0, (char * const *)environ); } --- 1,12 ---- /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ #include + #include #include extern char **environ; int spawnlp(int mode, const char *path, const char *argv0, ...) { ! return spawnvpe(mode, path, unconst(&argv0,char * const *), ! (char * const *)environ); } *** src/libc/dos/process/spawnlpe.c~ Mon Dec 26 14:35:20 1994 --- src/libc/dos/process/spawnlpe.c Tue Sep 8 13:33:54 1998 *************** *** 1,10 **** /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ #include #include #include int spawnlpe(int mode, const char *path, const char *argv0, ... /*, const char **envp */) { scan_ptr(); ! return spawnvpe(mode, path, (char * const *)&argv0, (char * const *)ptr); } --- 1,12 ---- /* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */ #include + #include #include #include int spawnlpe(int mode, const char *path, const char *argv0, ... /*, const char **envp */) { scan_ptr(); ! return spawnvpe(mode, path, unconst(&argv0,char * const *), ! unconst(ptr,char * const *)); } *** src/libc/pc_hw/co80/conio.c~ Sat Jul 25 19:01:44 1998 --- src/libc/pc_hw/co80/conio.c Tue Sep 8 13:51:32 1998 *************** *** 13,18 **** --- 13,19 ---- #include #include #include + #include int _wscroll = 1; *************** *** 705,711 **** cscanf(const char *fmt, ...) { return(_doscan_low(NULL, _scan_getche, _scan_ungetch, ! fmt, (void **)((&fmt)+1))); } int --- 706,712 ---- cscanf(const char *fmt, ...) { return(_doscan_low(NULL, _scan_getche, _scan_ungetch, ! fmt, (void **) unconst( ((&fmt)+1), char ** ))); } int *** src/libc/posix/glob/glob.c~ Sun Jul 12 19:11:04 1998 --- src/libc/posix/glob/glob.c Tue Sep 8 13:53:50 1998 *************** *** 337,343 **** static int str_compare(const void *va, const void *vb) { ! return strcmp(*(char * const *)va, *(char * const *)vb); } int --- 337,343 ---- static int str_compare(const void *va, const void *vb) { ! return strcmp(*(const char * const *)va, *(const char * const *)vb); } int *** src/libc/posix/unistd/execlpe.c~ Mon Dec 26 15:35:00 1994 --- src/libc/posix/unistd/execlpe.c Tue Sep 8 13:57:52 1998 *************** *** 3,11 **** #include #include #include int execlpe(const char *path, const char *argv0, ... /*, const char **envp */) { scan_ptr(); ! return spawnvpe(P_OVERLAY, path, (char * const *)&argv0, (char * const *)ptr); } --- 3,13 ---- #include #include #include + #include int execlpe(const char *path, const char *argv0, ... /*, const char **envp */) { scan_ptr(); ! return spawnvpe(P_OVERLAY, path, unconst(&argv0,char * const *), ! unconst(ptr,char * const *)); } *** src/libc/posix/unistd/execlp.c~ Sun Oct 8 21:21:00 1995 --- src/libc/posix/unistd/execlp.c Tue Sep 8 13:57:04 1998 *************** *** 3,12 **** #include #include #include extern char * const *environ; int execlp(const char *path, const char *argv0, ...) { ! return spawnvpe(P_OVERLAY, path, (char * const *)&argv0, environ); } --- 3,13 ---- #include #include #include + #include extern char * const *environ; int execlp(const char *path, const char *argv0, ...) { ! return spawnvpe(P_OVERLAY, path, unconst(&argv0,char * const *), environ); } *** src/libc/posix/unistd/execle.c~ Mon Dec 26 15:35:00 1994 --- src/libc/posix/unistd/execle.c Tue Sep 8 13:56:22 1998 *************** *** 3,11 **** #include #include #include int execle(const char *path, const char *argv0, ... /*, const char **envp */) { scan_ptr(); ! return spawnve(P_OVERLAY, path, (char *const *)&argv0, (char *const *)ptr); } --- 3,13 ---- #include #include #include + #include int execle(const char *path, const char *argv0, ... /*, const char **envp */) { scan_ptr(); ! return spawnve(P_OVERLAY, path, unconst(&argv0,char *const *), ! unconst(ptr,char *const *)); } *** src/libc/posix/unistd/execl.c~ Sun Oct 8 21:21:00 1995 --- src/libc/posix/unistd/execl.c Tue Sep 8 13:55:26 1998 *************** *** 2,11 **** #include #include #include extern char *const *environ; int execl(const char *path, const char *argv0, ...) { ! return spawnve(P_OVERLAY, path, (char *const*)&argv0, environ); } --- 2,12 ---- #include #include #include + #include extern char *const *environ; int execl(const char *path, const char *argv0, ...) { ! return spawnve(P_OVERLAY, path, unconst(&argv0,char *const*), environ); }