]> Savannah Git Hosting - gnulib.git/commitdiff
Ensure pid_t gets defined.
authorBruno Haible <bruno@clisp.org>
Sun, 11 Sep 2011 12:14:04 +0000 (14:14 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 11 Sep 2011 12:14:04 +0000 (14:14 +0200)
* m4/fcntl_h.m4 (gl_FCNTL_H): Require AC_TYPE_PID_T.
* m4/sched_h.m4 (gl_SCHED_H): Likewise.
* m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
* m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
* m4/sys_wait_h.m4 (gl_SYS_WAIT_H): Likewise.
* m4/termios_h.m4 (gl_TERMIOS_H): Likewise.
* m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
* m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
* tests/test-fcntl-h.c: Check that pid_t is defined.
* tests/test-sched.c: Likewise.
* tests/test-termios.c: Likewise.
* tests/test-time.c: Likewise.
* doc/posix-headers/fcntl.texi: Mention lack of pid_t on MSVC platform.
* doc/posix-headers/signal.texi: Likewise.
* doc/posix-headers/sys_types.texi: Likewise.
* doc/posix-headers/time.texi: Likewise.

17 files changed:
ChangeLog
doc/posix-headers/fcntl.texi
doc/posix-headers/signal.texi
doc/posix-headers/sys_types.texi
doc/posix-headers/time.texi
m4/fcntl_h.m4
m4/sched_h.m4
m4/signal_h.m4
m4/spawn_h.m4
m4/sys_wait_h.m4
m4/termios_h.m4
m4/time_h.m4
m4/unistd_h.m4
tests/test-fcntl-h.c
tests/test-sched.c
tests/test-termios.c
tests/test-time.c

index f50c4a886e4213121c8cb10227d837a12fbd927f..6ed26026725189f7d2c50c3af3390dceb423c525 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2011-09-11  Bruno Haible  <bruno@clisp.org>
+
+       Ensure pid_t gets defined.
+       * m4/fcntl_h.m4 (gl_FCNTL_H): Require AC_TYPE_PID_T.
+       * m4/sched_h.m4 (gl_SCHED_H): Likewise.
+       * m4/signal_h.m4 (gl_SIGNAL_H): Likewise.
+       * m4/spawn_h.m4 (gl_SPAWN_H): Likewise.
+       * m4/sys_wait_h.m4 (gl_SYS_WAIT_H): Likewise.
+       * m4/termios_h.m4 (gl_TERMIOS_H): Likewise.
+       * m4/time_h.m4 (gl_HEADER_TIME_H_BODY): Likewise.
+       * m4/unistd_h.m4 (gl_UNISTD_H): Likewise.
+       * tests/test-fcntl-h.c: Check that pid_t is defined.
+       * tests/test-sched.c: Likewise.
+       * tests/test-termios.c: Likewise.
+       * tests/test-time.c: Likewise.
+       * doc/posix-headers/fcntl.texi: Mention lack of pid_t on MSVC platform.
+       * doc/posix-headers/signal.texi: Likewise.
+       * doc/posix-headers/sys_types.texi: Likewise.
+       * doc/posix-headers/time.texi: Likewise.
+
 2011-09-11  Bruno Haible  <bruno@clisp.org>
 
        acl: Fix compilation on Solaris 10 (older version).
index c87e8726d4807823860003e7066ca7877dc6d6cc..fa66cb316d6a6b149fd64807fd53799f969dcec5 100644 (file)
@@ -7,6 +7,10 @@ Gnulib module: fcntl-h
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+The type @code{pid_t} is not defined on some platforms:
+MSVC 9.
+
 @item
 @samp{O_CLOEXEC}, @samp{O_DIRECTORY}, @samp{O_DSYNC}, @samp{O_NOCTTY},
 @samp{O_NOFOLLOW}, @samp{O_RSYNC}, @samp{O_SYNC},
index f2878d4ca9dcef828cc46eb4d763b58597502df9..0df44ec80ff97cb869d5fb248a84ac539a694f3d 100644 (file)
@@ -23,6 +23,9 @@ mingw.
 platforms:
 Irix 5.3, Interix 3.5.
 @item
+The type @code{pid_t} is not defined on some platforms:
+MSVC 9.
+@item
 The signal @code{SIGPIPE} is not defined on some platforms:
 mingw.
 @item
index 58a5fd67965381dc6a10a18ea0fc70efcb1d3e8b..1141a2b40aa1e6087000017ed22a6de569c7320f 100644 (file)
@@ -11,4 +11,8 @@ Portability problems fixed by Gnulib:
 
 Portability problems not fixed by Gnulib:
 @itemize
+@item
+The type @code{pid_t} is not defined on some platforms:
+MSVC 9.
+You can use the macro @code{AC_TYPE_PID_T} to fix this.
 @end itemize
index 5b2320338f4ce6864d1df6a5e826b3694dac62e9..40a24b3e120be349473bef796de911b15ce7863f 100644 (file)
@@ -10,6 +10,10 @@ Portability problems fixed by Gnulib:
 @item
 @samp{struct timespec} is not defined on some platforms.
 
+@item
+The type @code{pid_t} is not defined on some platforms:
+MSVC 9.
+
 @item
 Some platforms provide a @code{NULL} macro that cannot be used in arbitrary
 expressions:
index c466da4df5a52b3b0a91c8102858f57ae086aa3b..346315c0b4243540b0dbc34239747f72c0389690 100644 (file)
@@ -1,4 +1,4 @@
-# serial 13
+# serial 14
 # Configure fcntl.h.
 dnl Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
@@ -13,6 +13,9 @@ AC_DEFUN([gl_FCNTL_H],
   AC_REQUIRE([gl_FCNTL_O_FLAGS])
   gl_NEXT_HEADERS([fcntl.h])
 
+  dnl Ensure the type pid_t gets defined.
+  AC_REQUIRE([AC_TYPE_PID_T])
+
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use, if it is not common
   dnl enough to be declared everywhere.
index 9cff891950df8b122c211fda0b01c853716ac542..e6ff995ffb3ec59e631bde1aeb23d3e7fda53373 100644 (file)
@@ -1,4 +1,4 @@
-# sched_h.m4 serial 4
+# sched_h.m4 serial 5
 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -30,6 +30,9 @@ AC_DEFUN([gl_SCHED_H],
        [HAVE_STRUCT_SCHED_PARAM=1], [HAVE_STRUCT_SCHED_PARAM=0],
        [#include <sched.h>])
      AC_SUBST([HAVE_STRUCT_SCHED_PARAM])
+
+     dnl Ensure the type pid_t gets defined.
+     AC_REQUIRE([AC_TYPE_PID_T])
     ])
   AC_SUBST([SCHED_H])
   AM_CONDITIONAL([GL_GENERATE_SCHED_H], [test -n "$SCHED_H"])
index b9536fb0e3caee9ca550f5083d1c4908874a028c..c3f25386ca22638bab0177ea67e52837e6552f05 100644 (file)
@@ -1,4 +1,4 @@
-# signal_h.m4 serial 16
+# signal_h.m4 serial 17
 dnl Copyright (C) 2007-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -17,6 +17,9 @@ AC_DEFUN([gl_SIGNAL_H],
 #include <signal.h>
     ]])
 
