X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=libiberty%2Fpex-djgpp.c;h=b014ffa33177a20b9669e465771b8a0fbd866b37;hb=c88960d081f0b37ec03c66a13115e2a68e40d1ad;hp=bd279380daec881e2355a8dc337d3e08bf963923;hpb=29d89e071e7c7d0ea3b13eb883e44498d8390aa0;p=deliverable%2Fbinutils-gdb.git diff --git a/libiberty/pex-djgpp.c b/libiberty/pex-djgpp.c index bd279380da..b014ffa331 100644 --- a/libiberty/pex-djgpp.c +++ b/libiberty/pex-djgpp.c @@ -43,13 +43,13 @@ extern int errno; #endif static int pex_djgpp_open_read (struct pex_obj *, const char *, int); -static int pex_djgpp_open_write (struct pex_obj *, const char *, int); +static int pex_djgpp_open_write (struct pex_obj *, const char *, int, int); static pid_t pex_djgpp_exec_child (struct pex_obj *, int, const char *, char * const *, char * const *, int, int, int, int, const char **, int *); static int pex_djgpp_close (struct pex_obj *, int); -static int pex_djgpp_wait (struct pex_obj *, pid_t, int *, struct pex_time *, +static pid_t pex_djgpp_wait (struct pex_obj *, pid_t, int *, struct pex_time *, int, const char **, int *); /* The list of functions we pass to the common routines. */ @@ -90,10 +90,12 @@ pex_djgpp_open_read (struct pex_obj *obj ATTRIBUTE_UNUSED, static int pex_djgpp_open_write (struct pex_obj *obj ATTRIBUTE_UNUSED, - const char *name, int binary) + const char *name, 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)), @@ -276,7 +278,7 @@ pex_djgpp_exec_child (struct pex_obj *obj, int flags, const char *executable, has already completed, and we just need to return the exit status. */ -static int +static pid_t pex_djgpp_wait (struct pex_obj *obj, pid_t pid, int *status, struct pex_time *time, int done ATTRIBUTE_UNUSED, const char **errmsg ATTRIBUTE_UNUSED,