From: Nick Clifton Date: Wed, 14 Nov 2001 11:56:41 +0000 (+0000) Subject: Replace use of mkstemp with mkstemps, provided by libiberty. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a6a256529f6ced31a2b2b8a862e78d92081390b3;p=binutils-gdb.git Replace use of mkstemp with mkstemps, provided by libiberty. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 66cb9908a1d..5216bfa281d 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2001-11-14 Nick Clifton + + * bucomm.c (make_tempname): Use mkstemps instead of mkstemp, since + not all systems provide mkstemp. + 2001-11-14 Alan Modra * doc/binutils.texi (objdump): Document x86 -M options. diff --git a/binutils/bucomm.c b/binutils/bucomm.c index 8cccd6b3dee..68b191b7210 100644 --- a/binutils/bucomm.c +++ b/binutils/bucomm.c @@ -35,6 +35,9 @@ typedef long time_t; #endif #endif + +/* Ought to be defined in libiberty.h... */ +extern int mkstemps PARAMS ((char *, int)); /* Error reporting */ @@ -233,14 +236,14 @@ make_tempname (filename) #endif strcat (tmpname, "/"); strcat (tmpname, template); - close (mkstemp (tmpname)); + close (mkstemps (tmpname, 0)); *slash = c; } else { tmpname = xmalloc (sizeof (template)); strcpy (tmpname, template); - close (mkstemp (tmpname)); + close (mkstemps (tmpname, 0)); } return tmpname; }