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 692f1d5..befb85f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 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>.
 
 2007-03-17  Bruno Haible  <bruno@clisp.org>
index 5d43203..a920408 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 6496e0e..98e1b7d 100644 (file)
@@ -8,6 +8,7 @@ m4/stdlib_h.m4
 Depends-on:
 absolute-header
 link-warning
+unistd
 
 configure.ac:
 gl_STDLIB_H