changeset 6751:1b0092424a44

Include <unistd.h> unconditionally.
author Bruno Haible <bruno@clisp.org>
date Mon, 24 Apr 2006 11:38:06 +0000
parents 608add4e5b80
children 76e945b1d9cb
files ChangeLog lib/ChangeLog lib/copy-file.c lib/execute.c lib/fatal-signal.c lib/findprog.c lib/mkdtemp.c lib/pipe.c lib/pipe.h lib/wait-process.h modules/copy-file modules/execute modules/fatal-signal modules/findprog modules/mkdtemp modules/pipe modules/wait-process
diffstat 17 files changed, 42 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2006-04-23  Bruno Haible  <bruno@clisp.org>
+
+	* modules/copy-file: Depend on unistd.
+	* modules/execute: Likewise.
+	* modules/fatal-signal: Likewise.
+	* modules/findprog: Likewise.
+	* modules/mkdtemp : Likewise.
+	* modules/pipe: Likewise.
+	* modules/wait-process: Likewise.
+
 2006-04-23  Claudio Fontana  <claudio@gnu.org>
             Bruno Haible  <bruno@clisp.org>
 
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,14 @@
+2006-04-23  Bruno Haible  <bruno@clisp.org>
+
+	* copy-file.c: Include <unistd.h> unconditionally.
+	* execute.c: Likewise.
+	* fatal-signal.c: Likewise.
+	* findprog.c: Likewise.
+	* mkdtemp.c: Likewise.
+	* pipe.h: Likewise.
+	* pipe.c: Likewise.
+	* wait-process.h: Likewise.
+
 2006-04-23  Bruno Haible  <bruno@clisp.org>
 
 	* fwriteerror.c (fwriteerror): Call fclose also when an error
--- a/lib/copy-file.c
+++ b/lib/copy-file.c
@@ -1,5 +1,5 @@
 /* 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
@@ -28,10 +28,7 @@
 #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
--- a/lib/execute.c
+++ b/lib/execute.c
@@ -1,5 +1,5 @@
 /* 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
@@ -29,10 +29,7 @@
 #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"
--- a/lib/fatal-signal.c
+++ b/lib/fatal-signal.c
@@ -1,5 +1,5 @@
 /* Emergency actions in case of a fatal signal.
-   Copyright (C) 2003-2004 Free Software Foundation, Inc.
+   Copyright (C) 2003-2004, 2006 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2003.
 
    This program is free software; you can redistribute it and/or modify
@@ -28,9 +28,7 @@
 #include <stdlib.h>
 #include <signal.h>
 #include <string.h>
-#if HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 
 #include "xalloc.h"
 
--- a/lib/findprog.c
+++ b/lib/findprog.c
@@ -1,5 +1,5 @@
 /* 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
@@ -27,10 +27,7 @@
 #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"
--- a/lib/mkdtemp.c
+++ b/lib/mkdtemp.c
@@ -1,4 +1,4 @@
-/* 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.
 
    This program is free software; you can redistribute it and/or modify
@@ -45,9 +45,7 @@
 # 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
--- a/lib/pipe.c
+++ b/lib/pipe.c
@@ -1,5 +1,5 @@
 /* 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
@@ -28,10 +28,7 @@
 #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"
--- a/lib/pipe.h
+++ b/lib/pipe.h
@@ -1,5 +1,5 @@
 /* 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
@@ -21,9 +21,7 @@
 
 /* Get pid_t.  */
 #include <stdlib.h>
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 #include <sys/types.h>
 
 #include <stdbool.h>
--- a/lib/wait-process.h
+++ b/lib/wait-process.h
@@ -1,5 +1,5 @@
 /* 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
@@ -21,9 +21,7 @@
 
 /* Get pid_t.  */
 #include <stdlib.h>
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 #include <sys/types.h>
 
 #include <stdbool.h>
--- a/modules/copy-file
+++ b/modules/copy-file
@@ -13,6 +13,7 @@
 binary-io
 exit
 gettext-h
+unistd
 
 configure.ac:
 gl_COPY_FILE
--- a/modules/execute
+++ b/modules/execute
@@ -15,6 +15,7 @@
 gettext-h
 stdbool
 strpbrk
+unistd
 
 configure.ac:
 gl_EXECUTE
--- a/modules/fatal-signal
+++ b/modules/fatal-signal
@@ -11,6 +11,7 @@
 Depends-on:
 xalloc
 stdbool
+unistd
 
 configure.ac:
 gl_FATAL_SIGNAL
--- a/modules/findprog
+++ b/modules/findprog
@@ -11,6 +11,7 @@
 stdbool
 xalloc
 pathname
+unistd
 
 configure.ac:
 gl_FINDPROG
--- a/modules/mkdtemp
+++ b/modules/mkdtemp
@@ -11,6 +11,7 @@
 m4/mkdtemp.m4
 
 Depends-on:
+unistd
 
 configure.ac:
 gt_FUNC_MKDTEMP
--- a/modules/pipe
+++ b/modules/pipe
@@ -15,6 +15,7 @@
 gettext-h
 stdbool
 strpbrk
+unistd
 
 configure.ac:
 gl_PIPE
--- a/modules/wait-process
+++ b/modules/wait-process
@@ -14,6 +14,7 @@
 xalloc
 gettext-h
 stdbool
+unistd
 
 configure.ac:
 gl_WAIT_PROCESS