projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git]
/
libiberty
/
pex-win32.c
diff --git
a/libiberty/pex-win32.c
b/libiberty/pex-win32.c
index 8b9d4f04900c5ef556fe6f0a6ce089ae7121e32f..331067b5078347912bc3828186629a52244aa1b9 100644
(file)
--- a/
libiberty/pex-win32.c
+++ b/
libiberty/pex-win32.c
@@
-1,7
+1,6
@@
/* Utilities to execute a program in a subprocess (possibly linked by pipes
with other subprocesses), and wait for it. Generic Win32 specialization.
/* Utilities to execute a program in a subprocess (possibly linked by pipes
with other subprocesses), and wait for it. Generic Win32 specialization.
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006
- Free Software Foundation, Inc.
+ Copyright (C) 1996-2020 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
@@
-78,7
+77,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
+125,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)),
@@
-368,6
+369,8
@@
argv_to_cmdline (char *const *argv)
cmdline_len++;
}
}
cmdline_len++;
}
}
+ if (j == 0)
+ needs_quotes = 1;
/* Trailing backslashes also need to be escaped because they will be
followed by the terminating quote. */
if (needs_quotes)
/* Trailing backslashes also need to be escaped because they will be
followed by the terminating quote. */
if (needs_quotes)
@@
-392,6
+395,8
@@
argv_to_cmdline (char *const *argv)
break;
}
}
break;
}
}
+ if (j == 0)
+ needs_quotes = 1;
if (needs_quotes)
{
if (needs_quotes)
{
This page took
0.02507 seconds
and
4
git commands to generate.