Mercurial > gnulib
changeset 14639:a4506cc8f2da
mkstemps: Ensure declaration on MacOS X 10.5.
* lib/stdlib.in.h: Include <unistd.h> when mkstemps is requested.
* doc/glibc-functions/mkstemps.texi: Document header file problem on
MacOS X.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Thu, 28 Apr 2011 00:06:48 +0200 |
parents | 1f2629ca413e |
children | 6130c2a61e4c |
files | ChangeLog doc/glibc-functions/mkstemps.texi lib/stdlib.in.h |
diffstat | 3 files changed, 13 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Thu Apr 28 00:05:08 2011 +0200 +++ b/ChangeLog Thu Apr 28 00:06:48 2011 +0200 @@ -1,3 +1,10 @@ +2011-04-27 Bruno Haible <bruno@clisp.org> + + mkstemps: Ensure declaration on MacOS X 10.5. + * lib/stdlib.in.h: Include <unistd.h> when mkstemps is requested. + * doc/glibc-functions/mkstemps.texi: Document header file problem on + MacOS X. + 2011-04-27 Bruno Haible <bruno@clisp.org> mkstemp: More documentation.
--- a/doc/glibc-functions/mkstemps.texi Thu Apr 28 00:05:08 2011 +0200 +++ b/doc/glibc-functions/mkstemps.texi Thu Apr 28 00:06:48 2011 +0200 @@ -10,6 +10,10 @@ This function is missing on many non-glibc platforms: glibc 2.10, AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, Interix 3.5, BeOS. +@item +This function is declared in @code{<unistd.h>} instead of @code{<stdlib.h>} +on some platforms: +MacOS X 10.5. @end itemize Portability problems not fixed by Gnulib:
--- a/lib/stdlib.in.h Thu Apr 28 00:05:08 2011 +0200 +++ b/lib/stdlib.in.h Thu Apr 28 00:06:48 2011 +0200 @@ -81,8 +81,9 @@ # endif #endif -#if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) +#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) /* On MacOS X 10.3, only <unistd.h> declares mkstemp. */ +/* On MacOS X 10.5, only <unistd.h> declares mkstemps. */ /* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */ /* But avoid namespace pollution on glibc systems and native Windows. */ # include <unistd.h>