+  dnl Ensure the type pid_t gets defined.
+  AC_REQUIRE([AC_TYPE_PID_T])
+
   AC_REQUIRE([AC_TYPE_UID_T])
 
   dnl Persuade glibc <signal.h> to define sighandler_t.
index 4903b6a4a19472fef1c9822ac184d62007695c0d..33d30e6e9020ef889508531c6c0469d4f0873958 100644 (file)
@@ -1,4 +1,4 @@
-# spawn_h.m4 serial 13
+# spawn_h.m4 serial 14
 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -31,6 +31,9 @@ AC_DEFUN([gl_SPAWN_H],
   fi
   AC_SUBST([HAVE_SPAWN_H])
 
+  dnl Ensure the type pid_t gets defined.
+  AC_REQUIRE([AC_TYPE_PID_T])
+
   AC_REQUIRE([gl_HAVE_POSIX_SPAWN])
 
   AC_REQUIRE([AC_C_RESTRICT])
index e3b147c4fd700bca1b2497d91360fef06d9c8bfa..7cb76c27c248beabaea4ebba469866db5e2a945d 100644 (file)
@@ -1,4 +1,4 @@
-# sys_wait_h.m4 serial 5
+# sys_wait_h.m4 serial 6
 dnl Copyright (C) 2008-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -11,6 +11,9 @@ AC_DEFUN([gl_SYS_WAIT_H],
   dnl <sys/wait.h> is always overridden, because of GNULIB_POSIXCHECK.
   gl_CHECK_NEXT_HEADERS([sys/wait.h])
 
+  dnl Ensure the type pid_t gets defined.
+  AC_REQUIRE([AC_TYPE_PID_T])
+
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[#include <sys/wait.h>]],
index 2b799efb49fbbd15fe40cbf002d7dccee765ecca..33a2358f6120792b620b71759f10f7ad3c51a70a 100644 (file)
@@ -1,4 +1,4 @@
-# termios_h.m4 serial 3
+# termios_h.m4 serial 4
 dnl Copyright (C) 2010-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -15,6 +15,9 @@ AC_DEFUN([gl_TERMIOS_H],
     HAVE_TERMIOS_H=0
   fi
 
+  dnl Ensure the type pid_t gets defined.
+  AC_REQUIRE([AC_TYPE_PID_T])
+
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use, and which is not
   dnl guaranteed by C89.
index 615da1cfd3945d3cb71341bc95ea1b1d857e0e46..6e6394fdc90033ebfc83b28b2ff7799eee79d817 100644 (file)
@@ -2,7 +2,7 @@
 
 # Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc.
 
-# serial 4
+# serial 5
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -23,6 +23,9 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY],
   AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
   gl_NEXT_HEADERS([time.h])
   AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
+
+  dnl Ensure the type pid_t gets defined.
+  AC_REQUIRE([AC_TYPE_PID_T])
 ])
 
 dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared
index fb6fe07726538819a93c89b9a4ab9a8f69a82d71..6483b815d60d5b77b0ffb8d111dadabaeec73f25 100644 (file)
@@ -1,4 +1,4 @@
-# unistd_h.m4 serial 56
+# unistd_h.m4 serial 57
 dnl Copyright (C) 2006-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -21,6 +21,9 @@ AC_DEFUN([gl_UNISTD_H],
   fi
   AC_SUBST([HAVE_UNISTD_H])
 
+  dnl Ensure the type pid_t gets defined.
+  AC_REQUIRE([AC_TYPE_PID_T])
+
   dnl Check for declarations of anything we want to poison if the
   dnl corresponding gnulib module is not in use.
   gl_WARN_ON_USE_PREPARE([[#include <unistd.h>
index 648701ef4b6da5d91eb6d65bd89581d2ad58b20c..078aecdd44a8e8bc49803b0225f128efc4582990 100644 (file)
@@ -31,6 +31,9 @@ int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
 /* Check that the FD_* macros are defined.  */
 int i = FD_CLOEXEC;
 
+/* Check that the types are all defined.  */
+pid_t t1;
+
 int
 main (void)
 {
index 8d0c8cdb67858e4a30266f620f580b10cba3a80d..177d33e1ea2b55397c1dc10a426d5161ace21258 100644 (file)
@@ -26,6 +26,9 @@ static struct sched_param a;
 /* Check that the SCHED_* macros are defined and compile-time constants.  */
 int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
 
+/* Check that the types are all defined.  */
+pid_t t1;
+
 static int f1;
 
 int
index 9144b1b49af703c7b649b76ec839b77c65cbbdd6..f6b1d021aba885c0ad166db05298f7d9ba4830f9 100644 (file)
@@ -20,6 +20,9 @@
 
 #include <termios.h>
 
+/* Check that the types are all defined.  */
+pid_t t1;
+
 int
 main (void)
 {
index 0c78f36c663ae20f06224cb60b196480c38b749c..df4710d445d95980a3b3d576afe0459713a25b85 100644 (file)
@@ -22,7 +22,9 @@
 
 #include "verify.h"
 
-struct timespec a;
+/* Check that the types are all defined.  */
+struct timespec t1;
+pid_t t2;
 
 /* Check that NULL can be passed through varargs as a pointer type,
    per POSIX 2008.  */