mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-08-17 09:06:50 +02:00
(malloc): Returns void *, not char *.
Include <string.h> unconditionally. (strchr, memcpy, NULL): Do not define.
This commit is contained in:
+3
-15
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user