bug-gnulib
[Top][All Lists]
Advanced

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

[Bug-gnulib] makepatch patch to assume C89 or later


From: Paul Eggert
Subject: [Bug-gnulib] makepatch patch to assume C89 or later
Date: 09 Sep 2003 13:14:42 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

I installed this:

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

        * lib/makepath.c: Include makepath.h first, to test interface.
        Include <stdlib.h> and <string.h> unconditionally.
        * m4/mkpath.m4 (gl_MAKEPATH): Do not check for string.h or standard
        C headers.

Index: lib/makepath.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/makepath.c,v
retrieving revision 1.57
diff -p -u -r1.57 makepath.c
--- lib/makepath.c      14 Aug 2003 23:07:29 -0000      1.57
+++ lib/makepath.c      9 Sep 2003 20:09:03 -0000
@@ -23,6 +23,8 @@
 # include <config.h>
 #endif
 
+#include "makepath.h"
+
 #include <alloca.h>
 
 #include <stdio.h>
@@ -44,9 +46,7 @@
 # define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
 #endif
 
-#if STDC_HEADERS
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
 
 #include <errno.h>
 
@@ -54,14 +54,7 @@
 extern int errno;
 #endif
 
-#if HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-# ifndef strchr
-#  define strchr index
-# endif
-#endif
+#include <string.h>
 
 #ifndef S_ISUID
 # define S_ISUID 04000
@@ -87,8 +80,6 @@ extern int errno;
 #endif
 
 #define WX_USR (S_IWUSR | S_IXUSR)
-
-#include "makepath.h"
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
Index: m4/makepath.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/makepath.m4,v
retrieving revision 1.1
diff -p -u -r1.1 makepath.m4
--- m4/makepath.m4      31 Dec 2002 13:42:07 -0000      1.1
+++ m4/makepath.m4      9 Sep 2003 20:09:03 -0000
@@ -1,5 +1,5 @@
-# makepath.m4 serial 1
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# makepath.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
@@ -10,8 +10,7 @@ AC_DEFUN([gl_MAKEPATH],
 [
   dnl Prerequisites of lib/makepath.c.
   AC_REQUIRE([AC_FUNC_ALLOCA])
-  AC_REQUIRE([AC_HEADER_STDC])
-  AC_CHECK_HEADERS_ONCE(string.h unistd.h)
+  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_REQUIRE([AC_HEADER_STAT])
   AC_REQUIRE([jm_AFS])
 ])




reply via email to

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