This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch checked in to libiberty {setenv.c,putenv.c} for K&R compilers
- To: egcs-patches at egcs dot cygnus dot com
- Subject: Patch checked in to libiberty {setenv.c,putenv.c} for K&R compilers
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Date: Fri, 28 May 1999 10:38:36 -0400 (EDT)
I checked in the following in order to bootstrap on SunOS4.
--Kaveh
Index: ChangeLog
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/libiberty/ChangeLog,v
retrieving revision 1.110
diff -u -p -r1.110 ChangeLog
--- ChangeLog 1999/05/26 11:35:41 1.110
+++ ChangeLog 1999/05/28 14:33:18
@@ -1,3 +1,8 @@
+1999-05-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * putenv.c: Include ansidecl.h to define `const'.
+ * setenv.c: Likewise.
+
Wed May 26 03:58:20 1999 "Melissa O'Neill" <oneill@cs.sfu.ca>
* Makefile.in (CFILES): Add putenv.c and setenv.c.
Index: putenv.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/libiberty/putenv.c,v
retrieving revision 1.1
diff -u -p -r1.1 putenv.c
--- putenv.c 1999/05/26 03:12:22 1.1
+++ putenv.c 1999/05/28 14:33:18
@@ -24,6 +24,8 @@
# include <config.h>
#endif
+#include "ansidecl.h"
+
#if HAVE_STDLIB_H
# include <stdlib.h>
#endif
@@ -55,7 +57,7 @@ putenv (string)
if (name_end)
{
- char *name = alloca (name_end - string + 1);
+ char *name = (char *) alloca (name_end - string + 1);
memcpy (name, string, name_end - string);
name[name_end - string] = '\0';
return setenv (name, name_end + 1, 1);
Index: setenv.c
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/libiberty/setenv.c,v
retrieving revision 1.1
diff -u -p -r1.1 setenv.c
--- setenv.c 1999/05/26 03:12:22 1.1
+++ setenv.c 1999/05/28 14:33:18
@@ -20,6 +20,8 @@
# include <config.h>
#endif
+#include "ansidecl.h"
+
#include <errno.h>
#if !defined(errno) && !defined(HAVE_ERRNO_DECL)
extern int errno;