diff options
Diffstat (limited to 'posix/getconf.c')
-rw-r--r-- | posix/getconf.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/posix/getconf.c b/posix/getconf.c index f4f4765..5b67a28 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: |