bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCHv2 3/3] forkpty, openpty: prefer glibc's const-safe prototype


From: Bruno Haible
Subject: Re: [PATCHv2 3/3] forkpty, openpty: prefer glibc's const-safe prototype
Date: Fri, 19 Mar 2010 10:34:23 +0100
User-agent: KMail/1.9.9

Eric Blake wrote:
> +/* Need to cast, because on older glibc systems, the last two parameters
> +   lacked const.  */
> +_GL_CXXALIAS_SYS_CAST (openpty, int,
> +                       (int *, int *, char *, struct termios const *,
> +                        struct winsize const *));
> 

You don't need to use _GL_CXXALIAS_SYS_CAST here, just the normal
_GL_CXXALIAS_SYS, because when the system's openpty() prototype is
not the expected one, the pty.m4 code sets REPLACE_OPENPTY=1.
You would have needed _GL_CXXALIAS_SYS_CAST if the 'openpty' module
didn't provide this replacement.

Likewise for forkpty.

PS: I join Simon in saying: I like these changes!

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]