bug-gnulib
[Top][All Lists]
Advanced

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

[Bug-gnulib] save-cwd, xgetcwd patches to assume C89 or better


From: Paul Eggert
Subject: [Bug-gnulib] save-cwd, xgetcwd patches to assume C89 or better
Date: 09 Sep 2003 23:55:38 -0700
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

I installed this:

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

        * save-cwd.c: Include <stdlib.h> unconditionally.
        * xgetcwd.c: Likewise.
        * getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
        * save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
        * savedir.m4 (gl_SAVEDIR): Likewise.

Index: lib/save-cwd.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/save-cwd.c,v
retrieving revision 1.14
diff -p -u -r1.14 save-cwd.c
--- lib/save-cwd.c      22 Jul 2003 22:56:34 -0000      1.14
+++ lib/save-cwd.c      10 Sep 2003 06:49:43 -0000
@@ -22,10 +22,7 @@
 #endif
 
 #include <stdio.h>
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#endif
+#include <stdlib.h>
 
 #if HAVE_UNISTD_H
 # include <unistd.h>
Index: lib/xgetcwd.c
===================================================================
RCS file: /cvsroot/gnulib/gnulib/lib/xgetcwd.c,v
retrieving revision 1.14
diff -p -u -r1.14 xgetcwd.c
--- lib/xgetcwd.c       7 Jun 2003 10:07:29 -0000       1.14
+++ lib/xgetcwd.c       10 Sep 2003 06:49:43 -0000
@@ -28,10 +28,8 @@ extern int errno;
 #endif
 
 #include <sys/types.h>
+#include <stdlib.h>
 
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
 #if HAVE_UNISTD_H
 # include <unistd.h>
 #endif
Index: m4/getcwd.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/getcwd.m4,v
retrieving revision 1.2
diff -p -u -r1.2 getcwd.m4
--- m4/getcwd.m4        31 Dec 2002 13:43:06 -0000      1.2
+++ m4/getcwd.m4        10 Sep 2003 06:49:43 -0000
@@ -1,6 +1,6 @@
 # getcwd.m4 - check whether getcwd (NULL, 0) allocates memory for result
 
-# Copyright 2001 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,14 +20,12 @@
 
 AC_DEFUN([AC_FUNC_GETCWD_NULL],
   [
-   AC_CHECK_HEADERS_ONCE(stdlib.h unistd.h)
+   AC_CHECK_HEADERS_ONCE(unistd.h)
    AC_CACHE_CHECK([whether getcwd (NULL, 0) allocates memory for result],
      [ac_cv_func_getcwd_null],
      [AC_TRY_RUN(
         [
-#       ifdef HAVE_STDLIB_H
-#        include <stdlib.h>
-#       endif
+#       include <stdlib.h>
 #       ifdef HAVE_UNISTD_H
 #        include <unistd.h>
 #       endif
Index: m4/save-cwd.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/save-cwd.m4,v
retrieving revision 1.1
diff -p -u -r1.1 save-cwd.m4
--- m4/save-cwd.m4      31 Dec 2002 13:42:07 -0000      1.1
+++ m4/save-cwd.m4      10 Sep 2003 06:49:43 -0000
@@ -1,5 +1,5 @@
-# save-cwd.m4 serial 1
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# save-cwd.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
@@ -9,7 +9,6 @@ dnl the same distribution terms as the r
 AC_DEFUN([gl_SAVE_CWD],
 [
   dnl Prerequisites for lib/save-cwd.c.
-  AC_REQUIRE([AC_HEADER_STDC])
   AC_CHECK_HEADERS_ONCE(fcntl.h unistd.h)
   AC_CHECK_FUNCS(fchdir)
 ])
Index: m4/xgetcwd.m4
===================================================================
RCS file: /cvsroot/gnulib/gnulib/m4/xgetcwd.m4,v
retrieving revision 1.1
diff -p -u -r1.1 xgetcwd.m4
--- m4/xgetcwd.m4       31 Dec 2002 13:42:07 -0000      1.1
+++ m4/xgetcwd.m4       10 Sep 2003 06:49:43 -0000
@@ -1,5 +1,5 @@
-# xgetcwd.m4 serial 1
-dnl Copyright (C) 2002 Free Software Foundation, Inc.
+# xgetcwd.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
@@ -9,7 +9,7 @@ dnl the same distribution terms as the r
 AC_DEFUN([gl_XGETCWD],
 [
   dnl Prerequisites of lib/xgetcwd.c.
-  AC_CHECK_HEADERS_ONCE(stdlib.h unistd.h)
+  AC_CHECK_HEADERS_ONCE(unistd.h)
   AC_CHECK_FUNCS(getcwd)
   AC_FUNC_GETCWD_NULL
 ])




reply via email to

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