[PATCH] Add getpt(3)
Christopher Faylor
cgf-use-the-mailinglist-please@cygwin.com
Fri Dec 30 17:58:00 GMT 2011
On Fri, Dec 30, 2011 at 12:44:57AM -0600, Yaakov (Cygwin/X) wrote:
>getpt(3) is a GNU extension which predates posix_openpt(3):
>
>http://www.kernel.org/doc/man-pages/online/pages/man3/getpt.3.html
>
>The code itself is quite simple, but let me preempt some questions:
>
>1) Yes, portable code should use posix_openpt(3). Unfortunately not all
>code is written with portability in mind.
>
>2) A macro is insufficient as it will not be discovered by an Autoconf
>AC_CHECK_FUNC or CMake CHECK_FUNCTION_EXISTS test (which is exactly how
>I came across this issue in the first place).
>
>Patches for winsup/cygwin and winsup/doc attached.
>2011-12-30 Yaakov Selkowitz <yselkowitz@...>
>
> * cygwin.din (getpt): Export.
> * posix.sgml (std-gnu): Add getpt.
> * tty.cc (getpt): New function.
> * include/cygwin/stdlib.h [!__STRICT_ANSI__] (getpt): Declare.
> * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
Looks good. Please commit.
Thanks.
cgf
More information about the Cygwin-patches
mailing list