X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fstdlib.in.h;h=d74c2518ba55e48af266cd4298297e249937e91c;hb=ad8f11251eeef41965bd7a358516325238117971;hp=60c10bd0377a174132f8a70603111f2dfb813d4a;hpb=3b7b97813fbb7f37f07f2acb8e0b0106efa3bf93;p=gnulib.git diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index 60c10bd03..d74c2518b 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -67,10 +67,10 @@ struct random_data }; #endif -#if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ +#if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) /* On MacOS X 10.3, only declares mkstemp. */ /* On Cygwin 1.7.1, only declares getsubopt. */ -/* But avoid namespace pollution on glibc systems. */ +/* But avoid namespace pollution on glibc systems and native Windows. */ # include #endif @@ -201,6 +201,22 @@ _GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " # endif #endif +#if @GNULIB_GRANTPT@ +/* Change the ownership and access permission of the slave side of the + pseudo-terminal whose master side is specified by FD. */ +# if !@HAVE_GRANTPT@ +_GL_FUNCDECL_SYS (grantpt, int, (int fd)); +# endif +_GL_CXXALIAS_SYS (grantpt, int, (int fd)); +_GL_CXXALIASWARN (grantpt); +#elif defined GNULIB_POSIXCHECK +# undef grantpt +# if HAVE_RAW_DECL_GRANTPT +_GL_WARN_ON_USE (ptsname, "grantpt is not portable - " + "use gnulib module grantpt for portability"); +# endif +#endif + #if @GNULIB_MALLOC_POSIX@ # if !@HAVE_MALLOC_POSIX@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) @@ -313,6 +329,9 @@ _GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " _GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); _GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/)); # else +# if ! @HAVE_MKSTEMP@ +_GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); +# endif _GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/)); # endif _GL_CXXALIASWARN (mkstemp); @@ -622,6 +641,22 @@ _GL_WARN_ON_USE (strtoull, "strtoull is unportable - " # endif #endif +#if @GNULIB_UNLOCKPT@ +/* Unlock the slave side of the pseudo-terminal whose master side is specified + by FD, so that it can be opened. */ +# if !@HAVE_UNLOCKPT@ +_GL_FUNCDECL_SYS (unlockpt, int, (int fd)); +# endif +_GL_CXXALIAS_SYS (unlockpt, int, (int fd)); +_GL_CXXALIASWARN (unlockpt); +#elif defined GNULIB_POSIXCHECK +# undef unlockpt +# if HAVE_RAW_DECL_UNLOCKPT +_GL_WARN_ON_USE (ptsname, "unlockpt is not portable - " + "use gnulib module unlockpt for portability"); +# endif +#endif + #if @GNULIB_UNSETENV@ /* Remove the variable NAME from the environment. */ # if @REPLACE_UNSETENV@