This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add getpt(3)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]