[libiberty] output empty args as a pair of quotes
writeargv writes out empty arguments in a way that expandargv skips them instead of preserving them. Fixed by writing out a pair of quotes for them. for libiberty/ChangeLog * argv.c (writeargv): Output empty args as "".
This commit is contained in:
parent
f9e84b31df
commit
18193e8f00
|
@ -1,3 +1,7 @@
|
||||||
|
2020-01-23 Alexandre Oliva <oliva@adacore.com>
|
||||||
|
|
||||||
|
* argv.c (writeargv): Output empty args as "".
|
||||||
|
|
||||||
2020-01-01 Jakub Jelinek <jakub@redhat.com>
|
2020-01-01 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
Update copyright years.
|
Update copyright years.
|
||||||
|
|
|
@ -327,6 +327,14 @@ writeargv (char * const *argv, FILE *f)
|
||||||
arg++;
|
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))
|
if (EOF == fputc ('\n', f))
|
||||||
{
|
{
|
||||||
status = 1;
|
status = 1;
|
||||||
|
|
Loading…
Reference in New Issue