diff options
Diffstat (limited to 'posix')
-rw-r--r-- | posix/getconf.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/posix/getconf.c b/posix/getconf.c index 8aaa75b..4c3d917 100644 --- a/posix/getconf.c +++ b/posix/getconf.c @@ -282,11 +282,17 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\ case PATHCONF: if (argc < 3) usage (); + errno = 0; value = pathconf (argv[2], c->call_name); if (value == -1) - error (3, errno, "pathconf: %s", argv[2]); - - printf ("%ld\n", value); + { + if (errno) + error (3, errno, "pathconf: %s", argv[2]); + else + puts (_("undefined")); + } + else + printf ("%ld\n", value); exit (0); case SYSCONF: |