changeset 36208:52ca8cb00c03

tcgetsid: fix cygwin header bug Cygwin added tcgetsid in 1.7.10, but with int instead of pid_t: http://cygwin.com/ml/cygwin-patches/2012-q1/msg00031.html For now, since cygwin's pid_t is int, I'm not worrying about correcting the return type. * lib/termios.in.h (includes) [Cygwin]: Ensure pid_t is defined. Signed-off-by: Eric Blake <eblake@redhat.com>
author Eric Blake <eblake@redhat.com>
date Mon, 27 Feb 2012 17:35:56 -0700
parents 8bcfbe79aa6e
children bc5656e0f5cc
files ChangeLog lib/termios.in.h
diffstat 2 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Feb 27 17:06:06 2012 -0700
+++ b/ChangeLog	Mon Feb 27 17:35:56 2012 -0700
@@ -1,5 +1,8 @@
 2012-02-29  Eric Blake  <eblake@redhat.com>
 
+	tcgetsid: fix cygwin header bug
+	* lib/termios.in.h (includes) [Cygwin]: Ensure pid_t is defined.
+
 	docs: update cygwin progress
 	* doc/posix-functions/llround.texi (llround): Added in cygwin
 	1.7.8.
--- a/lib/termios.in.h	Mon Feb 27 17:06:06 2012 -0700
+++ b/lib/termios.in.h	Mon Feb 27 17:35:56 2012 -0700
@@ -32,6 +32,12 @@
 }
 #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 <sys/types.h>
+#endif
+
 /* The include_next requires a split double-inclusion guard.  */
 #if @HAVE_TERMIOS_H@
 # @INCLUDE_NEXT@ @NEXT_TERMIOS_H@