From 2eb45444a74df5f8d47ba14e318aff2e78a915db Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 4 Mar 1998 17:14:36 +0000 Subject: Update. 1998-03-04 16:12 H.J. Lu * libio/strops.c (_IO_str_seekoff): Handle MODE == 0. 1998-03-04 16:19 Ulrich Drepper * nscd/nscd_getgr_r.c: Follow nscd_getpw_r.c change. 1998-03-04 Andreas Jaeger * nscd/nscd_getpw_r.c (nscd_open_socket): Safe and reset errno so that a failure to connect to nscd doesn't change errno. 1998-03-04 Andreas Jaeger * manual/maint.texi (Reporting Bugs): Change bug-glibc@prep.ai.mit.edu to bug-glibc@gnu.org. * locale/iso-4217.def: Likewise 1998-03-04 12:43 Ulrich Drepper * manual/texinfo.tex: Updated. 1998-03-03 Andreas Schwab * sysdeps/posix/fpathconf.c: Don't modify errno for an undefined value. * sysdeps/posix/pathconf.c: Likewise. * posix/getconf.c: Print `undefined' if pathconf returns -1 without setting errno. 1998-03-04 Ulrich Drepper * sysdeps/unix/sysv/linux/powerpc/dl-sysdep.c: Fix cut&paste problem. * sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h: New file. Patches by Elliot Lee . --- posix/getconf.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'posix') diff --git a/posix/getconf.c b/posix/getconf.c index 8aaa75ba67..4c3d9174ba 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: -- cgit v1.2.3