mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-31 19:40:33 +08:00
Cygwin: getconf: align -a output to glibc getconf
glibc getconf doesn't print "undefined" for undefined values in -a output. It just prints the empty string. Do it the same way. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
fcec4830ab
commit
35ba7d147d
@ -481,7 +481,7 @@ printvar (const struct conf_variable *cp, const char *pathname)
|
|||||||
{
|
{
|
||||||
if (a_flag && errno != 0)
|
if (a_flag && errno != 0)
|
||||||
return; /* Just skip invalid variables */
|
return; /* Just skip invalid variables */
|
||||||
print_strvar (cp->name, "undefined");
|
print_strvar (cp->name, a_flag ? "" : "undefined");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
print_longvar (cp->name, val);
|
print_longvar (cp->name, val);
|
||||||
@ -493,7 +493,7 @@ printvar (const struct conf_variable *cp, const char *pathname)
|
|||||||
{
|
{
|
||||||
if (a_flag && errno != 0)
|
if (a_flag && errno != 0)
|
||||||
return; /* Just skip invalid variables */
|
return; /* Just skip invalid variables */
|
||||||
print_strvar (cp->name, "undefined");
|
print_strvar (cp->name, a_flag ? "" : "undefined");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
print_longvar (cp->name, val);
|
print_longvar (cp->name, val);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user