aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1997-03-09 06:16:49 +0000
committerUlrich Drepper <drepper@redhat.com>1997-03-09 06:16:49 +0000
commitf166d8653042df4b840c4d56fba752e266c8bffb (patch)
tree0e7d891c1389559e02e468431b625bbb92b2c61f
parent4cca6b868f08e4f95a4c3786a69135676b086c50 (diff)
downloadglibc-f166d8653042df4b840c4d56fba752e266c8bffb.tar.xz
glibc-f166d8653042df4b840c4d56fba752e266c8bffb.zip
Update.
1997-03-09 06:59 Ulrich Drepper <drepper@cygnus.com> * Makeconfig: Add ASFLAGS-% flags for SPARC assembler which need -fPIC. * Makerules (compile.S): Use ASFLAGS-%. (COMPILE.S): Likewise. * config.make.in (ASFLAGS-.so): Define from ASFLAGS_SO. * configure.in: Substitute ASFLAGS_SO. * sysdeps/sparc/configure.in: New file. * posix/unitstd.h: Add prototype for __euidaccess. * sysdeps/posix/euidaccess.c: Define as __euidaccess and make euidaccess weak alias. * sysdeps/stubs/euidaccess.c: Likewise. * inet/rcmd.c: Use __ protected versions of non-standard functions. * locale/setlocale.c (setlocale): Don't set usage_count to MAX_USAGE_COUNT if it already has this value. * locale/programs/localedef.c: Don't use LOCALE_PATH to find binary locale files. Use LOCALEDIR only. * locale/programs/locfile.c: When named file not found and not absolute use path in I18NPATH. * stdlib/Makefile (headers): Add inttypes.h. * sysdpes/generic/socketbits.h: Add PF_FILE as synonym for PF_LOCAL and AF_FILE as synonym for AF_LOCAL. * sysdpes/unix/sysv/linux/socketbits.h: Likewise. * time/Makefile: Rewrite rules for test to handle parallel builds. 1997-03-09 05:26 Ulrich Drepper <drepper@cygnus.com> * manual/startup.texi (EXIT_FAILURE): Fix typo. Patch by robbe@orcus.priv.at. 1997-03-09 05:10 Edward Seidl <seidl@janed.com> * sysdeps/i386/elf/start.S (nofini): *Really* align stack to 8-byte boundary. 1997-03-09 01:48 Ulrich Drepper <drepper@cygnus.com> * elf/link.h: Define __need_NULL to get definition. Include <features.h>. Patch by Andreas Jaeger <aj@arthur.pfalz.de>. 1997-03-08 21:48 Thorsten Kukuk <kukuk@tk.uni-paderborn.de> Rewrite NIS code to allow empty keys. * nis/nss_nis/nis-ethers.c: Rewritten. * nis/nss_nis/nis-proto.c: Rewritten. * nis/nss_nis/nis-publickey.c: Rewritten. * nis/nss_nis/nis-rpc.c: Rewritten. * nis/nss_nis/nis-service.c: Rewritten. 1997-03-08 16:02 Andreas Jaeger <aj@arthur.pfalz.de> * time/scheck.c (scheck): Add extra const to second argument. * time/private.h: Correct prototypes to match definition. 1997-03-08 18:55 Ulrich Drepper <drepper@cygnus.com> * sysdeps/alpha/__math.h: Remove cabs inline definition. Reported by Philip Blundell <pjb27@cam.ac.uk>. Reported by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>. Bug report by Andreas Jaeger <jaeger@informatik.uni-kl.de>.
-rw-r--r--ChangeLog72
-rw-r--r--Makeconfig12
-rw-r--r--Makerules6
-rw-r--r--config.make.in3
-rwxr-xr-xconfigure3
-rw-r--r--configure.in2
-rw-r--r--elf/link.h3
-rw-r--r--inet/rcmd.c4
-rw-r--r--locale/programs/localedef.c12
-rw-r--r--locale/programs/locfile.c28
-rw-r--r--locale/setlocale.c3
-rw-r--r--manual/startup.texi2
-rw-r--r--nis/nss_nis/nis-ethers.c143
-rw-r--r--nis/nss_nis/nis-proto.c143
-rw-r--r--nis/nss_nis/nis-publickey.c12
-rw-r--r--nis/nss_nis/nis-rpc.c142
-rw-r--r--nis/nss_nis/nis-service.c158
-rw-r--r--posix/unistd.h1
-rw-r--r--stdlib/Makefile2
-rw-r--r--sysdeps/alpha/__math.h39
-rw-r--r--sysdeps/generic/socketbits.h2
-rw-r--r--sysdeps/i386/elf/start.S2
-rw-r--r--sysdeps/libm-ieee754/s_fpclassify.c2
-rw-r--r--sysdeps/posix/euidaccess.c63
-rwxr-xr-xsysdeps/sparc/configure4
-rw-r--r--sysdeps/sparc/configure.in6
-rw-r--r--sysdeps/stub/euidaccess.c31
-rw-r--r--sysdeps/unix/sysv/linux/socketbits.h2
-rw-r--r--sysdeps/wordsize-32/inttypes.h340
-rw-r--r--sysdeps/wordsize-64/inttypes.h340
-rw-r--r--time/Makefile10
-rw-r--r--time/private.h15
-rw-r--r--time/scheck.c2
33 files changed, 1267 insertions, 342 deletions
diff --git a/ChangeLog b/ChangeLog
index 584ec076fe..e503b3ff5b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,71 @@
+1997-03-09 06:59 Ulrich Drepper <drepper@cygnus.com>
+
+ * Makeconfig: Add ASFLAGS-% flags for SPARC assembler which need
+ -fPIC.
+ * Makerules (compile.S): Use ASFLAGS-%.
+ (COMPILE.S): Likewise.
+ * config.make.in (ASFLAGS-.so): Define from ASFLAGS_SO.
+ * configure.in: Substitute ASFLAGS_SO.
+ * sysdeps/sparc/configure.in: New file.
+
+ * posix/unitstd.h: Add prototype for __euidaccess.
+ * sysdeps/posix/euidaccess.c: Define as __euidaccess and make
+ euidaccess weak alias.
+ * sysdeps/stubs/euidaccess.c: Likewise.
+ * inet/rcmd.c: Use __ protected versions of non-standard functions.
+
+ * locale/setlocale.c (setlocale): Don't set usage_count to
+ MAX_USAGE_COUNT if it already has this value.
+
+ * locale/programs/localedef.c: Don't use LOCALE_PATH to find
+ binary locale files. Use LOCALEDIR only.
+ * locale/programs/locfile.c: When named file not found and not
+ absolute use path in I18NPATH.
+
+ * stdlib/Makefile (headers): Add inttypes.h.
+
+ * sysdpes/generic/socketbits.h: Add PF_FILE as synonym for PF_LOCAL
+ and AF_FILE as synonym for AF_LOCAL.
+ * sysdpes/unix/sysv/linux/socketbits.h: Likewise.
+
+ * time/Makefile: Rewrite rules for test to handle parallel builds.
+
+1997-03-09 05:26 Ulrich Drepper <drepper@cygnus.com>
+
+ * manual/startup.texi (EXIT_FAILURE): Fix typo. Patch by
+ robbe@orcus.priv.at.
+
+1997-03-09 05:10 Edward Seidl <seidl@janed.com>
+
+ * sysdeps/i386/elf/start.S (nofini): *Really* align stack to
+ 8-byte boundary.
+
+1997-03-09 01:48 Ulrich Drepper <drepper@cygnus.com>
+
+ * elf/link.h: Define __need_NULL to get definition. Include
+ <features.h>.
+ Patch by Andreas Jaeger <aj@arthur.pfalz.de>.
+
+1997-03-08 21:48 Thorsten Kukuk <kukuk@tk.uni-paderborn.de>
+
+ Rewrite NIS code to allow empty keys.
+ * nis/nss_nis/nis-ethers.c: Rewritten.
+ * nis/nss_nis/nis-proto.c: Rewritten.
+ * nis/nss_nis/nis-publickey.c: Rewritten.
+ * nis/nss_nis/nis-rpc.c: Rewritten.
+ * nis/nss_nis/nis-service.c: Rewritten.
+
+1997-03-08 16:02 Andreas Jaeger <aj@arthur.pfalz.de>
+
+ * time/scheck.c (scheck): Add extra const to second argument.
+
+ * time/private.h: Correct prototypes to match definition.
+
+1997-03-08 18:55 Ulrich Drepper <drepper@cygnus.com>
+
+ * sysdeps/alpha/__math.h: Remove cabs inline definition.
+ Reported by Philip Blundell <pjb27@cam.ac.uk>.
+
1997-03-08 05:30 Ulrich Drepper <drepper@cygnus.com>
* argp/Makefile (routines): Add argp-eexst.
@@ -145,14 +213,14 @@
* sysdeps/libm-ieee754/s_fpclassify.c (__fpclassify): Don't use
non-existing GET_WORDS macro, use EXTRACT_WORDS.
- Reported by Andres Schwab <schwab@issan.informatik.uni-dortmund.de>.
+ Reported by Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>.
1997-03-07 05:27 Ulrich Drepper <drepper@cygnus.com>
* sysdeps/unix/sysv/linux/i386/sigaction.c: The user- and
kernel-level sigaction structure is different. handle this
correctly.
- Bug report by Andres Jaeger <jaeger@informatik.uni-kl.de>.
+ Bug report by Andreas Jaeger <jaeger@informatik.uni-kl.de>.
1997-03-06 05:55 David Engel <david@sw.ods.com>
diff --git a/Makeconfig b/Makeconfig
index 2501789440..d004e07acc 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -490,6 +490,9 @@ object-suffixes += .so
CPPFLAGS-.so = -DPIC
CFLAGS-.so = -fPIC -fno-common
libtype.so := lib%_pic.a
+ifndef ASFLAGS-.so
+ASFLAGS-.so =
+endif
endif
ifeq (yes,$(build-profile))
# Under --enable-profile, we will build a static library of profiled objects.
@@ -498,6 +501,9 @@ object-suffixes += .po
CPPFLAGS-.po = -DPROF
CFLAGS-.po = -pg
libtype.po = lib%_p.a
+ifndef ASFLAGS-.po
+ASFLAGS-.po =
+endif
endif
ifeq (yes,$(build-omitfp))
# Under --enable-omitfp, we build an the library optimized without
@@ -508,6 +514,9 @@ CFLAGS-.go = -g
CFLAGS-.o = -g0 -O99 -fomit-frame-pointer
CFLAGS-.so += $(CFLAGS-.o)
libtype.go = lib%_g.a
+ifndef ASFLAGS-.go
+ASFLAGS-.go =
+endif
endif
ifeq (yes,$(build-bounded))
# Under --enable-bounded, we build the library with `-fbounded-pointers -g'
@@ -516,6 +525,9 @@ object-suffixes += .bo
CPPFLAGS-.bo = -DBOUNDED_POINTERS
CFLAGS-.bo = -g -fbounded-pointers
libtype.bo = lib%_b.a
+ifndef ASFLAGS-.bo
+ASFLAGS-.bo =
+endif
endif
diff --git a/Makerules b/Makerules
index 3636011e43..7a99001c8e 100644
--- a/Makerules
+++ b/Makerules
@@ -294,8 +294,10 @@ endif
# GCC can grok options after the file name, and it looks nicer that way.
compile.c = $(CC) $< -c $(CFLAGS) $(CPPFLAGS)
-compile.S = $(CC) $< -c $(CPPFLAGS) -DASSEMBLER $(asm-CPPFLAGS)
-COMPILE.S = $(CC) -c $(CPPFLAGS) -DASSEMBLER $(asm-CPPFLAGS)
+compile.S = \
+ $(CC) $< -c $(CPPFLAGS) -DASSEMBLER $(asm-CPPFLAGS) $(ASFLAGS-$(suffix $@))
+COMPILE.S = \
+ $(CC) -c $(CPPFLAGS) -DASSEMBLER $(asm-CPPFLAGS) $(ASFLAGS-$(suffix $@))
COMPILE.s = $(filter-out -pipe,$(CC)) -c $(ASFLAGS)
# We need this for the output to go in the right place. It will default to
diff --git a/config.make.in b/config.make.in
index 0a7d0379fd..8f72139361 100644
--- a/config.make.in
+++ b/config.make.in
@@ -51,6 +51,9 @@ AR = @AR@
RANLIB = @RANLIB@
AS = $(CC) -c
+# Build tool flags.
+ASFLAGS-.so = @ASFLAGS_SO@
+
# Installation tools.
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
diff --git a/configure b/configure
index 3edb97d984..1dd8a6adb2 100755
--- a/configure
+++ b/configure
@@ -2037,6 +2037,8 @@ fi
+
+
if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
config_makefile=
else
@@ -2223,6 +2225,7 @@ s%@profile@%$profile%g
s%@omitfp@%$omitfp%g
s%@bounded@%$bounded%g
s%@DEFINES@%$DEFINES%g
+s%@ASFLAGS_SO@%$ASFLAGS_SO%g
s%@VERSION@%$VERSION%g
CEOF
diff --git a/configure.in b/configure.in
index f36bcaf1bf..44147caf0b 100644
--- a/configure.in
+++ b/configure.in
@@ -810,6 +810,8 @@ AC_SUBST(bounded)
AC_SUBST(DEFINES)
+AC_SUBST(ASFLAGS_SO)
+
if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
config_makefile=
else
diff --git a/elf/link.h b/elf/link.h
index b0b920074b..62bf74c23b 100644
--- a/elf/link.h
+++ b/elf/link.h
@@ -18,9 +18,12 @@
Boston, MA 02111-1307, USA. */
#ifndef _LINK_H
+
#define _LINK_H 1
+#include <features.h>
#define __need_size_t
+#define __need_NULL
#include <stddef.h>
#include <elf.h>
diff --git a/inet/rcmd.c b/inet/rcmd.c
index 354ff35994..0ee0c5d17f 100644
--- a/inet/rcmd.c
+++ b/inet/rcmd.c
@@ -326,7 +326,7 @@ again:
char *buffer = __alloca (buflen);
first = 0;
- if (getpwnam_r (luser, &pwdbuf, buffer, buflen, &pwd) < 0)
+ if (__getpwnam_r (luser, &pwdbuf, buffer, buflen, &pwd) < 0)
return -1;
dirlen = strlen (pwd->pw_dir);
@@ -339,7 +339,7 @@ again:
* reading an NFS mounted file system, can't read files that
* are protected read/write owner only.
*/
- if (euidaccess (pbuf, R_OK) != 0)
+ if (__euidaccess (pbuf, R_OK) != 0)
hostf = NULL;
else
hostf = fopen(pbuf, "r");
diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
index 96ff12eaff..1830be3da4 100644
--- a/locale/programs/localedef.c
+++ b/locale/programs/localedef.c
@@ -240,21 +240,23 @@ main (int argc, char *argv[])
if (! avail)
{
- const char *locale_names[] = { "LC_COLLATE", "LC_CTYPE",
- "LC_MONETARY", "LC_NUMERIC",
- "LC_TIME", "LC_MESSAGES" };
+ static const char *locale_names[] =
+ {
+ "LC_COLLATE", "LC_CTYPE", "LC_MONETARY",
+ "LC_NUMERIC", "LC_TIME", "LC_MESSAGES"
+ };
char *fname;
int fd;
struct stat st;
- asprintf (&fname, LOCALE_PATH "/%s/%s", act_add_locdef->name,
+ asprintf (&fname, LOCALEDIR "/%s/%s", act_add_locdef->name,
locale_names[cat]);
fd = open (fname, O_RDONLY);
if (fd == -1)
{
free (fname);
- asprintf (&fname, LOCALE_PATH "/%s/%s/SYS_%s",
+ asprintf (&fname, LOCALEDIR "/%s/%s/SYS_%s",
act_add_locdef->name, locale_names[cat],
locale_names[cat]);
diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c
index 4ab04253b9..aecc8913e2 100644
--- a/locale/programs/locfile.c
+++ b/locale/programs/locfile.c
@@ -26,6 +26,7 @@
#include <locale.h>
#include <malloc.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
@@ -76,10 +77,31 @@ locfile_read (const char *filename, struct charset_t *charset)
{
if (filename[0] != '/')
{
- char path[strlen (filename) + 1 + sizeof (LOCSRCDIR)];
+ char *i18npath = __secure_getenv ("I18NPATH");
+ if (i18npath != NULL && *i18npath != '\0')
+ {
+ char path[strlen (filename) + 1 + strlen (i18npath) + 1];
+ char *next;
+ i18npath = strdupa (i18npath);
+
+
+ while (ldfile == NULL
+ && (next = strsep (&i18npath, ":")) != NULL)
+ {
+ stpcpy (stpcpy (stpcpy (path, next), "/"), filename);
+
+ ldfile = lr_open (path, locfile_hash);
+ }
+ }
- stpcpy (stpcpy (stpcpy (path, LOCSRCDIR), "/"), filename);
- ldfile = lr_open (path, locfile_hash);
+ /* Test in the default directory. */
+ if (ldfile == NULL)
+ {
+ char path[strlen (filename) + 1 + sizeof (LOCSRCDIR)];
+
+ stpcpy (stpcpy (stpcpy (path, LOCSRCDIR), "/"), filename);
+ ldfile = lr_open (path, locfile_hash);
+ }
}
if (ldfile == NULL)
diff --git a/locale/setlocale.c b/locale/setlocale.c
index 12e6569384..4eceea6446 100644
--- a/locale/setlocale.c
+++ b/locale/setlocale.c
@@ -368,7 +368,8 @@ setlocale (int category, const char *locale)
/* We must not simply free a global locale since we have no
control over the usage. So we mark it as un-deletable. */
- newdata->usage_count = MAX_USAGE_COUNT;
+ if (newdata->usage_count != MAX_USAGE_COUNT)
+ newdata->usage_count = MAX_USAGE_COUNT;
}
/* Create new composite name. */
diff --git a/manual/startup.texi b/manual/startup.texi
index 426f9496b5..db6a4c8e32 100644
--- a/manual/startup.texi
+++ b/manual/startup.texi
@@ -830,7 +830,7 @@ unsuccessful program completion in a general sense.
On POSIX systems, the value of this macro is @code{1}. On other
systems, the value might be some other (possibly non-constant) integer
-expression. Other nonzero status values also indicate future. Certain
+expression. Other nonzero status values also indicate failures. Certain
programs use different nonzero status values to indicate particular
kinds of "non-success". For example, @code{diff} uses status value
@code{1} to mean that the files are different, and @code{2} or more to
diff --git a/nis/nss_nis/nis-ethers.c b/nis/nss_nis/nis-ethers.c
index d257cd7e4b..c6656ee05f 100644
--- a/nis/nss_nis/nis-ethers.c
+++ b/nis/nss_nis/nis-ethers.c
@@ -43,43 +43,101 @@ struct ether
#define EXTERN_PARSER
#include "../nss/nss_files/files-parse.c"
-static bool_t new_start = 1;
-static char *oldkey = NULL;
-static int oldkeylen = 0;
+struct response
+{
+ char *val;
+ struct response *next;
+};
-enum nss_status
-_nss_nis_setetherent (void)
+static struct response *start = NULL;
+static struct response *next = NULL;
+
+static int
+saveit (int instatus, char *inkey, int inkeylen, char *inval,
+ int invallen, char *indata)
{
- __libc_lock_lock (lock);
+ if (instatus != YP_TRUE)
+ return instatus;
- new_start = 1;
- if (oldkey != NULL)
+ if (inkey && inkeylen > 0 && inval && invallen > 0)
{
- free (oldkey);
- oldkey = NULL;
- oldkeylen = 0;
+ if (start == NULL)
+ {
+ start = malloc (sizeof (struct response));
+ next = start;
+ }
+ else
+ {
+ next->next = malloc (sizeof (struct response));
+ next = next->next;
+ }
+ next->next = NULL;
+ next->val = malloc (invallen + 1);
+ strncpy (next->val, inval, invallen);
+ next->val[invallen] = '\0';
}
+
+ return 0;
+}