projects
/
platform
/
upstream
/
gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 7.9
[platform/upstream/gdb.git]
/
libiberty
/
pex-win32.c
diff --git
a/libiberty/pex-win32.c
b/libiberty/pex-win32.c
index
8b9d4f0
..
66d2f11
100644
(file)
--- a/
libiberty/pex-win32.c
+++ b/
libiberty/pex-win32.c
@@
-78,7
+78,7
@@
backslashify (char *s)
}
static int pex_win32_open_read (struct pex_obj *, const char *, int);
}
static int pex_win32_open_read (struct pex_obj *, const char *, int);
-static int pex_win32_open_write (struct pex_obj *, const char *, int);
+static int pex_win32_open_write (struct pex_obj *, const char *, int
, int
);
static pid_t pex_win32_exec_child (struct pex_obj *, int, const char *,
char * const *, char * const *,
int, int, int, int,
static pid_t pex_win32_exec_child (struct pex_obj *, int, const char *,
char * const *, char * const *,
int, int, int, int,
@@
-126,10
+126,12
@@
pex_win32_open_read (struct pex_obj *obj ATTRIBUTE_UNUSED, const char *name,
static int
pex_win32_open_write (struct pex_obj *obj ATTRIBUTE_UNUSED, const char *name,
static int
pex_win32_open_write (struct pex_obj *obj ATTRIBUTE_UNUSED, const char *name,
- int binary)
+ int binary
, int append
)
{
/* Note that we can't use O_EXCL here because gcc may have already
created the temporary file via make_temp_file. */
{
/* Note that we can't use O_EXCL here because gcc may have already
created the temporary file via make_temp_file. */
+ if (append)
+ return -1;
return _open (name,
(_O_WRONLY | _O_CREAT | _O_TRUNC
| (binary ? _O_BINARY : _O_TEXT)),
return _open (name,
(_O_WRONLY | _O_CREAT | _O_TRUNC
| (binary ? _O_BINARY : _O_TEXT)),