[PATCH] Add getpt(3)

Yaakov (Cygwin/X) yselkowitz@users.sourceforge.net
Fri Dec 30 06:45:00 GMT 2011


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.


Yaakov

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygwin-getpt.patch
Type: text/x-patch
Size: 3197 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20111230/82184284/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: doc-getpt.patch
Type: text/x-patch
Size: 752 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20111230/82184284/attachment-0001.bin>


More information about the Cygwin-patches mailing list