aboutsummaryrefslogtreecommitdiff
path: root/posix/getconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'posix/getconf.c')
-rw-r--r--posix/getconf.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/posix/getconf.c b/posix/getconf.c
index f4f47650b7..5b67a281df 100644
--- a/posix/getconf.c
+++ b/posix/getconf.c
@@ -231,7 +231,14 @@ main (int argc, char *argv[])
if (argc > 2)
usage ();
value = sysconf (c->call_name);
- printf ("%ld\n", value);
+ if (value == -1l)
+ if (c->call_name == _SC_UINT_MAX
+ || c->call_name == _SC_ULONG_MAX)
+ printf ("%lu\n", value);
+ else
+ puts (_("undefined"));
+ else
+ printf ("%ld\n", value);
exit (0);
case CONFSTR: