+2006-04-23 Bruno Haible <bruno@clisp.org>
+
+ * configure.ac: Invoke gl_HEADER_UNISTD.
+
2006-04-17 Bruno Haible <bruno@clisp.org>
* Makefile.am (gettextsrc_SCRIPTS): Remove mkinstalldirs.
AC_HEADER_STDC
AC_CHECK_HEADERS(limits.h malloc.h pwd.h string.h unistd.h utime.h values.h)
AM_STDBOOL_H
+gl_HEADER_UNISTD
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_INLINE
+2006-04-23 Bruno Haible <bruno@clisp.org>
+
+ * addext.c: Include <unistd.h> unconditionally.
+ * clean-temp.c: Likewise.
+ * copy-file.c: Likewise.
+ * execute.c: Likewise.
+ * fatal-signal.c: Likewise.
+ * findprog.c: Likewise.
+ * getopt_.h: Likewise.
+ * mkdtemp.c: Likewise.
+ * pathmax.h: Likewise.
+ * pipe.h: Likewise.
+ * pipe.c: Likewise.
+ * safe-read.c: Likewise.
+ * unsetenv.c: Likewise.
+ * wait-process.h: Likewise.
+ * xgetcwd.c: Likewise.
+ * Makefile.am (BUILT_SOURCES): Conditionally add unistd.h.
+ (unistd.h): New rule.
+ (MOSTLYCLEANFILES): Add unistd.h.
+
2006-04-17 Bruno Haible <bruno@clisp.org>
* Makefile.am: Use $(mkdir_p) instead of $(mkinstalldirs).
# <<< gnulib module stdbool.
+# >>> gnulib module unistd.
+BUILT_SOURCES += $(UNISTD_H)
+
+# 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
+# <<< gnulib module unistd.
+
+
# >>> gnulib module alloca.
BUILT_SOURCES += $(ALLOCA_H)
EXTRA_DIST += alloca_.h
/* addext.c -- add an extension to a file name
- Copyright (C) 1990, 1997-1999, 2001-2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1990, 1997-1999, 2001-2003, 2005-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
# include <strings.h>
#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include "basename.h"
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include "error.h"
#include "fatal-signal.h"
/* Copying of files.
- Copyright (C) 2001-2003 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
#include <fcntl.h>
#include <stddef.h>
#include <sys/stat.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#if HAVE_UTIME || HAVE_UTIMES
# if HAVE_UTIME_H
/* Creation of autonomous subprocesses.
- Copyright (C) 2001-2004 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
#include <stdbool.h>
#include <stdlib.h>
#include <signal.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include "error.h"
#include "exit.h"
#include <stdbool.h>
#include <stdlib.h>
#include <signal.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include "xalloc.h"
/* Locating a program in PATH.
- Copyright (C) 2001-2004 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include "xalloc.h"
#include "pathname.h"
/* Declarations for getopt.
- Copyright (C) 1989-1994,1996-1999,2001,2003-2005
+ Copyright (C) 1989-1994,1996-1999,2001,2003-2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
#if defined __GETOPT_PREFIX && !defined __need_getopt
# include <stdlib.h>
# include <stdio.h>
-# if HAVE_UNISTD_H
-# include <unistd.h>
-# endif
+# include <unistd.h>
# undef __need_getopt
# undef getopt
# undef getopt_long
-/* Copyright (C) 1999, 2001-2003 Free Software Foundation, Inc.
+/* Copyright (C) 1999, 2001-2003, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
# include <inttypes.h>
#endif
-#if HAVE_UNISTD_H || _LIBC
-# include <unistd.h>
-#endif
+#include <unistd.h>
#if HAVE_GETTIMEOFDAY || _LIBC
# if HAVE_SYS_TIME_H || _LIBC
/* Define PATH_MAX somehow. Requires sys/types.h.
- Copyright (C) 1992, 1999, 2001, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1999, 2001, 2003, 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
#ifndef _PATHMAX_H
# define _PATHMAX_H
-# if HAVE_UNISTD_H
-# include <unistd.h>
-# endif
+# include <unistd.h>
/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
PATH_MAX but might cause redefinition warnings when sys/param.h is
/* Creation of subprocesses, communicating via pipes.
- Copyright (C) 2001-2004 Free Software Foundation, Inc.
+ Copyright (C) 2001-2004, 2006 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
#include <fcntl.h>
#include <stdlib.h>
#include <signal.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include "error.h"
#include "exit.h"
/* Creation of subprocesses, communicating via pipes.
- Copyright (C) 2001-2003 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
/* Get pid_t. */
#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <sys/types.h>
#include <stdbool.h>
/* An interface to read and write that retries after interrupts.
- Copyright (C) 1993-1994, 1998, 2002-2005 Free Software Foundation, Inc.
+ Copyright (C) 1993-1994, 1998, 2002-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
/* Get ssize_t. */
#include <sys/types.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include <errno.h>
-/* Copyright (C) 1992,1995-1999,2000-2002,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1992,1995-1999,2000-2002,2005-2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#include <stdlib.h>
#include <string.h>
-#if _LIBC || HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#if !_LIBC
# define __environ environ
/* Waiting for a subprocess to finish.
- Copyright (C) 2001-2003 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc.
Written by Bruno Haible <haible@clisp.cons.org>, 2001.
This program is free software; you can redistribute it and/or modify
/* Get pid_t. */
#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <sys/types.h>
#include <stdbool.h>
/* xgetcwd.c -- return current directory with unlimited length
- Copyright (C) 1992, 1996, 2000, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1992, 1996, 2000, 2003, 2005-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
#endif
#include <sys/types.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include "pathmax.h"
+2006-04-23 Bruno Haible <bruno@clisp.org>
+
+ * unistd_h.m4: New file, from gnulib.
+ * Makefile.am (EXTRA_DIST): Add it.
+
2006-04-14 Bruno Haible <bruno@clisp.org>
Prepare for autoconf-2.60.
strtoul.m4 \
tmpdir.m4 \
unionwait.m4 \
+unistd_h.m4 \
unlocked-io.m4 \
xreadlink.m4
+2006-04-23 Bruno Haible <bruno@clisp.org>
+
+ * msgexec.c: Include <unistd.h> unconditionally.
+ * msgfilter.c: Likewise.
+ * msggrep.c: Likewise.
+ * msginit.c: Likewise.
+ * hostname.c: Likewise.
+ * urlget.c: Likewise.
+
2006-04-17 Bruno Haible <bruno@clisp.org>
* Makefile.am: Use $(mkdir_p) instead of $(mkinstalldirs).
#endif
/* Get gethostname(). */
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#ifdef WIN32
/* Native Woe32 API lacks gethostname() but has GetComputerName() instead. */
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include "closeout.h"
#include "dir-list.h"
# include <sys/time.h>
#endif
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#elif defined _MSC_VER || defined __MINGW32__
+#include <unistd.h>
+#if defined _MSC_VER || defined __MINGW32__
# include <io.h>
#endif
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#elif defined _MSC_VER || defined __MINGW32__
+#include <unistd.h>
+#if defined _MSC_VER || defined __MINGW32__
# include <io.h>
#endif
# include <pwd.h>
#endif
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#if HAVE_DIRENT_H
# include <dirent.h>
#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
-
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
#include "closeout.h"
#include "error.h"