From b856fadc1c8dcb53e7efcbb2d0ae7edc022fdb6a Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Wed, 29 Feb 2012 08:36:22 -0700 Subject: [PATCH] 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 --- ChangeLog | 7 +++++++ doc/posix-headers/termios.texi | 3 +++ lib/termios.in.h | 10 +--------- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index f524a5a43c..ddc7b54690 100644 --- 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 index 11d4d99bb1..504743db7f 100644 --- a/doc/posix-headers/termios.texi +++ b/doc/posix-headers/termios.texi @@ -10,6 +10,9 @@ Portability problems fixed by Gnulib: @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 index 3836e2d8ce..f8a3b7320e 100644 --- a/lib/termios.in.h +++ b/lib/termios.in.h @@ -32,12 +32,6 @@ extern "C" { } #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 @@ extern "C" { #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. */ -- 2.39.5