* lib/c-stack.c: Include unistd.h unconditionally, since we now assume
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 8 Mar 2006 01:37:15 +0000 (01:37 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 8 Mar 2006 01:37:15 +0000 (01:37 +0000)
the unistd module.
* lib/getlogin_r.c: Likewise.
* lib/getlogin_r.h: Likewise.
* lib/glob.c: Likewise.
* lib/pagealign_alloc.c: Likewise.
* lib/unistd_.h: Remove; no longer needed.
* modules/c-stack (Depends-on): Add unistd.
* modules/getlogin_r: Likewise.
* modules/glob: Likewise.
* modules/pagealign_alloc: Likewise.
* modules/unistd (Files): Remove lib/unistd_.h.
(EXTRA_DIST): Remove.
(unistd.h): Create using 'echo' rather than 'cp', so that we don't
need unistd_.h.
(MOSTLYCLEANFILES): Remove unistd.h-t.

13 files changed:
ChangeLog
lib/ChangeLog
lib/c-stack.c
lib/getlogin_r.c
lib/getlogin_r.h
lib/glob.c
lib/pagealign_alloc.c
lib/unistd_.h [deleted file]
modules/c-stack
modules/getlogin_r
modules/glob
modules/pagealign_alloc
modules/unistd

index ecdc2146e669998efef3ed0d2782ae4cd58e21b8..163105e108bf4aaaa0a0d1399a4121b5ab67deb3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * modules/c-stack (Depends-on): Add unistd.
+       * modules/getlogin_r: Likewise.
+       * modules/glob: Likewise.
+       * modules/pagealign_alloc: Likewise.
+       * modules/unistd (Files): Remove lib/unistd_.h.
+       (EXTRA_DIST): Remove.
+       (unistd.h): Create using 'echo' rather than 'cp', so that we don't
+       need unistd_.h.
+       (MOSTLYCLEANFILES): Remove unistd.h-t.
+
 2006-03-07  Simon Josefsson  <jas@extundo.com>
 
        * modules/getopt (Depends-on): Add unistd.
index b5cc5b1acaebba02941a9de536480175aa8fc7cc..6ab7de94d3b91b1d16a0e5c96dd2839cd3627075 100644 (file)
@@ -1,3 +1,13 @@
+2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * c-stack.c: Include unistd.h unconditionally, since we now assume
+       the unistd module.
+       * getlogin_r.c: Likewise.
+       * getlogin_r.h: Likewise.
+       * glob.c: Likewise.
+       * pagealign_alloc.c: Likewise.
+       * unistd_.h: Remove; no longer needed.
+
 2006-03-07  Simon Josefsson  <jas@extundo.com>
 
        * unistd_.h: New file.
index 32088f9c6dd874b91b33d8ab08075240c7e00eae..b4c32651d15e7972f46b41d76f5c288aae596f89 100644 (file)
@@ -1,6 +1,6 @@
 /* Stack overflow handling.
 
-   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2006 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
@@ -77,9 +77,7 @@ typedef struct sigaltstack stack_t;
 # include <ucontext.h>
 #endif
 
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 #ifndef STDERR_FILENO
 # define STDERR_FILENO 2
 #endif
index b9b76c64b255d6c7089c3ec0ec4a7c10c0f32f96..371164a51d72fdda9891d819ba98f81891ef7ca6 100644 (file)
 
 #include <errno.h>
 #include <string.h>
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #if !HAVE_DECL_GETLOGIN
 char *getlogin (void);
index 3ff3cafa6976c161fadd9a098c5b9919d8fb2798..3b304acda11a3895b5671fa9ceca02ed63249453 100644 (file)
 /* Written by Paul Eggert and Derek Price.  */
 
 #include <stddef.h>
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 /* Copies the user's login name to NAME.
    The array pointed to by NAME has room for SIZE bytes.
index fe0e8d58febdeb1a95b5f08a8f3ba4014019ebe0..265377e799951cd545a39187f33444242d238dea 100644 (file)
 #include <stdio.h>             /* Needed on stupid SunOS for assert.  */
 
 #if !defined _LIBC || !defined GLOB_ONLY_P
-#if defined HAVE_UNISTD_H || defined _LIBC
-# include <unistd.h>
-# ifndef POSIX
-#  ifdef _POSIX_VERSION
-#   define POSIX
-#  endif
-# endif
+
+#include <unistd.h>
+#if !defined POSIX && defined _POSIX_VERSION
+# define POSIX
 #endif
 
 #include <pwd.h>
index 28e8209f71f509ffe04dfd0eda601d9783b9ee72..45bbd65732d8c42f52a94f526f9569f75348a8b1 100644 (file)
 #include <stdlib.h>
 
 #include <fcntl.h>
-
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #if HAVE_MMAP
 # include <sys/mman.h>
diff --git a/lib/unistd_.h b/lib/unistd_.h
deleted file mode 100644 (file)
index 484bd36..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/* A unistd.h replacement for systems lacking it.
-   Copyright (C) 2006 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
-   the Free Software Foundation; either version 2, or (at your option)
-   any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-   USA.  */
-
-/* Put any statements that are necessary to get a working unistd.h in
-   this file. */
-
-/* MS Visual Studio doesn't have unistd.h, but it doesn't seem to need
-   any particular statements in this file.  So this file is here to
-   avoid breaking '#include <unistd.h>' in other files. */
index 03e97a5fb60abfa00e9ff9e094eec9c7c16cca50..926aaf7aeadee8c7a255605d4d39cb0d476e33cd 100644 (file)
@@ -9,6 +9,7 @@ m4/c-stack.m4
 Depends-on:
 gettext-h
 exitfail
+unistd
 
 configure.ac:
 gl_C_STACK
index c10863548a35258e14dccfe05e4d603250d51f8c..fc21faf7358ad0a14c6347a85f4fdabed654a7be 100644 (file)
@@ -7,6 +7,7 @@ lib/getlogin_r.c
 m4/getlogin_r.m4
 
 Depends-on:
+unistd
 
 configure.ac:
 gl_GETLOGIN_R
index 98611a8784ee435dff1eb62ed8be0e340d7fd7a0..6537f178dfa11b2a8f1315c45e659f20ffe81f63 100644 (file)
@@ -19,6 +19,7 @@ restrict
 stat-macros
 stdbool
 strdup
+unistd
 
 configure.ac:
 gl_GLOB
index acb9abee681848f47306c208bc028cf010716511..78e6d708cb74684a7318c287c51552ab49737aa3 100644 (file)
@@ -13,6 +13,7 @@ exit
 getpagesize
 gettext-h
 xalloc
+unistd
 
 configure.ac:
 gl_PAGEALIGN_ALLOC
index 6cb126a55d76fe2fa17e9221e36e7ce34a146bc1..f54499f119e9dc486d8683e1dfc5176ae8caaf09 100644 (file)
@@ -2,7 +2,6 @@ Description:
 A <unistd.h> for systems lacking it.
 
 Files:
-lib/unistd_.h
 m4/unistd_h.m4
 
 Depends-on:
@@ -12,14 +11,12 @@ gl_HEADER_UNISTD
 
 Makefile.am:
 BUILT_SOURCES += $(UNISTD_H)
-EXTRA_DIST += unistd_.h
-
-# We need the following in order to create <unistd.h> when the system
-# doesn't have one.
-unistd.h: unistd_.h
-       cp $(srcdir)/unistd_.h $@-t
-       mv $@-t $@
-MOSTLYCLEANFILES += unistd.h unistd.h-t
+
+# We need the following in order to create an empty placeholder for
+# <unistd.h> when the system doesn't have one.
+unistd.h:
+       echo '/* Empty placeholder for $@.  */' >$@
+MOSTLYCLEANFILES += unistd.h
 
 Include:
 #include <unistd.h>