# HG changeset patch # User Eric Blake # Date 1330529782 25200 # Node ID 982859eb1700dad8e94a6ac70e648c30458b38ba # Parent bceff178bb99e1c16782af2a4aef15450aa6e514 termios: fix pid_t always, not just for tcgetsid tests-termios.c was failing on more than just cygwin. * doc/posix-headers/termios.texi (termios.h): Mention problem. * lib/termios.in.h (include): Ensure pid_t on all platforms, not just when building tcgetsid. Signed-off-by: Eric Blake diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-02-29 Eric Blake + + termios: fix pid_t always, not just for tcgetsid + * doc/posix-headers/termios.texi (termios.h): Mention problem. + * lib/termios.in.h (include): Ensure pid_t on all platforms, not + just when building tcgetsid. + 2012-02-29 Bruno Haible Tests for module 'hypotl'. diff --git a/doc/posix-headers/termios.texi b/doc/posix-headers/termios.texi --- a/doc/posix-headers/termios.texi +++ b/doc/posix-headers/termios.texi @@ -10,6 +10,9 @@ @item This header file is missing on some platforms: mingw, MSVC 9. +@item +This header does not declare @code{pid_t} on all platforms: +glibc on some architectures, FreeBSD 6.4, OpenBSD 4.9, Cygwin 1.7.11. @end itemize Portability problems not fixed by Gnulib: diff --git a/lib/termios.in.h b/lib/termios.in.h --- a/lib/termios.in.h +++ b/lib/termios.in.h @@ -32,12 +32,6 @@ } #endif -/* On Cygwin 1.7.11, tcgetsid returns int instead of pid_t; at least - they are the same size on that platform. */ -#ifdef __CYGWIN__ -# include -#endif - /* The include_next requires a split double-inclusion guard. */ #if @HAVE_TERMIOS_H@ # @INCLUDE_NEXT@ @NEXT_TERMIOS_H@ @@ -46,10 +40,8 @@ #ifndef _@GUARD_PREFIX@_TERMIOS_H #define _@GUARD_PREFIX@_TERMIOS_H -#if @GNULIB_TCGETSID@ /* Get pid_t. */ -# include -#endif +#include /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */