I installed these I-hope-obvious improvements to the unistd module. I didn't touch the modules Bruno maintains, which might also benefit from the unistd module.
2006-03-07 Paul Eggert <[EMAIL PROTECTED]> * MODULES.html.sh (Support for systems lacking POSIX:2001): Add unistd. * lib/c-stack.c: Include unistd.h unconditionally, since we now assume 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. Index: MODULES.html.sh =================================================================== RCS file: /cvsroot/gnulib/gnulib/MODULES.html.sh,v retrieving revision 1.114 retrieving revision 1.115 diff -p -u -r1.114 -r1.115 --- MODULES.html.sh 26 Feb 2006 08:45:03 -0000 1.114 +++ MODULES.html.sh 8 Mar 2006 01:51:28 -0000 1.115 @@ -1798,6 +1798,7 @@ func_all_modules () func_module rmdir func_module ssize_t func_module strtok_r + func_module unistd func_module utime func_end_table Index: lib/c-stack.c =================================================================== RCS file: /cvsroot/gnulib/gnulib/lib/c-stack.c,v retrieving revision 1.7 diff -p -u -r1.7 c-stack.c --- lib/c-stack.c 19 Sep 2005 17:28:14 -0000 1.7 +++ lib/c-stack.c 8 Mar 2006 01:35:45 -0000 @@ -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: lib/getlogin_r.c =================================================================== RCS file: /cvsroot/gnulib/gnulib/lib/getlogin_r.c,v retrieving revision 1.4 diff -p -u -r1.4 getlogin_r.c --- lib/getlogin_r.c 19 Sep 2005 17:28:14 -0000 1.4 +++ lib/getlogin_r.c 8 Mar 2006 01:35:45 -0000 @@ -26,10 +26,7 @@ #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: lib/getlogin_r.h =================================================================== RCS file: /cvsroot/gnulib/gnulib/lib/getlogin_r.h,v retrieving revision 1.5 diff -p -u -r1.5 getlogin_r.h --- lib/getlogin_r.h 11 Jul 2005 11:21:55 -0000 1.5 +++ lib/getlogin_r.h 8 Mar 2006 01:35:45 -0000 @@ -19,10 +19,7 @@ /* 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: lib/glob.c =================================================================== RCS file: /cvsroot/gnulib/gnulib/lib/glob.c,v retrieving revision 1.4 diff -p -u -r1.4 glob.c --- lib/glob.c 25 Feb 2006 07:57:37 -0000 1.4 +++ lib/glob.c 8 Mar 2006 01:35:45 -0000 @@ -34,13 +34,10 @@ #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: lib/pagealign_alloc.c =================================================================== RCS file: /cvsroot/gnulib/gnulib/lib/pagealign_alloc.c,v retrieving revision 1.8 diff -p -u -r1.8 pagealign_alloc.c --- lib/pagealign_alloc.c 2 Jul 2005 09:45:08 -0000 1.8 +++ lib/pagealign_alloc.c 8 Mar 2006 01:35:45 -0000 @@ -29,10 +29,7 @@ #include <stdlib.h> #include <fcntl.h> - -#if HAVE_UNISTD_H -# include <unistd.h> -#endif +#include <unistd.h> #if HAVE_MMAP # include <sys/mman.h> Index: modules/c-stack =================================================================== RCS file: /cvsroot/gnulib/gnulib/modules/c-stack,v retrieving revision 1.5 diff -p -u -r1.5 c-stack --- modules/c-stack 6 Jul 2005 15:58:47 -0000 1.5 +++ modules/c-stack 8 Mar 2006 01:35:45 -0000 @@ -9,6 +9,7 @@ m4/c-stack.m4 Depends-on: gettext-h exitfail +unistd configure.ac: gl_C_STACK Index: modules/getlogin_r =================================================================== RCS file: /cvsroot/gnulib/gnulib/modules/getlogin_r,v retrieving revision 1.2 diff -p -u -r1.2 getlogin_r --- modules/getlogin_r 29 May 2005 16:56:02 -0000 1.2 +++ modules/getlogin_r 8 Mar 2006 01:35:45 -0000 @@ -7,6 +7,7 @@ lib/getlogin_r.c m4/getlogin_r.m4 Depends-on: +unistd configure.ac: gl_GETLOGIN_R Index: modules/glob =================================================================== RCS file: /cvsroot/gnulib/gnulib/modules/glob,v retrieving revision 1.3 diff -p -u -r1.3 glob --- modules/glob 13 Sep 2005 03:47:45 -0000 1.3 +++ modules/glob 8 Mar 2006 01:35:45 -0000 @@ -19,6 +19,7 @@ restrict stat-macros stdbool strdup +unistd configure.ac: gl_GLOB Index: modules/pagealign_alloc =================================================================== RCS file: /cvsroot/gnulib/gnulib/modules/pagealign_alloc,v retrieving revision 1.3 diff -p -u -r1.3 pagealign_alloc --- modules/pagealign_alloc 6 Jul 2005 15:58:47 -0000 1.3 +++ modules/pagealign_alloc 8 Mar 2006 01:35:45 -0000 @@ -13,6 +13,7 @@ exit getpagesize gettext-h xalloc +unistd configure.ac: gl_PAGEALIGN_ALLOC Index: modules/unistd =================================================================== RCS file: /cvsroot/gnulib/gnulib/modules/unistd,v retrieving revision 1.2 diff -p -u -r1.2 unistd --- modules/unistd 7 Mar 2006 13:44:24 -0000 1.2 +++ modules/unistd 8 Mar 2006 01:35:45 -0000 @@ -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 [EMAIL PROTECTED] - mv [EMAIL PROTECTED] $@ -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 [EMAIL PROTECTED] */' >$@ +MOSTLYCLEANFILES += unistd.h Include: #include <unistd.h> _______________________________________________ bug-gnulib mailing list bug-gnulib@gnu.org http://lists.gnu.org/mailman/listinfo/bug-gnulib