From: Bruno Haible Date: Mon, 19 Sep 2011 21:48:58 +0000 (+0200) Subject: sched: Ensure pid_t is defined. X-Git-Tag: v0.1~1860 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=daf9ac83292b9ca2e080693b264d96969276769b;p=gnulib.git sched: Ensure pid_t is defined. * m4/sched_h.m4 (gl_SCHED_H): Arrange to override if it does not define pid_t. * lib/sched.in.h: Include . * doc/posix-headers/sched.texi: Mention the pid_t problem. Reported by Tom G. Christensen . --- diff --git a/ChangeLog b/ChangeLog index 617267350..3f4b62fed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2011-09-19 Bruno Haible + sched: Ensure pid_t is defined. + * m4/sched_h.m4 (gl_SCHED_H): Arrange to override if it does + not define pid_t. + * lib/sched.in.h: Include . + * doc/posix-headers/sched.texi: Mention the pid_t problem. + Reported by Tom G. Christensen . + +2011-09-19 Bruno Haible + msvc-inval: Ensure the entire expansion is a single statement. * lib/msvc-inval.h (TRY_MSVC_INVAL, DONE_MSVC_INVAL): Add an extra pair of braces. diff --git a/doc/posix-headers/sched.texi b/doc/posix-headers/sched.texi index 82d198ec5..8dacddf4a 100644 --- a/doc/posix-headers/sched.texi +++ b/doc/posix-headers/sched.texi @@ -11,6 +11,9 @@ Portability problems fixed by Gnulib: This header file is missing on some platforms: Minix 3.1.8, mingw, MSVC 9, BeOS. @item +This header file does not define the type @code{pid_t} on some platforms: +glibc 2.11, MacOS X 10.5. +@item @code{struct sched_param} is not defined on some platforms: Haiku. @item diff --git a/lib/sched.in.h b/lib/sched.in.h index 10405d0d1..fc2e1710f 100644 --- a/lib/sched.in.h +++ b/lib/sched.in.h @@ -29,6 +29,12 @@ #ifndef _@GUARD_PREFIX@_SCHED_H #define _@GUARD_PREFIX@_SCHED_H +/* Get pid_t. + This is needed on glibc 2.11 (see + glibc bug ) + and MacOS X 10.5. */ +#include + #if !@HAVE_STRUCT_SCHED_PARAM@ # if !GNULIB_defined_struct_sched_param diff --git a/m4/sched_h.m4 b/m4/sched_h.m4 index e6ff995ff..28b6dbd5b 100644 --- a/m4/sched_h.m4 +++ b/m4/sched_h.m4 @@ -1,4 +1,4 @@ -# sched_h.m4 serial 5 +# sched_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, @@ -13,6 +13,7 @@ AC_DEFUN([gl_SCHED_H], #include struct sched_param a; int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER }; + pid_t t1; ]])], [SCHED_H=''], [SCHED_H='sched.h'