summaryrefslogtreecommitdiff
path: root/sysdeps/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-03-04 17:14:36 +0000
committerUlrich Drepper <drepper@redhat.com>1998-03-04 17:14:36 +0000
commit2eb45444a74df5f8d47ba14e318aff2e78a915db (patch)
tree25bd570a73d217b7ed478e43398b341372e87dcd /sysdeps/posix
parentea7eb7e3eb09a7f9444e0c599fdbafaadb3e391d (diff)
Update.
1998-03-04 16:12 H.J. Lu <hjl@gnu.org> * libio/strops.c (_IO_str_seekoff): Handle MODE == 0. 1998-03-04 16:19 Ulrich Drepper <drepper@cygnus.com> * nscd/nscd_getgr_r.c: Follow nscd_getpw_r.c change. 1998-03-04 Andreas Jaeger <aj@arthur.rhein-neckar.de> * 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 <aj@arthur.rhein-neckar.de> * 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 <drepper@cygnus.com> * manual/texinfo.tex: Updated. 1998-03-03 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * 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 <drepper@cygnus.com> * 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 <sopwith@cuc.edu>.
Diffstat (limited to 'sysdeps/posix')
-rw-r--r--sysdeps/posix/fpathconf.c20
-rw-r--r--sysdeps/posix/pathconf.c20
2 files changed, 18 insertions, 22 deletions
diff --git a/sysdeps/posix/fpathconf.c b/sysdeps/posix/fpathconf.c
index 1a2c3742e9..31e1d4bbfa 100644
--- a/sysdeps/posix/fpathconf.c
+++ b/sysdeps/posix/fpathconf.c
@@ -45,7 +45,6 @@ __fpathconf (fd, name)
#ifdef LINK_MAX
return LINK_MAX;
#else
- __set_errno (ENOSYS);
return -1;
#endif
@@ -53,7 +52,6 @@ __fpathconf (fd, name)
#ifdef MAX_CANON
return MAX_CANON;
#else
- __set_errno (ENOSYS);
return -1;
#endif
@@ -61,7 +59,6 @@ __fpathconf (fd, name)
#ifdef MAX_INPUT
return MAX_INPUT;
#else
- __set_errno (ENOSYS);
return -1;
#endif
@@ -69,14 +66,21 @@ __fpathconf (fd, name)
#ifdef NAME_MAX
{
struct statfs buf;
+ int save_errno = errno;
if (__fstatfs (fd, &buf) < 0)
- return errno == ENOSYS ? NAME_MAX : -1;
+ {
+ if (errno == ENOSYS)
+ {
+ errno = save_errno;
+ return NAME_MAX;
+ }
+ return -1;
+ }
else
return buf.f_namelen;
}
#else
- __set_errno (ENOSYS);
return -1;
#endif
@@ -84,7 +88,6 @@ __fpathconf (fd, name)
#ifdef PATH_MAX
return PATH_MAX;
#else
- __set_errno (ENOSYS);
return -1;
#endif
@@ -92,7 +95,6 @@ __fpathconf (fd, name)
#ifdef PIPE_BUF
return PIPE_BUF;
#else
- __set_errno (ENOSYS);
return -1;
#endif
@@ -142,13 +144,9 @@ __fpathconf (fd, name)
#ifdef SOCK_MAXBUF
return SOCK_MAXBUF;
#else
- __set_errno (ENOSYS);
return -1;
#endif
}
-
- __set_errno (ENOSYS);
- return -1;
}
weak_alias (__fpathconf, fpathconf)
diff --git a/sysdeps/posix/pathconf.c b/sysdeps/posix/pathconf.c
index c06906679d..fe2ac8d905 100644
--- a/sysdeps/posix/pathconf.c
+++ b/sysdeps/posix/pathconf.c
@@ -43,7 +43,6 @@ __pathconf (const char *path, int name)
#ifdef LINK_MAX
return LINK_MAX;
#else
- __set_errno (ENOSYS);
return -1;
#endif
@@ -51,7 +50,6 @@ __pathconf (const char *path, int name)
#ifdef MAX_CANON
return MAX_CANON;
#else
- __set_errno (ENOSYS);
return -1;
#endif
@@ -59,7 +57,6 @@ __pathconf (const char *path, int name)
#ifdef MAX_INPUT
return MAX_INPUT;
#else
- __set_errno (ENOSYS);
return -1;
#endif
@@ -67,14 +64,21 @@ __pathconf (const char *path, int name)
#ifdef NAME_MAX
{
struct statfs buf;
+ int save_errno = errno;
if (__statfs (path, &buf) < 0)
- return errno == ENOSYS ? NAME_MAX : -1;
+ {
+ if (errno == ENOSYS)
+ {
+ errno = save_errno;
+ return NAME_MAX;
+ }
+ return -1;
+ }
else
return buf.f_namelen;
}
#else
- __set_errno (ENOSYS);
return -1;
#endif
@@ -82,7 +86,6 @@ __pathconf (const char *path, int name)
#ifdef PATH_MAX
return PATH_MAX;
#else
- __set_errno (ENOSYS);
return -1;
#endif
@@ -90,7 +93,6 @@ __pathconf (const char *path, int name)
#ifdef PIPE_BUF
return PIPE_BUF;
#else
- __set_errno (ENOSYS);
return -1;
#endif
@@ -140,13 +142,9 @@ __pathconf (const char *path, int name)
#ifdef SOCK_MAXBUF
return SOCK_MAXBUF;
#else
- __set_errno (ENOSYS);
return -1;
#endif
}
-
- __set_errno (ENOSYS);
- return -1;
}
weak_alias (__pathconf, pathconf)