]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
update from main archive 960910
authorUlrich Drepper <drepper@redhat.com>
Wed, 11 Sep 1996 01:52:48 +0000 (01:52 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 11 Sep 1996 01:52:48 +0000 (01:52 +0000)
Wed Sep 11 02:57:31 1996  Ulrich Drepper  <drepper@cygnus.com>

* configure.in: Quote $add_ons argument in loop to generated
prefices.

Tue Sep 10 20:43:45 1996  Ulrich Drepper  <drepper@cygnus.com>

* db/makedb.c: Include <locale.h>.  Reported by Fila Kolodny.

Tue Sep 10 13:49:08 1996  Ulrich Drepper  <drepper@cygnus.com>

* inet/herrno.c: Initialize `h_errno' so that we can provide
alias.

* Makefile (version-info.h): Fix typo in shell script.

* sysdeps/i386/i586/strlen.S: Optimize startup code a bit.
* sysdeps/i386/i586/strchr.S: Likewise.

ChangeLog
Makefile
configure
configure.in
db/makedb.c
inet/herrno.c
sysdeps/i386/i586/strchr.S
sysdeps/i386/i586/strlen.S
sysdeps/unix/sysv/linux/init-first.h [new file with mode: 0644]

index 92b1e8a061e17802c7be40664c4a18c05a3e6c3b..f9156158281fc555ebbc88a5162873f7ad8efd59 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+Wed Sep 11 02:57:31 1996  Ulrich Drepper  <drepper@cygnus.com>
+
+       * configure.in: Quote $add_ons argument in loop to generated
+       prefices.
+
+Tue Sep 10 20:43:45 1996  Ulrich Drepper  <drepper@cygnus.com>
+
+       * db/makedb.c: Include <locale.h>.  Reported by Fila Kolodny.
+
+Tue Sep 10 13:49:08 1996  Ulrich Drepper  <drepper@cygnus.com>
+
+       * inet/herrno.c: Initialize `h_errno' so that we can provide
+       alias.
+
+       * Makefile (version-info.h): Fix typo in shell script.
+
+       * sysdeps/i386/i586/strlen.S: Optimize startup code a bit.
+       * sysdeps/i386/i586/strchr.S: Likewise.
+
 Mon Sep  9 20:31:27 1996  Ulrich Drepper  <drepper@cygnus.com>
 
        * version.c (banner): Report to bug-glibc@prep not @gnu.
index 014b581c452dcaf5f8159c054d93be01dfaed94d..fd339fe5505e3bbae3bf07de627eec014514e95d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -140,7 +140,7 @@ $(objpfx)version-info.h: $(..)Makefile $(+sysdir_pfx)config.make
             sed -e '/^#/d' -e 's/^[[:space:]]*/        /' $$dir/Banner;    \
           fi;                                                                \
         done;                                                                \
-        [ $first = yes ] || echo "\"") > $@-tmp
+        [ $$first = yes ] || echo "\"") > $@-tmp
         mv -f $@-tmp $@
 
 version.c-objects := $(addprefix $(objpfx)version,$(object-suffixes))
@@ -251,7 +251,7 @@ distribute  := README INSTALL FAQ NOTES NEWS PROJECTS                       \
               ansidecl.h mkinstalldirs move-if-change install-sh       \
               configure configure.in aclocal.m4 config.sub config.guess\
               config.h.in config.make.in config-name.in Makefile.in    \
-              autolock.sh munch-tmpl.c munch.awk \
+              autolock.sh munch-tmpl.c munch.awk                       \
               sysdep.h set-hooks.h libc-symbols.h version.h shlib-versions \
               rpm/Makefile rpm/template rpm/rpmrc
 
index fc7595cdf8e43f1ecb0ec5bdee7f88ed4d78458d..58c71b1dfce094b5b252a82c625c8f9cdb0c532a 100755 (executable)
--- a/configure
+++ b/configure
@@ -690,7 +690,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 subdirs="$add_ons"
 
 add_ons_pfx=
-if test x$add_ons != x; then
+if test x"$add_ons" != x; then
   for f in $add_ons; do
     add_ons_pfx="$add_ons_pfx $f/"
   done
index cd9de1306399ae64c99b9d3a236a29d4e00176b2..da1853bdf0abaa7264610d85750cf7daac37495c 100644 (file)
@@ -78,7 +78,7 @@ AC_ARG_ENABLE(add-ons, dnl
              [add_ons=])
 AC_CONFIG_SUBDIRS($add_ons)
 add_ons_pfx=
-if test x$add_ons != x; then
+if test x"$add_ons" != x; then
   for f in $add_ons; do
     add_ons_pfx="$add_ons_pfx $f/"
   done
index 3dc5b34cbe89e780ae2f0821bfa4470e05076434..db999901956d1db4a88e6a31baaad6a20a319c51 100644 (file)
@@ -25,6 +25,7 @@ Boston, MA 02111-1307, USA.  */
 #include <fcntl.h>
 #include <getopt.h>
 #include <libintl.h>
+#include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
index 312760e81df7f440170a5f71d187c7039f19458e..d20c96cb3cfd694546693edf18784e781b7550ad 100644 (file)
@@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA.  */
 
 /* We need to have the error status variable of the resolver
    accessible in the libc.  */
-int __h_errno;
+int __h_errno = 0;
 strong_alias (__h_errno, h_errno)
 
 /* When threaded, h_errno may be a per-process variable.  */
index 30de6b069d5aec834aea39b2fde69ac33263a7d7..100cbbc706341894775292eba214dc44bcaffef4 100644 (file)
@@ -1,6 +1,6 @@
 /* strchr -- find character CH in a NUL terminated string.
 Highly optimized version for ix85, x>=5.
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>.
 
@@ -68,9 +68,10 @@ ENTRY (strchr)
        andl $3, %edi           /* mask alignment bits */
 
        jz L11                  /* alignment is 0 => start loop */
+       jp L0                   /* exactly two bits set */
 
        movb (%eax), %cl        /* load single byte */
-       cmpb %cl, %dl           /* is byte == C? */
+       cmpb (%eax), %dl        /* is byte == C? */
 
        je L2                   /* aligned => return pointer */
 
@@ -78,26 +79,21 @@ ENTRY (strchr)
        je L3                   /* yes => return NULL */
 
        incl %eax               /* increment pointer */
-       cmp $3, %edi            /* was alignment == 3? */
+       xorl $3, %edi           /* was alignment == 3? */
 
+L0:    movb (%eax), %cl        /* load single byte */
        je L11                  /* yes => start loop */
 
-       movb (%eax), %cl        /* load single byte */
        cmpb %cl, %dl           /* is byte == C? */
-
        je L2                   /* aligned => return pointer */
 
        cmpb $0, %cl            /* is byte NUL? */
        je L3                   /* yes => return NULL */
 
+       movb 1(%eax), %cl       /* load single byte */
        incl %eax               /* increment pointer */
-       cmp $2, %edi            /* was alignment == 2? */
 
-       je L11                  /* yes => start loop */
-
-       movb (%eax), %cl        /* load single byte */
        cmpb %cl, %dl           /* is byte == C? */
-
        je L2                   /* aligned => return pointer */
 
        cmpb $0, %cl            /* is byte NUL? */
index 15d01947d4aee76cbf6193bcd10c78ba48ee7742..1e171313896b0c8ab320b4251424b68e99bd08ae 100644 (file)
@@ -42,32 +42,31 @@ Boston, MA 02111-1307, USA.  */
        .text
 ENTRY(strlen)
        movl 4(%esp), %eax      /* get string pointer */
+       movl $3, %edx           /* load mask (= 3) */
 
-       movl %eax, %ecx         /* duplicate it */
-       andl $3, %ecx           /* mask alignment bits */
+       andl %eax, %edx         /* separate last two bits of address */
 
-       jz L11                  /* aligned => start loop */
+       jz L1                   /* aligned => start loop */
+       jp L0                   /* exactly two bits set */
 
-       cmpb %ch, (%eax)        /* is byte NUL? */
+       cmpb %dh, (%eax)        /* is byte NUL? */
        je L2                   /* yes => return */
 
        incl %eax               /* increment pointer */
-       cmpl $3, %ecx           /* was alignment = 3? */
+       xorl $3, %edx           /* was alignment = 3? */
 
-       je L11                  /* yes => now it is aligned and start loop */
+       jz L1                   /* yes => now it is aligned and start loop */
 
-       cmpb %ch, (%eax)        /* is byte NUL? */
+L0:    cmpb %dh, (%eax)        /* is byte NUL? */
        je L2                   /* yes => return */
 
        incl %eax               /* increment pointer */
-       cmpl $2, %ecx           /* was alignment = 2? */
 
-       je L11                  /* yes => now it is aligned and start loop */
-
-       cmpb %ch, (%eax)        /* is byte NUL? */
+       cmpb %dh, (%eax)        /* is byte NUL? */
        je L2                   /* yes => return */
 
        incl %eax               /* increment pointer */
+       xorl %edx, %edx         /* We need %edx == 0 for later */
 
       /* We exit the loop if adding MAGIC_BITS to LONGWORD fails to
         change any of the hole bits of LONGWORD.
@@ -88,8 +87,9 @@ ENTRY(strlen)
         into bit 16.  Similarly, there will be a carry into bit
         24.  If one of bits 24-31 is set, there will be a carry
         into bit 32 (=carry flag), so all of the hole bits will
-        be changed.  */
-L11:   xorl %edx, %edx         /* We need %edx == 0 for later */
+        be changed.
+
+        Note: %edx == 0 in any case here.  */
 
 L1:
        movl (%eax), %ecx       /* get word (= 4 bytes) in question */
diff --git a/sysdeps/unix/sysv/linux/init-first.h b/sysdeps/unix/sysv/linux/init-first.h
new file mode 100644 (file)
index 0000000..dd4f85a
--- /dev/null
@@ -0,0 +1,31 @@
+/* The job of this fragment it to find argc and friends for INIT.
+   This is done in one of two ways: either in the stack context
+   of program start, or having dlopen pass them in.  */
+
+#define SYSDEP_CALL_INIT(NAME, INIT)                                         \
+void NAME (void *arg)                                                        \
+{                                                                            \
+  int argc;                                                                  \
+  char **argv, **envp;                                                       \
+  /* The next variable is only here to work around a bug in gcc <= 2.7.2.1.   \
+     If the address would be taken inside the expression the optimizer       \
+     would try to be too smart and throws it away.  Grrr.  */                \
+  int *dummy_addr = &_dl_starting_up;                                        \
+                                                                             \
+  __libc_multiple_libcs = dummy_addr && !_dl_starting_up;                    \
+                                                                             \
+  if (!__libc_multiple_libcs)                                                \
+    {                                                                        \
+      argc = (int) arg;                                                              \
+      argv = (char **) &arg + 1;                                             \
+      envp = &argv[argc+1];                                                  \
+    }                                                                        \
+  else                                                                       \
+    {                                                                        \
+      argc = (int) arg;                                                              \
+      argv = ((char ***) &arg)[1];                                           \
+      envp = ((char ***) &arg)[2];                                           \
+    }                                                                        \
+                                                                             \
+  INIT (argc, argv, envp);                                                   \
+}