1999-02-21 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* sysdeps/generic/glob.c (glob): Save previous errno.
+1999-02-21 Andreas Jaeger <aj@arthur.rhein-neckar.de>
+
+ * sysdeps/generic/glob.c (glob): Save previous errno.
+
1999-02-21 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/generic/glob.c (glob): Enlarge buffers for reentrant
size_t pwbuflen = sysconf (_SC_GETPW_R_SIZE_MAX);
char *pwtmpbuf;
struct passwd pwbuf;
+ int save = errno;
if (pwbuflen == -1)
/* `sysconf' does not support _SC_GETPW_R_SIZE_MAX.
}
pwbuflen *= 2;
pwtmpbuf = (char *) __alloca (pwbuflen);
- __set_errno (0);
+ __set_errno (save);
}
# else
p = getpwnam (name);
size_t buflen = sysconf (_SC_GETPW_R_SIZE_MAX);
char *pwtmpbuf;
struct passwd pwbuf;
+ int save = errno;
if (buflen == -1)
/* `sysconf' does not support _SC_GETPW_R_SIZE_MAX. Try a
p = NULL;
break;
}
- pwtmpbuf = __alloca (buflen *= 2);
- __set_errno (0);
+ buflen *= 2;
+ pwtmpbuf = __alloca (buflen);
+ __set_errno (save);
}
# else
p = getpwnam (user_name);