bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-gnulib] backupfile patch to assume C89 or better


From: Paul Eggert
Subject: [Bug-gnulib] backupfile patch to assume C89 or better
Date: 08 Sep 2003 15:55:21 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

I installed this:

2003-09-08  Paul Eggert  <address@hidden>

        * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
        Don't declare getenv or malloc.
        * lib/addext.c: Include <string.h> unconditionally.
        * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
        string.h, getenv, malloc.

Index: lib/backupfile.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/backupfile.c,v
retrieving revision 1.40
diff -p -u -r1.40 backupfile.c
--- lib/backupfile.c    18 Jun 2003 05:52:19 -0000      1.40
+++ lib/backupfile.c    8 Sep 2003 22:48:30 -0000
@@ -27,11 +27,7 @@
 
 #include <stddef.h>
 #include <stdio.h>
-#if HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
+#include <string.h>
 
 #if HAVE_DIRENT_H
 # include <dirent.h>
@@ -57,23 +53,7 @@
 # define CLOSEDIR(d) closedir (d)
 #endif
 
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-
-#ifndef HAVE_DECL_GETENV
-"this configure-time declaration test was not run"
-#endif
-#if !HAVE_DECL_GETENV
-char *getenv ();
-#endif
-
-#ifndef HAVE_DECL_MALLOC
-"this configure-time declaration test was not run"
-#endif
-#if !HAVE_DECL_MALLOC
-char *malloc ();
-#endif
+#include <stdlib.h>
 
 #if HAVE_DIRENT_H || HAVE_NDIR_H || HAVE_SYS_DIR_H || HAVE_SYS_NDIR_H
 # define HAVE_DIR 1
Index: lib/addext.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/addext.c,v
retrieving revision 1.11
diff -p -u -r1.11 addext.c
--- lib/addext.c        4 Jun 2003 19:22:29 -0000       1.11
+++ lib/addext.c        8 Sep 2003 22:48:30 -0000
@@ -37,11 +37,7 @@
 #endif
 
 #include <stddef.h>
-#if HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
+#include <string.h>
 
 #if HAVE_UNISTD_H
 # include <unistd.h>
Index: m4/backupfile.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/backupfile.m4,v
retrieving revision 1.2
diff -p -u -r1.2 backupfile.m4
--- m4/backupfile.m4    29 May 2003 07:21:59 -0000      1.2
+++ m4/backupfile.m4    8 Sep 2003 22:48:30 -0000
@@ -1,4 +1,4 @@
-# backupfile.m4 serial 2
+# backupfile.m4 serial 3
 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
@@ -11,13 +11,11 @@ AC_DEFUN([gl_BACKUPFILE],
   dnl Prerequisites of lib/backupfile.c.
   AC_REQUIRE([AC_HEADER_DIRENT])
   AC_REQUIRE([AC_FUNC_CLOSEDIR_VOID])
-  AC_CHECK_HEADERS_ONCE(stdlib.h string.h)
-  AC_CHECK_DECLS_ONCE(getenv malloc)
   jm_CHECK_TYPE_STRUCT_DIRENT_D_INO
 
   dnl Prerequisites of lib/addext.c.
   AC_REQUIRE([jm_AC_DOS])
-  AC_SYS_LONG_FILE_NAMES
-  AC_CHECK_HEADERS_ONCE(string.h unistd.h)
+  AC_REQUIRE([AC_SYS_LONG_FILE_NAMES])
+  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_CHECK_FUNCS(pathconf)
 ])




reply via email to

[Prev in Thread] Current Thread [Next in Thread]