mkstemp.h is replaced with <stdlib.h>.
authorBruno Haible <bruno@clisp.org>
Sun, 18 Feb 2007 15:43:07 +0000 (15:43 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 18 Feb 2007 15:43:07 +0000 (15:43 +0000)
lib/mkstemp-safer.c
lib/mkstemp.c
lib/stdlib--.h
m4/mkstemp.m4
modules/mkstemp

index c8c5bbd..ff1c0d4 100644 (file)
@@ -1,6 +1,6 @@
 /* Invoke mkstemp, but avoid some glitches.
 
-   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
 
 #include "stdlib-safer.h"
 
-#include "mkstemp.h"
+#include <stdlib.h>
 #include "unistd-safer.h"
 
 /* Like mkstemp, but do not return STDIN_FILENO, STDOUT_FILENO, or
index 34c9e47..57ee228 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2001, 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 1999, 2001, 2005, 2006, 2007 Free Software Foundation, Inc.
    This file is derived from the one in the GNU C Library.
 
    This program is free software; you can redistribute it and/or modify
 
 #if !_LIBC
 # include <config.h>
-# include "mkstemp.h"
+#endif
+
+#include <stdlib.h>
+
+#if !_LIBC
 # include "tempname.h"
 # define __gen_tempname gen_tempname
 # define __GT_FILE GT_FILE
 #endif
 
 #include <stdio.h>
-#include <stdlib.h>
 
 #ifndef __GT_FILE
 # define __GT_FILE 0
index b43b3da..61d6ebe 100644 (file)
@@ -1,6 +1,6 @@
 /* Like stdlib.h, but redefine some names to avoid glitches.
 
-   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -21,6 +21,5 @@
 #include <stdlib.h>
 #include "stdlib-safer.h"
 
-#include "mkstemp.h"
 #undef mkstemp
 #define mkstemp mkstemp_safer
index d2741b9..20d8a1b 100644 (file)
@@ -1,6 +1,6 @@
-#serial 16
+#serial 17
 
-# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -13,6 +13,7 @@
 # On systems like the above, arrange to use the replacement function.
 AC_DEFUN([gl_FUNC_MKSTEMP],
 [
+  AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
   AC_REQUIRE([AC_SYS_LARGEFILE])
 
   AC_CACHE_CHECK([for working mkstemp],
@@ -43,8 +44,7 @@ AC_DEFUN([gl_FUNC_MKSTEMP],
     ])
 
   if test $gl_cv_func_working_mkstemp != yes; then
-    AC_DEFINE([__MKSTEMP_PREFIX], [[rpl_]],
-      [Define to rpl_ if the mkstemp replacement function should be used.])
+    REPLACE_MKSTEMP=1
     AC_LIBOBJ([mkstemp])
     gl_PREREQ_MKSTEMP
   fi
index dc77562..2e6dcf7 100644 (file)
@@ -2,21 +2,22 @@ Description:
 mkstemp() function: create a private temporary file.
 
 Files:
-lib/mkstemp.h
 lib/mkstemp.c
 m4/mkstemp.m4
 
 Depends-on:
 extensions
+stdlib
 tempname
 
 configure.ac:
 gl_FUNC_MKSTEMP
+gl_STDLIB_MODULE_INDICATOR([mkstemp])
 
 Makefile.am:
 
 Include:
-"mkstemp.h"
+<stdlib.h>
 
 License:
 GPL