# HG changeset patch # User Bruno Haible # Date 1316468938 -7200 # Node ID bbe6ab59b982085c6a5f4f2378297be9c18ae881 # Parent a68864d4e669b603e6425f6eea2c69b742f987a4 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 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +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. diff --git a/doc/posix-headers/sched.texi b/doc/posix-headers/sched.texi --- a/doc/posix-headers/sched.texi +++ b/doc/posix-headers/sched.texi @@ -11,6 +11,9 @@ 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 --- 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 --- 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 @@ #include struct sched_param a; int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER }; + pid_t t1; ]])], [SCHED_H=''], [SCHED_H='sched.h'