From 8eb3f17fc7fd54d63cb8f92cee955b398ce63599 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 2 Nov 2009 13:19:27 -0700 Subject: tempname: resync from glibc * lib/tempname.c (__gen_tempname): Add suffixlen argument. Use same values for __GT_FILE as glibc. Abort even when assertions are disabled. * lib/tempname.h (GT_FILE): Use glibc __GT_FILE, if available, and match its value otherwise. Allow idempotent inclusion. * lib/mkdtemp.c (mkdtemp): Adjust caller. * lib/mkostemp.c (mkostemp): Likewise. * lib/mkstemp.c (mkstemp): Likewise. * lib/tmpfile.c (tmpfile): Likewise. * NEWS: Document this. Signed-off-by: Eric Blake --- lib/mkstemp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lib/mkstemp.c') diff --git a/lib/mkstemp.c b/lib/mkstemp.c index ccf7a7beed..684c98331c 100644 --- a/lib/mkstemp.c +++ b/lib/mkstemp.c @@ -1,4 +1,5 @@ -/* Copyright (C) 1998, 1999, 2001, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. +/* Copyright (C) 1998, 1999, 2001, 2005, 2006, 2007, 2009 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 @@ -23,7 +24,9 @@ #if !_LIBC # include "tempname.h" # define __gen_tempname gen_tempname -# define __GT_FILE GT_FILE +# ifndef __GT_FILE +# define __GT_FILE GT_FILE +# endif #endif #include @@ -40,5 +43,5 @@ int mkstemp (template) char *template; { - return __gen_tempname (template, 0, __GT_FILE); + return __gen_tempname (template, 0, 0, __GT_FILE); } -- cgit v1.2.1