Ensure we get the mkstemp() declaration. On MacOS X, it comes from <unistd.h>.
authorBruno Haible <bruno@clisp.org>
Sat, 17 Mar 2007 19:02:51 +0000 (19:02 +0000)
committerBruno Haible <bruno@clisp.org>
Sat, 17 Mar 2007 19:02:51 +0000 (19:02 +0000)
ChangeLog
lib/stdlib_.h
modules/stdlib

index 692f1d56bc3b081606c2697875288532ce156968..befb85f9fddfc8117944c2f7a176650df3d4346a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-03-17  Bruno Haible  <bruno@clisp.org>
+
+       * modules/stdlib (Depends-on): Add unistd.
+       * lib/stdlib_.h: Include <unistd.h> if mkstemp is desired.
+       Needed for MacOS X 10.3.
+
 2007-03-17  Bruno Haible  <bruno@clisp.org>
 
        * lib/unistr/u-strdup.h: Include <stdlib.h>.
index 5d43203b7b68b9ec0a1947ecc2d68c2ea71433c4..a9204088e3f3d546405bf8f3c51faf9b950d6f89 100644 (file)
@@ -120,6 +120,9 @@ extern char * mkdtemp (char *template);
    set.  */
 #  define mkstemp rpl_mkstemp
 extern int mkstemp (char *template);
+# else
+/* On MacOS X 10.3, only <unistd.h> declares mkstemp.  */
+#  include <unistd.h>
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef mkstemp
index 6496e0ed144b2a854ff3dfee6369f9d5ceacc0cd..98e1b7d2089918d179f1d6fa7f0e1cfb26f962bc 100644 (file)
@@ -8,6 +8,7 @@ m4/stdlib_h.m4
 Depends-on:
 absolute-header
 link-warning
+unistd
 
 configure.ac:
 gl_STDLIB_H