summaryrefslogtreecommitdiff
path: root/libiberty/argv.c
diff options
context:
space:
mode:
Diffstat (limited to 'libiberty/argv.c')
-rw-r--r--libiberty/argv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libiberty/argv.c b/libiberty/argv.c
index 8c9794db6a2..6a72208d845 100644
--- a/libiberty/argv.c
+++ b/libiberty/argv.c
@@ -327,6 +327,14 @@ writeargv (char * const *argv, FILE *f)
arg++;
}
+ /* Write out a pair of quotes for an empty argument. */
+ if (arg == *argv)
+ if (EOF == fputs ("\"\"", f))
+ {
+ status = 1;
+ goto done;
+ }
+
if (EOF == fputc ('\n', f))
{
status = 1;