X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=lib%2Fstdlib.in.h;h=9ac7199568313654112f9d5b4fbfa669a38460a6;hp=f99767f600f6c721671db6f74b5ce79c59c28d1a;hb=cff51866dd4b4de7b2f70676fa26b31c31e216d7;hpb=227daa74150e58de8a941f9c8e1f4f9f4035d1c3 diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h index f99767f6..9ac71995 100644 --- a/lib/stdlib.in.h +++ b/lib/stdlib.in.h @@ -35,6 +35,8 @@ #ifndef _GL_STDLIB_H #define _GL_STDLIB_H +/* NetBSD 5.0 mis-defines NULL. */ +#include /* Solaris declares getloadavg() in . */ #if @GNULIB_GETLOADAVG@ && @HAVE_SYS_LOADAVG_H@ @@ -205,6 +207,31 @@ extern char * mkdtemp (char * /*template*/); #endif +#if @GNULIB_MKOSTEMP@ +# if !@HAVE_MKOSTEMP@ +/* Create a unique temporary file from TEMPLATE. + The last six characters of TEMPLATE must be "XXXXXX"; + they are replaced with a string that makes the file name unique. + The flags are a bitmask, possibly including O_CLOEXEC (defined in ) + and O_TEXT, O_BINARY (defined in "binary-io.h"). + The file is then created, with the specified flags, ensuring it didn't exist + before. + The file is created read-write (mask at least 0600 & ~umask), but it may be + world-readable and world-writable (mask 0666 & ~umask), depending on the + implementation. + Returns the open file descriptor if successful, otherwise -1 and errno + set. */ +extern int mkostemp (char * /*template*/, int /*flags*/); +# endif +#elif defined GNULIB_POSIXCHECK +# undef mkostemp +# define mkostemp(t,f) \ + (GL_LINK_WARNING ("mkostemp is unportable - " \ + "use gnulib module mkostemp for portability"), \ + mkostemp (t, f)) +#endif + + #if @GNULIB_MKSTEMP@ # if @REPLACE_MKSTEMP@ /* Create a unique temporary file from TEMPLATE.