X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=libiberty%2Fpex-win32.c;h=66d2f1157c730ae99e62a2e2b4be20437c43af52;hb=003ea5a89ab7e9eaa65cb158a953d63dac2612c6;hp=8b9d4f04900c5ef556fe6f0a6ce089ae7121e32f;hpb=a0eaec95753c0f093f5cb80080ef423030d35edd;p=platform%2Fupstream%2Fgdb.git diff --git a/libiberty/pex-win32.c b/libiberty/pex-win32.c index 8b9d4f0..66d2f11 100644 --- 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_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, @@ -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, - 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. */ + if (append) + return -1; return _open (name, (_O_WRONLY | _O_CREAT | _O_TRUNC | (binary ? _O_BINARY : _O_TEXT)),