Assume ANSI C <string.h>, <stdlib.h>.
authorBruno Haible <bruno@clisp.org>
Wed, 10 Sep 2003 14:16:32 +0000 (14:16 +0000)
committerBruno Haible <bruno@clisp.org>
Wed, 10 Sep 2003 14:16:32 +0000 (14:16 +0000)
lib/ChangeLog
lib/setenv.c
lib/unsetenv.c
m4/ChangeLog
m4/setenv.m4

index 4214f47c7c3abe86e02ca047f8d79b3501939f3a..f5542b41bbcae9a1ed0b8db82b3264379bd58b6a 100644 (file)
@@ -1,3 +1,12 @@
+2003-09-10  Bruno Haible  <bruno@clisp.org>
+
+       * strcspn.c: Include <string.h> unconditionally.
+       * strpbrk.c: Include <string.h> unconditionally.
+       * strstr.c: Include <string.h> unconditionally.
+       * unicodeio.c: Include <string.h> unconditionally.
+       * setenv.c: Include <stdlib.h> and <string.h> unconditionally.
+       * unsetenv.c: Likewise.
+
 2003-09-10  Jim Meyering  <jim@meyering.net>
 
        * error.c: Correct indentation of cpp directives.
index 04073caa0391ef40020604c3c3ec2a19212c28a6..0a28cb9fbf4870bc3db2d31db8462499d9168d05 100644 (file)
@@ -28,12 +28,8 @@ extern int errno;
 # define __set_errno(ev) ((errno) = (ev))
 #endif
 
-#if _LIBC || HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-#if _LIBC || HAVE_STRING_H
-# include <string.h>
-#endif
+#include <stdlib.h>
+#include <string.h>
 #if _LIBC || HAVE_UNISTD_H
 # include <unistd.h>
 #endif
index 5568919c042ccdc1be6a1dde35e496ba0f5a37eb..b7a38ad0fedd0d80729088111fedc38709b07925 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992,1995-1999,2000-2002 Free Software Foundation, Inc.
+/* Copyright (C) 1992,1995-1999,2000-2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    This program is free software; you can redistribute it and/or modify
@@ -27,12 +27,8 @@ extern int errno;
 # define __set_errno(ev) ((errno) = (ev))
 #endif
 
-#if _LIBC || HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-#if _LIBC || HAVE_STRING_H
-# include <string.h>
-#endif
+#include <stdlib.h>
+#include <string.h>
 #if _LIBC || HAVE_UNISTD_H
 # include <unistd.h>
 #endif
index 70ff21f2081b83cf88edb18509025b1af6101cfb..0cd96979b89ea4de2836023f7bbd4daa74d973bc 100644 (file)
@@ -1,3 +1,12 @@
+2003-09-10  Bruno Haible  <bruno@clisp.org>
+
+       * strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
+       * strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
+       * strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
+       * unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
+       * setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
+       <stdlib.h> and <string.h> checks.
+
 2003-09-09  Paul Eggert  <eggert@twinsun.com>
 
        * getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
index af621ec53ea549b6c0fd6428b7598bb2c7a319e0..3b19a2943a854571590208edc09d0a3ad3be9be3 100644 (file)
@@ -1,5 +1,5 @@
-# setenv.m4 serial 3
-dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
+# setenv.m4 serial 4
+dnl Copyright (C) 2001-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
@@ -40,7 +40,7 @@ AC_DEFUN([gt_CHECK_VAR_DECL],
 AC_DEFUN([gl_PREREQ_SETENV],
 [
   AC_REQUIRE([AC_FUNC_ALLOCA])
-  AC_CHECK_HEADERS_ONCE(stdlib.h string.h unistd.h)
+  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_CHECK_HEADERS(search.h)
   AC_CHECK_FUNCS(tsearch)
   gt_CHECK_VAR_DECL([#include <errno.h>], errno)
@@ -50,7 +50,7 @@ AC_DEFUN([gl_PREREQ_SETENV],
 # Prerequisites of lib/unsetenv.c.
 AC_DEFUN([gl_PREREQ_UNSETENV],
 [
-  AC_CHECK_HEADERS_ONCE(stdlib.h string.h unistd.h)
+  AC_CHECK_HEADERS_ONCE(unistd.h)
   gt_CHECK_VAR_DECL([#include <errno.h>], errno)
   gt_CHECK_VAR_DECL([#include <unistd.h>], environ)
 ])