aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1998-08-18 23:27:30 +0000
committerUlrich Drepper <drepper@redhat.com>1998-08-18 23:27:30 +0000
commit0c6cee5d656d933100b86b7d58803bdbd549e456 (patch)
tree9fe94f38351584e600d19b26893b957fabf37715
parenteedbbe588f893e8bd93e65617d3fd98e172a3569 (diff)
downloadglibc-0c6cee5d656d933100b86b7d58803bdbd549e456.tar.xz
glibc-0c6cee5d656d933100b86b7d58803bdbd549e456.zip
Update.
1998-08-18 Ulrich Drepper <drepper@cygnus.com> * include/features.h: Define __USE_EXTERN_INLINES for recent enough gcc. * argp/argp.h: Define extern inline functions only if __USE_EXTERN_INLINES is defined. * libio/stdio.h: Likewise. * math/math.h: Likewise. * stdlib/stdlib.h: Likewise. * string/argz.h: Likewise. * sysdeps/generic/bits/sigset.h: Likewise. * sysdeps/unix/sysv/linux/bits/sigset.h: Likewise. * sysdeps/unix/sysv/sysv4/bits/sigset.h: Likewise. * sysdeps/wordsize-32/inttypes.h: Likewise. * sysdeps/wordsize-64/inttypes.h: Likewise. * wcsmbs/wchar.h: Likewise. * sysdeps/generic/bits/glob.c [_LIBC]: Define __stat using __xstat to allow compilation without optimization. 1998-08-14 Thorsten Kukuk <kukuk@vt.uni-paderborn.de> * nis/nss_compat/compat-grp.c: Set errno to ENOENT if we have no more entries. * nis/nss_compat/compat-initgroups.c: Likewise. * nis/nss_compat/compat-pwd.c: Likewise. * nis/nss_compat/compat-spwd.c: Likewise. * nis/nss_nis/nis-alias.c: Likewise. * nis/nss_nis/nis-ethers.c: Likewise. * nis/nss_nis/nis-grp.c: Likewise. * nis/nss_nis/nis-hosts.c: Likewise. * nis/nss_nis/nis-initgroups.c: Likewise. * nis/nss_nis/nis-network.c: Likewise. * nis/nss_nis/nis-proto.c: Likewise. * nis/nss_nis/nis-pwd.c: Likewise. * nis/nss_nis/nis-rpc.c: Likewise. * nis/nss_nis/nis-service.c: Likewise. * nis/nss_nis/nis-spwd.c: Likewise. * nis/rpcsvc/yp.h: Generate new without 1024 byte limits. * nis/ypclnt.c: Try binding dir only first time, could be to old. * nis/yp_xdr.c: Remove 1024 byte limit. * nis/ypupdate_xdr.c: Likewise. * nis/nss_nis/nis-publickey.c: Make sure, nobody could send wrong data.
-rw-r--r--ChangeLog49
-rw-r--r--argp/argp.h4
-rw-r--r--bits/sigset.h8
-rw-r--r--libio/stdio.h32
-rw-r--r--math/math.h2
-rw-r--r--nis/nss_compat/compat-grp.c27
-rw-r--r--nis/nss_compat/compat-initgroups.c17
-rw-r--r--nis/nss_compat/compat-pwd.c32
-rw-r--r--nis/nss_compat/compat-spwd.c28
-rw-r--r--nis/nss_nis/nis-alias.c4
-rw-r--r--nis/nss_nis/nis-ethers.c16
-rw-r--r--nis/nss_nis/nis-grp.c24
-rw-r--r--nis/nss_nis/nis-hosts.c1
-rw-r--r--nis/nss_nis/nis-initgroups.c5
-rw-r--r--nis/nss_nis/nis-network.c23
-rw-r--r--nis/nss_nis/nis-proto.c25
-rw-r--r--nis/nss_nis/nis-publickey.c26
-rw-r--r--nis/nss_nis/nis-pwd.c24
-rw-r--r--nis/nss_nis/nis-rpc.c21
-rw-r--r--nis/nss_nis/nis-service.c17
-rw-r--r--nis/nss_nis/nis-spwd.c15
-rw-r--r--nis/rpcsvc/yp.h566
-rw-r--r--nis/yp_xdr.c386
-rw-r--r--nis/ypclnt.c4
-rw-r--r--nis/ypupdate_xdr.c46
-rw-r--r--stdlib/stdlib.h5
-rw-r--r--string/argz.h4
-rw-r--r--sysdeps/generic/bits/sigset.h8
-rw-r--r--sysdeps/generic/glob.c1
-rw-r--r--sysdeps/unix/sysv/linux/bits/sigset.h6
-rw-r--r--sysdeps/unix/sysv/sysv4/bits/sigset.h8
-rw-r--r--sysdeps/wordsize-32/inttypes.h4
-rw-r--r--sysdeps/wordsize-64/inttypes.h4
-rw-r--r--wcsmbs/wchar.h2
34 files changed, 665 insertions, 779 deletions
diff --git a/ChangeLog b/ChangeLog
index 982f148016..2f51192fd7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,52 @@
+1998-08-18 Ulrich Drepper <drepper@cygnus.com>
+
+ * include/features.h: Define __USE_EXTERN_INLINES for recent
+ enough gcc.
+ * argp/argp.h: Define extern inline functions only if
+ __USE_EXTERN_INLINES is defined.
+ * libio/stdio.h: Likewise.
+ * math/math.h: Likewise.
+ * stdlib/stdlib.h: Likewise.
+ * string/argz.h: Likewise.
+ * sysdeps/generic/bits/sigset.h: Likewise.
+ * sysdeps/unix/sysv/linux/bits/sigset.h: Likewise.
+ * sysdeps/unix/sysv/sysv4/bits/sigset.h: Likewise.
+ * sysdeps/wordsize-32/inttypes.h: Likewise.
+ * sysdeps/wordsize-64/inttypes.h: Likewise.
+ * wcsmbs/wchar.h: Likewise.
+
+ * sysdeps/generic/bits/glob.c [_LIBC]: Define __stat using __xstat
+ to allow compilation without optimization.
+
+1998-08-14 Thorsten Kukuk <kukuk@vt.uni-paderborn.de>
+
+ * nis/nss_compat/compat-grp.c: Set errno to ENOENT if we have no
+ more entries.
+ * nis/nss_compat/compat-initgroups.c: Likewise.
+ * nis/nss_compat/compat-pwd.c: Likewise.
+ * nis/nss_compat/compat-spwd.c: Likewise.
+ * nis/nss_nis/nis-alias.c: Likewise.
+ * nis/nss_nis/nis-ethers.c: Likewise.
+ * nis/nss_nis/nis-grp.c: Likewise.
+ * nis/nss_nis/nis-hosts.c: Likewise.
+ * nis/nss_nis/nis-initgroups.c: Likewise.
+ * nis/nss_nis/nis-network.c: Likewise.
+ * nis/nss_nis/nis-proto.c: Likewise.
+ * nis/nss_nis/nis-pwd.c: Likewise.
+ * nis/nss_nis/nis-rpc.c: Likewise.
+ * nis/nss_nis/nis-service.c: Likewise.
+ * nis/nss_nis/nis-spwd.c: Likewise.
+
+ * nis/rpcsvc/yp.h: Generate new without 1024 byte limits.
+
+ * nis/ypclnt.c: Try binding dir only first time, could be to old.
+
+ * nis/yp_xdr.c: Remove 1024 byte limit.
+ * nis/ypupdate_xdr.c: Likewise.
+
+ * nis/nss_nis/nis-publickey.c: Make sure, nobody could send
+ wrong data.
+
1998-08-18 Roland McGrath <roland@baalperazim.frob.com>
* Rules (binaries-static, binaries-shared static pattern rules):
diff --git a/argp/argp.h b/argp/argp.h
index 780c45f69c..8b6485e80e 100644
--- a/argp/argp.h
+++ b/argp/argp.h
@@ -521,7 +521,7 @@ extern void *_argp_input __P ((__const struct argp *argp,
extern void *__argp_input __P ((__const struct argp *argp,
__const struct argp_state *state));
-#ifdef __OPTIMIZE__
+#ifdef __USE_EXTERN_INLINES
# if !_LIBC
# define __argp_usage argp_usage
@@ -564,7 +564,7 @@ __option_is_end (__const struct argp_option *__opt)
# undef __option_is_short
# undef __option_is_end
# endif
-#endif /* __OPTIMIZE__ */
+#endif /* Use extern inlines. */
#ifdef __cplusplus
}
diff --git a/bits/sigset.h b/bits/sigset.h
index c442d53643..a57458dd28 100644
--- a/bits/sigset.h
+++ b/bits/sigset.h
@@ -38,7 +38,7 @@ typedef unsigned long int __sigset_t;
#define _SIGSET_H_fns 1
#ifndef _EXTERN_INLINE
-#define _EXTERN_INLINE extern __inline
+# define _EXTERN_INLINE extern __inline
#endif
/* Return a mask that includes SIG only. The cast to `sigset_t' avoids
@@ -63,7 +63,8 @@ extern int __sigismember (__const __sigset_t *, int);
extern int __sigaddset (__sigset_t *, int);
extern int __sigdelset (__sigset_t *, int);
-#define __SIGSETFN(NAME, BODY, CONST) \
+#ifdef __USE_EXTERN_INLINES
+# define __SIGSETFN(NAME, BODY, CONST) \
_EXTERN_INLINE int \
NAME (CONST __sigset_t *__set, int __sig) \
{ \
@@ -75,7 +76,8 @@ __SIGSETFN (__sigismember, (*__set & __mask) ? 1 : 0, __const)
__SIGSETFN (__sigaddset, ((*__set |= __mask), 0), )
__SIGSETFN (__sigdelset, ((*__set &= ~__mask), 0), )
-#undef __SIGSETFN
+# undef __SIGSETFN
+#endif
#endif /* ! _SIGSET_H_fns. */
diff --git a/libio/stdio.h b/libio/stdio.h
index e7b167d848..4d01061b3e 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -279,13 +279,13 @@ extern int vsprintf __P ((char *__restrict __s,
__const char *__restrict __format,
_G_va_list __arg));
-#if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
+#ifdef __USE_EXTERN_INLINES
__STDIO_INLINE int
vprintf (__const char *__restrict __fmt, _G_va_list __arg)
{
return vfprintf (stdout, __fmt, __arg);
}
-#endif /* Optimizing. */
+#endif /* Use extern inlines. */
#if defined __USE_BSD || defined __USE_ISOC9X || defined __USE_UNIX98
/* Maximum chars of output to write in MAXLEN. */
@@ -368,20 +368,20 @@ extern int getchar __P ((void));
optimization for it. */
#define getc(_fp) _IO_getc (_fp)
-#if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
+#ifdef __USE_EXTERN_INLINES
__STDIO_INLINE int
getchar (void)
{
return _IO_getc (stdin);
}
-#endif /* Optimizing. */
+#endif /* Use extern inlines. */
#if defined __USE_POSIX || defined __USE_MISC
/* These are defined in POSIX.1:1996. */
extern int getc_unlocked __P ((FILE *__stream));
extern int getchar_unlocked __P ((void));
-# ifdef __OPTIMIZE__
+# ifdef __USE_EXTERN_INLINES
__STDIO_INLINE int
getc_unlocked (FILE *__fp)
{
@@ -393,7 +393,7 @@ getchar_unlocked (void)
{
return _IO_getc_unlocked (stdin);
}
-# endif /* Optimizing. */
+# endif /* Use extern inlines. */
#endif /* Use POSIX or MISC. */
@@ -408,25 +408,25 @@ extern int putchar __P ((int __c));
so we always do the optimization for it. */
#define putc(_ch, _fp) _IO_putc (_ch, _fp)
-#if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
+#ifdef __USE_EXTERN_INLINES
__STDIO_INLINE int
putchar (int __c)
{
return _IO_putc (__c, stdout);
}
-#endif
+#endif /* Use extern inlines. */
#ifdef __USE_MISC
/* Faster version when locking is not necessary. */
extern int fputc_unlocked __P ((int __c, FILE *__stream));
-# ifdef __OPTIMIZE__
+# ifdef __USE_EXTERN_INLINES
__STDIO_INLINE int
fputc_unlocked (int __c, FILE *__stream)
{
return _IO_putc_unlocked (__c, __stream);
}
-# endif /* Optimizing. */
+# endif /* Use extern inlines. */
#endif /* Use MISC. */
#if defined __USE_POSIX || defined __USE_MISC
@@ -434,7 +434,7 @@ fputc_unlocked (int __c, FILE *__stream)
extern int putc_unlocked __P ((int __c, FILE *__stream));
extern int putchar_unlocked __P ((int __c));
-# ifdef __OPTIMIZE__
+# ifdef __USE_EXTERN_INLINES
__STDIO_INLINE int
putc_unlocked (int __c, FILE *__stream)
{
@@ -446,7 +446,7 @@ putchar_unlocked (int __c)
{
return _IO_putc_unlocked (__c, stdout);
}
-# endif /* Optimizing. */
+# endif /* Use extern inlines. */
#endif /* Use POSIX or MISC. */
@@ -489,13 +489,13 @@ extern _IO_ssize_t getdelim __P ((char **__lineptr, size_t *__n,
extern _IO_ssize_t getline __P ((char **__lineptr, size_t *__n,
FILE *__stream));
-# if defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
+# ifdef __USE_EXTERN_INLINES
__STDIO_INLINE _IO_ssize_t
getline (char **__lineptr, size_t *__n, FILE *__stream)
{
return __getdelim (__lineptr, __n, '\n', __stream);
}
-# endif /* Optimizing. */
+# endif /* Use extern inlines. */
#endif
@@ -614,7 +614,7 @@ extern void clearerr_unlocked __P ((FILE *__stream));
extern int feof_unlocked __P ((FILE *__stream));
extern int ferror_unlocked __P ((FILE *__stream));
-# ifdef __OPTIMIZE__
+# ifdef __USE_EXTERN_INLINES
__STDIO_INLINE int
feof_unlocked (FILE *__stream)
{
@@ -626,7 +626,7 @@ ferror_unlocked (FILE *__stream)
{
return _IO_ferror_unlocked (__stream);
}
-# endif /* Optimizing. */
+# endif /* Use extern inlines. */
#endif
diff --git a/math/math.h b/math/math.h
index 2ac6f11032..5381f29e9a 100644
--- a/math/math.h
+++ b/math/math.h
@@ -306,7 +306,7 @@ extern int matherr __P ((struct exception *__exc));
/* Get machine-dependent inline versions (if there are any). */
-#ifdef __OPTIMIZE__
+#ifdef __USE_EXTERN_INLINES
# include <bits/mathinline.h>
#endif
diff --git a/nis/nss_compat/compat-grp.c b/nis/nss_compat/compat-grp.c
index ca5abc4d2c..3ef2039e84 100644
--- a/nis/nss_compat/compat-grp.c
+++ b/nis/nss_compat/compat-grp.c
@@ -246,6 +246,7 @@ getgrent_next_nis (struct group *result, ent_t *ent, char *buffer,
if (yp_get_default_domain (&domain) != YPERR_SUCCESS)
{
ent->nis = 0;
+ *errnop = ENOENT;
return NSS_STATUS_NOTFOUND;
}
@@ -285,6 +286,7 @@ getgrent_next_nis (struct group *result, ent_t *ent, char *buffer,
!= YPERR_SUCCESS)
{
ent->nis = 0;
+ *errnop = ENOENT;
return NSS_STATUS_NOTFOUND;
}
@@ -440,7 +442,10 @@ getgrnam_plusgroup (const char *name, struct group *result, char *buffer,
if (yp_match (domain, "group.byname", name, strlen (name),
&outval, &outvallen) != YPERR_SUCCESS)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (buflen < ((size_t) outvallen + 1))
{
@@ -485,7 +490,10 @@ getgrent_next_file (struct group *result, ent_t *ent,
buffer[buflen - 1] = '\xff';
p = fgets (buffer, buflen, ent->stream);
if (p == NULL && feof (ent->stream))
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (p == NULL || buffer[buflen - 1] != '\xff')
{
fsetpos (ent->stream, &pos);
@@ -625,7 +633,10 @@ internal_getgrnam_r (const char *name, struct group *result, ent_t *ent,
buffer[buflen - 1] = '\xff';
p = fgets (buffer, buflen, ent->stream);
if (p == NULL && feof (ent->stream))
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (p == NULL || buffer[buflen - 1] != '\xff')
{
fsetpos (ent->stream, &pos);
@@ -667,7 +678,10 @@ internal_getgrnam_r (const char *name, struct group *result, ent_t *ent,
if (result->gr_name[0] == '-' && result->gr_name[1] != '\0')
{
if (strcmp (&result->gr_name[1], name) == 0)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
else
continue;
}
@@ -828,7 +842,10 @@ internal_getgrgid_r (gid_t gid, struct group *result, ent_t *ent,
buffer[buflen - 1] = '\xff';
p = fgets (buffer, buflen, ent->stream);
if (p == NULL && feof (ent->stream))
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (p == NULL || buffer[buflen - 1] != '\xff')
{
fsetpos (ent->stream, &pos);
diff --git a/nis/nss_compat/compat-initgroups.c b/nis/nss_compat/compat-initgroups.c
index 9def98ba52..97ddaeebab 100644
--- a/nis/nss_compat/compat-initgroups.c
+++ b/nis/nss_compat/compat-initgroups.c
@@ -228,6 +228,7 @@ getgrent_next_nis (struct group *result, ent_t *ent, char *buffer,
&outval, &outvallen) != YPERR_SUCCESS)
{
ent->nis = 0;
+ *errnop = ENOENT;
return NSS_STATUS_UNAVAIL;
}
@@ -252,6 +253,7 @@ getgrent_next_nis (struct group *result, ent_t *ent, char *buffer,
!= YPERR_SUCCESS)
{
ent->nis = 0;
+ *errnop = ENOENT;
return NSS_STATUS_NOTFOUND;
}
@@ -403,11 +405,17 @@ getgrnam_plusgroup (const char *name, struct group *result, char *buffer,
int outvallen;
if (yp_get_default_domain (&domain) != YPERR_SUCCESS)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (yp_match (domain, "group.byname", name, strlen (name),
&outval, &outvallen) != YPERR_SUCCESS)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (buflen < ((size_t) outvallen + 1))
{
@@ -452,7 +460,10 @@ getgrent_next_file (struct group *result, ent_t *ent,
buffer[buflen - 1] = '\xff';
p = fgets (buffer, buflen, ent->stream);
if (p == NULL && feof (ent->stream))
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (p == NULL || buffer[buflen - 1] != '\xff')
{
fsetpos (ent->stream, &pos);
diff --git a/nis/nss_compat/compat-pwd.c b/nis/nss_compat/compat-pwd.c
index eec2634f3a..4cbf739d05 100644
--- a/nis/nss_compat/compat-pwd.c
+++ b/nis/nss_compat/compat-pwd.c
@@ -681,6 +681,7 @@ getpwent_next_nis (struct passwd *result, ent_t *ent, char *buffer,
{
ent->nis = 0;
give_pwd_free (&ent->pwd);
+ *errnop = ENOENT;
return NSS_STATUS_NOTFOUND;
}
@@ -790,7 +791,10 @@ getpwnam_plususer (const char *name, struct passwd *result, char *buffer,
if (yp_match (domain, "passwd.byname", name, strlen (name),
&outval, &outvallen) != YPERR_SUCCESS)
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (buflen < ((size_t) outvallen + 1))
{
@@ -840,7 +844,10 @@ getpwent_next_file (struct passwd *result, ent_t *ent,
buffer[buflen - 1] = '\xff';
p = fgets (buffer, buflen, ent->stream);
if (p == NULL && feof (ent->stream))
- return NSS_STATUS_NOTFOUND;
+ {
+ *errnop = ENOENT;
+ return NSS_STATUS_NOTFOUND;
+ }
if (p == NULL || buffer[buflen - 1] != '\xff')
{
fsetpos (ent->stream, &pos);
@@ -915,7 +922,11 @@ getpwent_next_file (struct passwd *result, ent_t *ent,
if (status == NSS_STATUS_RETURN)
continue;
else
- return status;
+ {
+ if (status == NSS_STATUS_NOTFOUND)
+ *errnop = ENOENT;
+ return status;
+ }
}
/* -user */
@@ -1051,7 +1062,10 @@ internal_getpwnam_r (const char *name, struct passwd *resul