summaryrefslogtreecommitdiff
path: root/libiberty/putenv.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1999-05-28 07:34:48 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1999-05-28 07:34:48 +0000
commitfee9125c1006868fd3f4598dc70156e09b9a8a18 (patch)
treec4fecfe358ac386bb87127e046400b8dce0889b6 /libiberty/putenv.c
parent77b7d851874ee93b522a27847b393856b7e9cd6c (diff)
downloadgcc-fee9125c1006868fd3f4598dc70156e09b9a8a18.tar.gz
putenv.c: Include ansidecl.h to define `const'.
* putenv.c: Include ansidecl.h to define `const'. * setenv.c: Likewise. From-SVN: r27221
Diffstat (limited to 'libiberty/putenv.c')
-rw-r--r--libiberty/putenv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libiberty/putenv.c b/libiberty/putenv.c
index 1860676c5c5..9d5692222cf 100644
--- a/libiberty/putenv.c
+++ b/libiberty/putenv.c
@@ -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);