diff options
author | Jim Meyering <jim@meyering.net> | 2003-09-10 09:07:43 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-09-10 09:07:43 +0000 |
commit | 548b033dd6a3698befd21e5d928e4129a8538688 (patch) | |
tree | e1c56897ef37bd3ca914908549b16e505ec49667 /lib/putenv.c | |
parent | c69779b7bc0931a935efc3f9f8e39826ccbf9440 (diff) | |
download | coreutils-548b033dd6a3698befd21e5d928e4129a8538688.tar.xz |
(malloc): Returns void *, not char *.
Include <string.h> unconditionally.
(strchr, memcpy, NULL): Do not define.
Diffstat (limited to 'lib/putenv.c')
-rw-r--r-- | lib/putenv.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/lib/putenv.c b/lib/putenv.c index f5ce1dd88..87c552281 100644 --- a/lib/putenv.c +++ b/lib/putenv.c @@ -37,23 +37,15 @@ extern int errno; with a non-const argument. That would conflict with the declaration of rpl_putenv below (due to the #define putenv rpl_putenv from config.h). */ -char *malloc (); +void *malloc (); void free (); -#if defined (__GNU_LIBRARY__) || defined (HAVE_STRING_H) -# include <string.h> -#endif +#include <string.h> + #if defined (__GNU_LIBRARY__) || defined (HAVE_UNISTD_H) # include <unistd.h> #endif -#if !defined (__GNU_LIBRARY__) && !defined (HAVE_STRCHR) -# define strchr index -#endif -#if !defined (__GNU_LIBRARY__) && !defined (HAVE_MEMCPY) -# define memcpy(d,s,n) bcopy ((s), (d), (n)) -#endif - #if HAVE_GNU_LD # define environ __environ #else @@ -71,10 +63,6 @@ __libc_lock_define_initialized (static, envlock) # define UNLOCK #endif -#ifndef NULL -# define NULL 0 -#endif - static int unsetenv (const char *name) { |