summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/libiberty/mkstemps.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2010-11-01 19:35:33 +0000
committerdim <dim@FreeBSD.org>2010-11-01 19:35:33 +0000
commit3f5c947f4453c6016a2a6a9636367ee3f48fc6fc (patch)
tree461aafc934d462eb9b9221308f8e25238c0ada62 /contrib/binutils/libiberty/mkstemps.c
parente6be3e7867eb43d220575baee2ce5662fb03e46c (diff)
parentd0f678fa0ff3f08a4eca29daf4d1ac39797b6326 (diff)
downloadFreeBSD-src-3f5c947f4453c6016a2a6a9636367ee3f48fc6fc.zip
FreeBSD-src-3f5c947f4453c6016a2a6a9636367ee3f48fc6fc.tar.gz
Merge ^/vendor/binutils/dist@214571 into contrib/binutils, which brings
us up to version 2.17.50.20070703, at the last GPLv2 commit. Amongst others, this added upstream support for some FreeBSD-specific things that we previously had to manually hack in, such as the OSABI label support, and so on. There are also quite a number of new files, some for cpu's (e.g. SPU) that we may or may not be interested in, but those can be cleaned up later on, if needed.
Diffstat (limited to 'contrib/binutils/libiberty/mkstemps.c')
-rw-r--r--contrib/binutils/libiberty/mkstemps.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/binutils/libiberty/mkstemps.c b/contrib/binutils/libiberty/mkstemps.c
index 89b37d9..6c2e472 100644
--- a/contrib/binutils/libiberty/mkstemps.c
+++ b/contrib/binutils/libiberty/mkstemps.c
@@ -49,6 +49,10 @@ typedef unsigned long gcc_uint64_t;
#define TMP_MAX 16384
#endif
+#ifndef O_BINARY
+# define O_BINARY 0
+#endif
+
/*
@deftypefn Replacement int mkstemps (char *@var{pattern}, int @var{suffix_len})
@@ -119,7 +123,7 @@ mkstemps (char *pattern, int suffix_len)
v /= 62;
XXXXXX[5] = letters[v % 62];
- fd = open (pattern, O_RDWR|O_CREAT|O_EXCL, 0600);
+ fd = open (pattern, O_BINARY|O_RDWR|O_CREAT|O_EXCL, 0600);
if (fd >= 0)
/* The file does not exist. */
return fd;
OpenPOWER on IntegriCloud