1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-09-01 02:34:55 +00:00

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.
This commit is contained in:
Bruno Haible
2011-04-28 00:06:48 +02:00
parent e57376fc22
commit a4e3a1d306
3 changed files with 13 additions and 1 deletions
+7
View File
@@ -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.
+4
View File
@@ -10,6 +10,10 @@ Portability problems fixed by Gnulib:
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:
+2 -1
View File
@@ -81,8 +81,9 @@ struct random_data
# 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>