]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update for 960809.
authorUlrich Drepper <drepper@redhat.com>
Sat, 10 Aug 1996 00:00:16 +0000 (00:00 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 10 Aug 1996 00:00:16 +0000 (00:00 +0000)
Fri Aug  9 17:38:58 1996  Ulrich Drepper  <drepper@cygnus.com>

* sysdeps/unix/sysv/linux/sys/timex.h: Include <sys/time.h> to
get `struct timeval'.
* sysdeps/unix/sysv/linux/sys/acct.h: Get time_t from <time.h>.
* sysdeps/unix/sysv/linux/sys/module.h: Get size_t from <stddef.h>.
* sysdeps/unix/sysv/linux/sys/io.h: Get definition of __P.
* sysdeps/unix/sysv/linux/sys/klog.h: Likewise.
* gmon/sys/gmon.h: Include <sys/types.h> to get u_long.
* sysdeps/unix/sysv/linux/direntry.h: Complete types in
<linux/dirent.h>.
* io/fts.h: Include <sys/types.h> to get dev_t.
Reported by Matthias Urlichs.

* sysdeps/posix/tempname.c [USE_IN_LIBIO]: Don't clear
  _IO_file_flags.  It's the same as _flags.
Reported by Miquel van Smoorenburg <miquels@Q.cistron.nl>.

Wed Aug  7 19:38:47 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>

* sysdeps/unix/sysv/linux/m68k/resourcebits.h: Add RLIMIT_AS.

26 files changed:
ChangeLog
INSTALL
Makeconfig
Makefile
configure.in
grp/Makefile
grp/fgetgrent.c
grp/getgrent.c
grp/getgrent_r.c
grp/getgrgid.c
grp/getgrgid_r.c
grp/getgrnam.c
grp/grp.h
manual/maint.texi
nss/Makefile
nss/nss_files/files-pwd.c
pwd/Makefile
pwd/fgetpwent.c
pwd/getpwent.c
pwd/getpwent_r.c
pwd/getpwnam.c
pwd/getpwnam_r.c
pwd/getpwuid.c
pwd/getpwuid_r.c
pwd/pwd.h
sysdeps/unix/sysv/linux/init-first.c

index 6aa81bbd5cf78bf126d30db528af80ab73ad846d..bab55fd86cb46698fa6c2b159fd88deecda793d7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+Fri Aug  9 17:38:58 1996  Ulrich Drepper  <drepper@cygnus.com>
+
+       * sysdeps/unix/sysv/linux/sys/timex.h: Include <sys/time.h> to
+       get `struct timeval'.
+       * sysdeps/unix/sysv/linux/sys/acct.h: Get time_t from <time.h>.
+       * sysdeps/unix/sysv/linux/sys/module.h: Get size_t from <stddef.h>.
+       * sysdeps/unix/sysv/linux/sys/io.h: Get definition of __P.
+       * sysdeps/unix/sysv/linux/sys/klog.h: Likewise.
+       * gmon/sys/gmon.h: Include <sys/types.h> to get u_long.
+       * sysdeps/unix/sysv/linux/direntry.h: Complete types in
+       <linux/dirent.h>.
+       * io/fts.h: Include <sys/types.h> to get dev_t.
+       Reported by Matthias Urlichs.
+
+       * sysdeps/posix/tempname.c [USE_IN_LIBIO]: Don't clear
+       _IO_file_flags.  It's the same as _flags.
+       Reported by Miquel van Smoorenburg <miquels@Q.cistron.nl>.
+
+Wed Aug  7 19:38:47 1996  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
+
+       * sysdeps/unix/sysv/linux/m68k/resourcebits.h: Add RLIMIT_AS.
+
 Thu Aug  8 16:17:38 1996  Ulrich Drepper  <drepper@cygnus.com>
 
        * pwd/getpwent.c: Define BUFLEN from NSS_BUFLEN_PASSWD.
diff --git a/INSTALL b/INSTALL
index 25ede5f565d80aa68969cd5a80ff2d4ad321a263..581f3925f7a7f485b2d71953486948cea4de8860 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -163,12 +163,13 @@ build the GNU C library:
      GNU C compiler.  We recommend GCC version 2.7.2 or later; earlier
      versions may have problems.
 
-   * `binutils' 2.6
+   * `binutils' 2.7
 
      Using the GNU `binutils' (assembler, linker, and related tools) is
      preferable when possible, and they are required to build an ELF
-     shared C library.  We recommend `binutils' version 2.6 or later;
-     earlier versions are known to have problems.
+     shared C library.  We recommend `binutils' version 2.7 or later;
+     earlier versions are known to have problems or to not support all
+     architectures.
 
 Supported Configurations
 ------------------------
index 5b4393d357c89182aa80838e01f8063129915805..413a2537e2359aa90018fc77ef7a90f159362136 100644 (file)
@@ -283,7 +283,7 @@ endif
 
 # Default flags to pass the C compiler.
 ifndef default_cflags
-default_cflags := -g
+default_cflags := -g -O
 endif
 
 # Flags to pass the C compiler when assembling preprocessed assembly code
@@ -485,7 +485,7 @@ ifeq (yes,$(build-omitfp))
 object-suffixes += .go
 CFLAGS-.go = -g
 CFLAGS-.o = -g0 -O99 -fomit-frame-pointer
-CFLAGS-.so += $(CFLAGS.o)
+CFLAGS-.so += $(CFLAGS-.o)
 libtype.go = lib%_g.a
 endif
 
index 4b3446f13e11ba17c0157418d1d5297df36e233e..6f4511a8e62141ff8218733e809f854a0f380d42 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -54,7 +54,7 @@ endif
 subdirs = csu assert ctype db locale intl catgets math setjmp signal stdlib \
          stdio-common $(stdio) malloc string wcsmbs time dirent grp pwd\
          posix io termios resource misc login socket sysvipc gmon gnulib \
-         wctype manual $(sysdep-subdirs) nss elf po $(add-ons)
+         wctype manual shadow $(sysdep-subdirs) nss elf po $(add-ons)
 export subdirs := $(subdirs)   # Benign, useless in GNU make before 3.63.
 
 # The mach and hurd subdirectories have many generated header files which
index 93c2c0926a28eb37fa22dd091dd53a6beff293b9..631a035e921065e2c86c5e64bba13ffaf4f473ab 100644 (file)
@@ -111,7 +111,7 @@ case "$machine" in
 a29k | am29000)        base_machine=a29k machine=a29k ;;
 alpha*)                base_machine=alpha machine=alpha/$machine ;;
 hppa*)         base_machine=hppa machine=hppa/$machine ;;
-i[345]86)      base_machine=i386 machine=i386/$machine ;;
+i[3456]86)     base_machine=i386 machine=i386/$machine ;;
 m680?0)                base_machine=m68k machine=m68k/$machine ;;
 m68k)          base_machine=m68k machine=m68k/m68020 ;;
 m88???)                base_machine=m88k machine=m88k/$machine ;;
index 273b7d17ea93bcdb4ef0af58acd58be59e3a2a2e..091d8ba84b524f56eb488a4fa1ee8addc910c3ae 100644 (file)
@@ -23,7 +23,7 @@ subdir        := grp
 
 routines := fgetgrent initgroups setgroups \
            getgrent getgrgid getgrnam \
-           getgrent_r getgrgid_r getgrnam_r
+           getgrent_r getgrgid_r getgrnam_r fgetgrent_r
 
 tests := testgrp
 
index 38ccd15e6f003129bd2965e70d8639042b03c960..95ae2ecd6a46c10ff8c26732e02db0248745c8d2 100644 (file)
@@ -16,25 +16,8 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <stdio.h>
 #include <grp.h>
-
-/* Define a line parsing function using the common code
-   used in the nss_files module.  */
-
-#define STRUCTURE      group
-#define ENTNAME                grent
-struct grent_data {};
-
-#define TRAILING_LIST_MEMBER           gr_mem
-#define TRAILING_LIST_SEPARATOR_P(c)   ((c) == ',')
-#include "../nss/nss_files/files-parse.c"
-LINE_PARSER
-(,
- STRING_FIELD (result->gr_name, ISCOLON, 0);
- STRING_FIELD (result->gr_passwd, ISCOLON, 0);
- INT_FIELD (result->gr_gid, ISCOLON, 0, 10,);
- )
+#include <stdio.h>
 
 
 /* Read one entry from the given stream.  */
@@ -43,21 +26,6 @@ fgetgrent (FILE *stream)
 {
   static char buffer[BUFSIZ];
   static struct group result;
-  char *p;
-
-  do
-    {
-      p = fgets (buffer, sizeof buffer, stream);
-      if (p == NULL)
-       return NULL;
-
-      /* Skip leading blanks.  */
-      while (isspace (*p))
-       ++p;
-    } while (*p == '\0' || *p == '#' ||        /* Ignore empty and comment lines.  */
-            /* Parse the line.  If it is invalid, loop to
-               get the next line of the file to parse.  */
-            ! parse_line (p, &result, (void *) buffer, sizeof buffer));
 
-  return &result;
+  return __fgetgrent_r (stream, &result, buffer, sizeof buffer);
 }
index 4e14bbcf17c1a4e798e7445f47843fe26c1d949f..d19e4d189b3a929ff3cc4244d6aa966767d00052 100644 (file)
@@ -25,6 +25,6 @@ Boston, MA 02111-1307, USA.  */
 #define        GETFUNC_NAME    getgrent
 #define        ENDFUNC_NAME    endgrent
 #define DATABASE_NAME  group
-#define BUFLEN         1024
+#define BUFLEN         NSS_BUFLEN_GROUP
 
 #include "../nss/getXXent.c"
index db692b20d6e8aa4ac29695985e995a31459612c7..1f60763ea88274104ad40d384cf9c9dc4d86c906 100644 (file)
@@ -25,6 +25,6 @@ Boston, MA 02111-1307, USA.  */
 #define        GETFUNC_NAME    getgrent
 #define        ENDFUNC_NAME    endgrent
 #define DATABASE_NAME  group
-#define BUFLEN         1024
+#define BUFLEN         NSS_BUFLEN_GROUP
 
 #include "../nss/getXXent_r.c"
index 855d31cbe93d8b546ffd8ec5e3beffae7966a6cf..b90000ba1ea15141a54d4bf27fc853e549474981 100644 (file)
@@ -25,6 +25,6 @@ Boston, MA 02111-1307, USA.  */
 #define DATABASE_NAME  group
 #define ADD_PARAMS     gid_t gid
 #define ADD_VARIABLES  gid
-#define BUFLEN         1024
+#define BUFLEN         NSS_BUFLEN_GROUP
 
 #include "../nss/getXXbyYY.c"
index 3b1719d64477b59e60715a7f515624cf5c17f5d6..6c7704dd52950fc188761c1556cc9357a94ec84f 100644 (file)
@@ -25,6 +25,6 @@ Boston, MA 02111-1307, USA.  */
 #define DATABASE_NAME  group
 #define ADD_PARAMS     gid_t gid
 #define ADD_VARIABLES  gid
-#define BUFLEN         1024
+#define BUFLEN         NSS_BUFLEN_GROUP
 
 #include "../nss/getXXbyYY_r.c"
index 2104d87459423d4ea2850063d0dcac8a94f06335..f060ea9f5f1d5dc91ccd94831a9eb1ea04c3b2e4 100644 (file)
@@ -25,6 +25,6 @@ Boston, MA 02111-1307, USA.  */
 #define DATABASE_NAME  group
 #define ADD_PARAMS     const char *name
 #define ADD_VARIABLES  name
-#define BUFLEN         1024
+#define BUFLEN         NSS_BUFLEN_GROUP
 
 #include "../nss/getXXbyYY.c"
index 1abe22e4e2cdd10d6ac0c0d20777858da95431c1..6a88191380b23e01ab5e5cac6846c738e41c6b62 100644 (file)
--- a/grp/grp.h
+++ b/grp/grp.h
@@ -110,6 +110,16 @@ extern struct group *getgrnam_r __P ((__const char *__name,
                                      struct group *__resultbuf,
                                      char *buffer, int __buflen));
 
+#ifdef __USE_SVID
+/* Read a group entry from STREAM.  */
+extern struct group *__fgetgrent_r __P ((FILE * __stream,
+                                        struct group *__resultbuf,
+                                        char *buffer, int __buflen));
+extern struct group *fgetgrent_r __P ((FILE * __stream,
+                                      struct group *__resultbuf,
+                                      char *buffer, int __buflen));
+#endif
+
 #endif /* reentrant */
 
 
index 98467e4b7bd69d5ef0c16c0ae84033799d22ff7d..cd6c996719cc76c99a078fbae782974cc6351fdc 100644 (file)
@@ -206,12 +206,12 @@ compiler.  We recommend GCC version 2.7.2 or later; earlier versions may
 have problems.
 
 @item
-@code{binutils} 2.6
+@code{binutils} 2.7
 
 Using the GNU @code{binutils} (assembler, linker, and related tools) is
 preferable when possible, and they are required to build an ELF shared C
-library.  We recommend @code{binutils} version 2.6 or later; earlier
-versions are known to have problems.
+library.  We recommend @code{binutils} version 2.7 or later; earlier
+versions are known to have problems or to not support all architectures.
 @end itemize
 
 @node Supported Configurations
index aafa8e2810b6b32bd82e3cc759eb25fc7ca0b637..f23f5f3fbb5cbc41b977640a756be006cffdebc0 100644 (file)
@@ -28,7 +28,8 @@ distribute            := nsswitch.h XXX-lookup.c getXXbyYY.c getXXbyYY_r.c \
 routines               = nsswitch $(addsuffix -lookup,$(databases))
 
 # These are the databases that go through nss dispatch.
-databases              = proto service hosts network grp pwd rpc ethers
+databases              = proto service hosts network grp pwd rpc ethers \
+                         spwd
 
 # Specify rules for the nss_* modules.  We have some services.
 services               := files dns db
index 9732bc6f2341b5eeab10722df6a45a68295e8eee..a778d015d8e1848ea01d333768bb30020f881d42 100644 (file)
@@ -24,7 +24,7 @@ Cambridge, MA 02139, USA.  */
 #define DATABASE       "passwd"
 struct pwent_data {};
 
-/* Our parser function is already defined in fgetpwent.c, so use that
+/* Our parser function is already defined in fgetpwent_r.c, so use that
    to parse lines from the database file.  */
 #define EXTERN_PARSER
 #include "files-parse.c"
index ce67d49ea94da3519eea58e8c9099d8eccf8d6b7..68cdc4a99120f741229d15a4631ca5df8e7a9481 100644 (file)
@@ -23,6 +23,6 @@ subdir        := pwd
 
 routines := fgetpwent getpw putpwent \
            getpwent getpwnam getpwuid \
-           getpwent_r getpwnam_r getpwuid_r
+           getpwent_r getpwnam_r getpwuid_r fgetpwent_r
 
 include ../Rules
index f8548fe29b4f1f4d943039faf5b44304a5aa98ad..215d6e07c8a6f7333ee7428969328d3bc8ab7893 100644 (file)
@@ -16,27 +16,8 @@ License along with the GNU C Library; see the file COPYING.LIB.  If
 not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
-#include <stdio.h>
 #include <pwd.h>
-
-/* Define a line parsing function using the common code
-   used in the nss_files module.  */
-
-#define STRUCTURE      passwd
-#define ENTNAME                pwent
-struct pwent_data {};
-
-#include "../nss/nss_files/files-parse.c"
-LINE_PARSER
-(,
- STRING_FIELD (result->pw_name, ISCOLON, 0);
- STRING_FIELD (result->pw_passwd, ISCOLON, 0);
- INT_FIELD (result->pw_uid, ISCOLON, 0, 10,);
- INT_FIELD (result->pw_gid, ISCOLON, 0, 10,);
- STRING_FIELD (result->pw_gecos, ISCOLON, 0);
- STRING_FIELD (result->pw_dir, ISCOLON, 0);
- result->pw_shell = line;
- )
+#include <stdio.h>
 
 
 /* Read one entry from the given stream.  */
@@ -45,21 +26,6 @@ fgetpwent (FILE *stream)
 {
   static char buffer[BUFSIZ];
   static struct passwd result;
-  char *p;
-
-  do
-    {
-      p = fgets (buffer, sizeof buffer, stream);
-      if (p == NULL)
-       return NULL;
-
-      /* Skip leading blanks.  */
-      while (isspace (*p))
-       ++p;
-    } while (*p == '\0' || *p == '#' ||        /* Ignore empty and comment lines.  */
-            /* Parse the line.  If it is invalid, loop to
-               get the next line of the file to parse.  */
-            ! parse_line (p, &result, (void *) buffer, sizeof buffer));
 
-  return &result;
+  return __fgetpwent_r (stream, &result, buffer, sizeof buffer);
 }
index 79edbd5db0b3c2089bd5b356570ca430e84b9a88..9b96c63c33eb21653126122dde3c02b9e6292d3a 100644 (file)
@@ -25,6 +25,6 @@ Boston, MA 02111-1307, USA.  */
 #define        GETFUNC_NAME    getpwent
 #define        ENDFUNC_NAME    endpwent
 #define DATABASE_NAME  passwd
-#define BUFLEN         1024
+#define BUFLEN         NSS_BUFLEN_PASSWD
 
 #include "../nss/getXXent.c"
index ced7f8a6390315d9d354883574b764d60ce6487f..1c5bc02e7aee5eec89ca492365783085b354792d 100644 (file)
@@ -8,7 +8,7 @@ published by the Free Software Foundation; either version 2 of the
 License, or (at your option) any later version.
 
 The GNU C Library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
+but WITHOUT ANY WARRANTY; without even the implied warranty of/tes
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 Library General Public License for more details.
 
@@ -25,6 +25,6 @@ Boston, MA 02111-1307, USA.  */
 #define        GETFUNC_NAME    getpwent
 #define        ENDFUNC_NAME    endpwent
 #define DATABASE_NAME  passwd
-#define BUFLEN         1024
+#define BUFLEN         NSS_BUFLEN_PASSWD
 
 #include "../nss/getXXent_r.c"
index 597b8d12050459e3be7b3bd3dbd7b918e2334ab2..042fdae20685ff5ad5b8530674dd0d81240a1406 100644 (file)
@@ -25,6 +25,6 @@ Boston, MA 02111-1307, USA.  */
 #define DATABASE_NAME  passwd
 #define ADD_PARAMS     const char *name
 #define ADD_VARIABLES  name
-#define BUFLEN         1024
+#define BUFLEN         NSS_BUFLEN_PASSWD
 
 #include "../nss/getXXbyYY.c"
index c2d1f84d813aea9b71d5c21d07b7c78e36543e14..93fadc5ed170f2a59f597f515e27996f8090cea7 100644 (file)
@@ -25,6 +25,6 @@ Boston, MA 02111-1307, USA.  */
 #define DATABASE_NAME  passwd
 #define ADD_PARAMS     const char *name
 #define ADD_VARIABLES  name
-#define BUFLEN         1024
+#define BUFLEN         NSS_BUFLEN_PASSWD
 
 #include "../nss/getXXbyYY_r.c"
index 130c251f899e584e05a705aa1ed8cbd86edc5b48..2ad654f9b982003dc9e50df8893a76cf9fe94fb4 100644 (file)
@@ -25,6 +25,6 @@ Boston, MA 02111-1307, USA.  */
 #define DATABASE_NAME  passwd
 #define ADD_PARAMS     uid_t uid
 #define ADD_VARIABLES  uid
-#define BUFLEN         1024
+#define BUFLEN         NSS_BUFLEN_PASSWD
 
 #include "../nss/getXXbyYY.c"
index e3bf7578aeb8d553f43398e7a1f6b514dad2db86..8e92ee25553a2241eec23adfc4e3b20b7945314b 100644 (file)
@@ -25,6 +25,6 @@ Boston, MA 02111-1307, USA.  */
 #define DATABASE_NAME  passwd
 #define ADD_PARAMS     uid_t uid
 #define ADD_VARIABLES  uid
-#define BUFLEN         1024
+#define BUFLEN         NSS_BUFLEN_PASSWD
 
 #include "../nss/getXXbyYY_r.c"
index 00235093aabdacfc351b33a5de5ff7ec42410017..9bd380a6dbe43e77b39a605f3dbc55eccd47ccbc 100644 (file)
--- a/pwd/pwd.h
+++ b/pwd/pwd.h
@@ -123,6 +123,17 @@ extern struct passwd *getpwnam_r __P ((__const char *__name,
                                       struct passwd *__resultbuf,
                                       char *__buffer, int __buflen));
 
+
+#ifdef __USE_SVID
+/* Read an entry from STREAM.  */
+extern struct passwd *__fgetpwent_r __P ((FILE * __stream,
+                                         struct passwd *__resultbuf,
+                                         char *__buffer, int __buflen));
+extern struct passwd *fgetpwent_r __P ((FILE * __stream,
+                                       struct passwd *__resultbuf,
+                                       char *__buffer, int __buflen));
+#endif
+
 #endif /* reentrant */
 
 
index aa7d9c4ac0efd73db4681079eb9875d919806699..267c01afc8fb22961d719000af7b6c40cd767ae5 100644 (file)
@@ -43,6 +43,10 @@ init (void *data)
   char **argv = (char **)data + 1;
   char **envp = &argv[argc + 1];
 
+  /* XXX Another gcc bug.  We marked the function as `unused' but it
+     is still optimized away.  */
+  volatile void *foo __attribute__ ((unused)) = &init;
+
 #ifdef PIC
   if (&__libc_is_static != NULL)
 #endif