diff options
author | Eric Blake <ebb9@byu.net> | 2009-11-02 13:19:27 -0700 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2009-11-04 19:07:39 -0700 |
commit | 8eb3f17fc7fd54d63cb8f92cee955b398ce63599 (patch) | |
tree | 58381234d9cc9253f7421eb584f28bb7ea565c64 /lib/mkstemp.c | |
parent | ba79e984f96e1470e583cc1731b2f80da9de9afc (diff) | |
download | gnulib-8eb3f17fc7fd54d63cb8f92cee955b398ce63599.tar.gz |
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 <ebb9@byu.net>
Diffstat (limited to 'lib/mkstemp.c')
-rw-r--r-- | lib/mkstemp.c | 9 |
1 files changed, 6 insertions, 3 deletions
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 <stdio.h> @@ -40,5 +43,5 @@ int mkstemp (template) char *template; { - return __gen_tempname (template, 0, __GT_FILE); + return __gen_tempname (template, 0, 0, __GT_FILE); } |