From 50bbfa997cdf1e76af526569e1e3dbbadd1bdebd Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 18 Feb 2007 15:43:07 +0000 Subject: [PATCH] mkstemp.h is replaced with . --- lib/mkstemp-safer.c | 4 ++-- lib/mkstemp.c | 9 ++++++--- lib/stdlib--.h | 3 +-- m4/mkstemp.m4 | 8 ++++---- modules/mkstemp | 5 +++-- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/lib/mkstemp-safer.c b/lib/mkstemp-safer.c index c8c5bbd6e..ff1c0d484 100644 --- a/lib/mkstemp-safer.c +++ b/lib/mkstemp-safer.c @@ -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 #include "unistd-safer.h" /* Like mkstemp, but do not return STDIN_FILENO, STDOUT_FILENO, or diff --git a/lib/mkstemp.c b/lib/mkstemp.c index 34c9e474c..57ee228e8 100644 --- a/lib/mkstemp.c +++ b/lib/mkstemp.c @@ -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 @@ -17,14 +17,17 @@ #if !_LIBC # include -# include "mkstemp.h" +#endif + +#include + +#if !_LIBC # include "tempname.h" # define __gen_tempname gen_tempname # define __GT_FILE GT_FILE #endif #include -#include #ifndef __GT_FILE # define __GT_FILE 0 diff --git a/lib/stdlib--.h b/lib/stdlib--.h index b43b3dae6..61d6ebe22 100644 --- a/lib/stdlib--.h +++ b/lib/stdlib--.h @@ -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 #include "stdlib-safer.h" -#include "mkstemp.h" #undef mkstemp #define mkstemp mkstemp_safer diff --git a/m4/mkstemp.m4 b/m4/mkstemp.m4 index d2741b9d3..20d8a1b70 100644 --- a/m4/mkstemp.m4 +++ b/m4/mkstemp.m4 @@ -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 diff --git a/modules/mkstemp b/modules/mkstemp index dc77562e7..2e6dcf74b 100644 --- a/modules/mkstemp +++ b/modules/mkstemp @@ -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" + License: GPL -- 2.11.0