aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-11-14 11:56:41 +0000
committerNick Clifton <nickc@redhat.com>2001-11-14 11:56:41 +0000
commita6a256529f6ced31a2b2b8a862e78d92081390b3 (patch)
treed7b0d64249df18fc3c6e167c82ec886c2c81ddad /binutils
parent86017ce9182c6fbf7ac2a6da323366bd765c2536 (diff)
downloadgdb-a6a256529f6ced31a2b2b8a862e78d92081390b3.zip
gdb-a6a256529f6ced31a2b2b8a862e78d92081390b3.tar.gz
gdb-a6a256529f6ced31a2b2b8a862e78d92081390b3.tar.bz2
Replace use of mkstemp with mkstemps, provided by libiberty.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/bucomm.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 66cb990..5216bfa 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2001-11-14 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * bucomm.c (make_tempname): Use mkstemps instead of mkstemp, since
+ not all systems provide mkstemp.
+
2001-11-14 Alan Modra <amodra@bigpond.net.au>
* doc/binutils.texi (objdump): Document x86 -M options.
diff --git a/binutils/bucomm.c b/binutils/bucomm.c
index 8cccd6b..68b191b 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;
}