/* 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
#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
-/* 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
/* 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
#include <stdlib.h>
#include "stdlib-safer.h"
-#include "mkstemp.h"
#undef mkstemp
#define mkstemp mkstemp_safer
-#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.
# 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],
])
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
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