Eric Blake | 28 Feb 2012 00:25
Picon
Favicon
Gravatar

fix tcgetsid return type

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)

Christopher Faylor | 28 Feb 2012 00:57
Favicon

Re: fix tcgetsid return type

On Mon, Feb 27, 2012 at 04:25:36PM -0700, Eric Blake wrote:
>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.

Looks good.  Please check in.

cgf

Eric Blake | 28 Feb 2012 16:00
Picon
Favicon
Gravatar

Re: fix tcgetsid return type

On 02/27/2012 04:57 PM, Christopher Faylor wrote:
> On Mon, Feb 27, 2012 at 04:25:36PM -0700, Eric Blake wrote:
>> 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.
> 
> Looks good.  Please check in.

Done.

--

-- 
Eric Blake   eblake <at> redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


Gmane