delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/09/09/04:00:00

Date: Wed, 9 Sep 1998 10:52:52 +0200 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
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: <Pine.A32.3.91.980909104529.11976A-100000@ieva05.lanet.lv>
MIME-Version: 1.0

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 <libc/stubs.h>
  #include <process.h>
  
  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 <libc/stubs.h>
+ #include <libc/unconst.h>
  #include <process.h>
  
  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 <libc/stubs.h>
  #include <process.h>
  #include <libc/dosexec.h>
  
  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 <libc/stubs.h>
+ #include <libc/unconst.h>
  #include <process.h>
  #include <libc/dosexec.h>
  
  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 <libc/stubs.h>
  #include <process.h>
  
  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 <libc/stubs.h>
+ #include <libc/unconst.h>
  #include <process.h>
  
  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 <libc/stubs.h>
  #include <process.h>
  #include <libc/dosexec.h>
  
  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 <libc/stubs.h>
+ #include <libc/unconst.h>
  #include <process.h>
  #include <libc/dosexec.h>
  
  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 <libc/farptrgs.h>
  #include <conio.h>
  #include <libc/bss.h>
+ #include <libc/unconst.h>
  
  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 <unistd.h>
  #include <process.h>
  #include <libc/dosexec.h>
  
  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 <unistd.h>
  #include <process.h>
  #include <libc/dosexec.h>
+ #include <libc/unconst.h>
  
  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 <unistd.h>
  #include <process.h>
  #include <libc/dosexec.h>
  
  extern char * const *environ;
  
  int execlp(const char *path, const char *argv0, ...)
  {
!   return spawnvpe(P_OVERLAY, path, (char * const *)&argv0, environ);
  }
--- 3,13 ----
  #include <unistd.h>
  #include <process.h>
  #include <libc/dosexec.h>
+ #include <libc/unconst.h>
  
  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 <unistd.h>
  #include <process.h>
  #include <libc/dosexec.h>
  
  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 <unistd.h>
  #include <process.h>
  #include <libc/dosexec.h>
+ #include <libc/unconst.h>
  
  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 <libc/stubs.h>
  #include <unistd.h>
  #include <process.h>
  
  extern char *const *environ;
  
  int execl(const char *path, const char *argv0, ...)
  {
!   return spawnve(P_OVERLAY, path, (char *const*)&argv0, environ);
  }
--- 2,12 ----
  #include <libc/stubs.h>
  #include <unistd.h>
  #include <process.h>
+ #include <libc/unconst.h>
  
  extern char *const *environ;
  
  int execl(const char *path, const char *argv0, ...)
  {
!   return spawnve(P_OVERLAY, path, unconst(&argv0,char *const*), environ);
  }

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019