28 Feb 2012 00:25
fix tcgetsid return type
Eric Blake <eblake <at> redhat.com>
2012-02-27 23:25:36 GMT
2012-02-27 23:25:36 GMT
Detected by gnulib's unit tests. POSIX requires tcgetsid to return
pid_t, not int.
2012-02-27 Eric Blake <eblake <at> redhat.com>
* include/sys/termios.h (tcgetsid): Fix return type.
* termios.cc (tcgetsid): Likewise.
* fhandler_termios.cc (fhandler_termios::tcgetsid): Likewise.
* fhandler.h (fhandler_base): Likewise.
* fhandler.cc (fhandler_base::tcgetsid): Likewise.
diff --git a/winsup/cygwin/fhandler.cc b/winsup/cygwin/fhandler.cc
index ef25a07..c3bca4f 100644
--- a/winsup/cygwin/fhandler.cc
+++ b/winsup/cygwin/fhandler.cc
<at> <at> -1464,7 +1464,7 <at> <at> fhandler_base::tcgetpgrp ()
return -1;
}
-int
+pid_t
fhandler_base::tcgetsid ()
{
set_errno (ENOTTY);
diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h
index 605f59b..3b186bd 100644
--- a/winsup/cygwin/fhandler.h
+++ b/winsup/cygwin/fhandler.h
<at> <at> -383,7 +383,7 <at> <at> public:
virtual int tcgetattr (struct termios *t);
(Continue reading)
RSS Feed