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
# define UNLOCK
#endif
-#ifndef NULL
-# define NULL 0
-#endif
-
static int
unsetenv (const char *name)
{
# include <config.h>
#endif
-#include <stdio.h>
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
+#include "readtokens.h"
-#if defined (STDC_HEADERS) || defined(HAVE_STRING_H)
-# include <string.h>
-/* An ANSI string.h and pre-ANSI memory.h might conflict. */
-# if !defined (STDC_HEADERS) && defined (HAVE_MEMORY_H)
-# include <memory.h>
-# endif /* not STDC_HEADERS and HAVE_MEMORY_H */
-#else /* not STDC_HEADERS and not HAVE_STRING_H */
-# include <strings.h>
-/* memory.h and strings.h conflict on some systems. */
-#endif /* not STDC_HEADERS and not HAVE_STRING_H */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
-#include "readtokens.h"
#include "unlocked-io.h"
#include "xalloc.h"
/* Initialize a tokenbuffer. */
void
-init_tokenbuffer (tokenbuffer)
- token_buffer *tokenbuffer;
+init_tokenbuffer (token_buffer *tokenbuffer)
{
tokenbuffer->size = INITIAL_TOKEN_LENGTH;
tokenbuffer->buffer = xmalloc (INITIAL_TOKEN_LENGTH);
-# putenv.m4 serial 6
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# putenv.m4 serial 7
+dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
# Prerequisites of lib/putenv.c.
AC_DEFUN([gl_PREREQ_PUTENV], [
- AC_CHECK_HEADERS_ONCE(string.h unistd.h)
- AC_CHECK_FUNCS_ONCE(memcpy)
- AC_CHECK_FUNCS(strchr)
+ AC_CHECK_HEADERS_ONCE(unistd.h)
])
-# readtokens.m4 serial 1
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# readtokens.m4 serial 2
+dnl Copyright (C) 2002, 2003 Free Software Foundation, Inc.
dnl This file is free software, distributed under the terms of the GNU
dnl General Public License. As a special exception to the GNU General
dnl Public License, this file may be distributed as part of a program
AC_DEFUN([gl_READTOKENS],
[
dnl Prerequisites of lib/readtokens.c.
- AC_REQUIRE([AC_HEADER_STDC])
- AC_CHECK_HEADERS_ONCE(memory.h string.h)
+ :
])