]> sourceware.org Git - glibc.git/commitdiff
Fri Sep 1 16:16:12 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
authorRoland McGrath <roland@gnu.org>
Fri, 1 Sep 1995 22:25:08 +0000 (22:25 +0000)
committerRoland McGrath <roland@gnu.org>
Fri, 1 Sep 1995 22:25:08 +0000 (22:25 +0000)
* libc-symbols.h (link_warning): Take new first arg SYMBOL; ask
for a warning on references to that specific symbol, not the
entire containing object file.
(stub_warning): Pass symbol name to link_warning.
* stdio/gets.c: Pass function name in link_warning invocation.

* hurd/intr-msg.c: Treat apparent EINTR return from msg trap like
MACH_SEND_INTERRUPTED.  That indicates interrupt_operation was
sent, but failed.

* stdlib/msort.c: Include memcopy.h.
(msort_with_tmp): If operating on aligned op_t words, use direct word
fetches and stores.

* sysdeps/i386/dl-machine.h (ELF_MACHINE_BEFORE_RTLD_RELOC): Add
missing backslash.

ChangeLog
hurd/intr-msg.c
libc-symbols.h
posix/regex.c
stdio/gets.c
stdlib/msort.c
sysdeps/i386/__longjmp.S
sysdeps/i386/dl-machine.h
sysdeps/i386/setjmp.S

index 7e96a8824b45dea0f5a3d7f451e69be7747ef825..1922f6a6bc20864d3fcafeaf0f6f9025aebab5f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+Fri Sep  1 16:16:12 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
+
+       * libc-symbols.h (link_warning): Take new first arg SYMBOL; ask
+       for a warning on references to that specific symbol, not the
+       entire containing object file.
+       (stub_warning): Pass symbol name to link_warning.
+       * stdio/gets.c: Pass function name in link_warning invocation.
+
+       * hurd/intr-msg.c: Treat apparent EINTR return from msg trap like
+       MACH_SEND_INTERRUPTED.  That indicates interrupt_operation was
+       sent, but failed.
+
+       * stdlib/msort.c: Include memcopy.h.
+       (msort_with_tmp): If operating on aligned op_t words, use direct word
+       fetches and stores.
+
+       * sysdeps/i386/dl-machine.h (ELF_MACHINE_BEFORE_RTLD_RELOC): Add
+       missing backslash.
+
 Thu Aug 31 13:23:35 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
 
        * sysdeps/unix/i386/brk.S [PIC]: Set __curbrk through the GOT.
index b345e72cc4f617b0cd353e908075c3fcc8b7999c..41f43e1e282c7b1fe53319906b1bbff0a50369ee 100644 (file)
@@ -77,6 +77,7 @@ _hurd_intr_rpc_mach_msg (mach_msg_header_t *msg,
        goto interrupted;
 
     case MACH_SEND_INTERRUPTED: /* RPC didn't get out.  */
+    case EINTR:                        /* Server not cooperating with interrupt.  */
       if (ss->intr_port != MACH_PORT_NULL)
        /* If this signal was for us and it should interrupt calls, the
           signal thread will have cleared SS->intr_port.
index 7cc67a2b7e50b142203cba10a60adbf9e09438d3..8030abb08956d294548101d5477f58113e8f4f0c 100644 (file)
@@ -155,27 +155,27 @@ Cambridge, MA 02139, USA.  */
 
 
 
-/* When the file using this macro is linked in, the linker
-   will emit a warning message MSG.  */
+/* When a reference to SYMBOL is encountered, the linker will emit a
+   warning message MSG.  */
 #ifdef HAVE_GNU_LD
 #ifdef HAVE_ELF
-#define link_warning(msg)                      \
-  static const char __evoke_link_warning__[]   \
-    __attribute__ ((section (".gnu.warning"))) = msg;
+#define link_warning(symbol, msg)                      \
+  static const char __evoke_link_warning_##symbol[]    \
+    __attribute__ ((section (".gnu.warning." #symbol))) = msg;
 #else
-#define link_warning(msg)              \
+#define link_warning(symbol, msg)              \
   asm(".stabs \"" msg "\",30,0,0,0\n"  \
-      ".stabs \"__evoke_link_warning__\",1,0,0,0\n"\
-      ".stabs \"__evoke_link_warning__\",2,0,0,0\n");
+      ".stabs \"" __SYMBOL_PREFIX #symbol "\",1,0,0,0\n");
 #endif
 #else
 /* We will never be heard; they will all die horribly.  */
-#define link_warning(msg)
+#define link_warning(symbol, msg)
 #endif
 
 /* A canned warning for sysdeps/stub functions.  */
 #define        stub_warning(name) \
-  link_warning ("warning: " #name " is not implemented and will always fail")
+  link_warning (name, \
+               "warning: " #name " is not implemented and will always fail")
 
 /*
 \f
index 8c4ab389549cb3a73ed42c8e8220fce83c267dcf..db0ebc23a588c36bbe9f5d9abe0e10669954b51a 100644 (file)
@@ -3040,7 +3040,7 @@ re_compile_fastmap (bufp)
        case at_dot:
        case after_dot:
           continue;
-#endif /* not emacs */
+#endif /* emacs */
 
 
         case no_op:
@@ -3279,6 +3279,17 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
        range = 1;
     }
 
+#ifdef emacs
+  /* In a forward search for something that starts with \=.
+     don't keep searching past point.  */
+  if (bufp->used > 0 && (re_opcode_t) bufp->buffer[0] == at_dot && range > 0)
+    {
+      range = PT - startpos;
+      if (range <= 0)
+       return -1;
+    }
+#endif /* emacs */
+
   /* Update the fastmap now if not correct already.  */
   if (fastmap && !bufp->fastmap_accurate)
     if (re_compile_fastmap (bufp) == -2)
@@ -4682,13 +4693,6 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop)
           if (PTR_CHAR_POS ((unsigned char *) d) <= point)
            goto fail;
          break;
-#if 0 /* not emacs19 */
-       case at_dot:
-          DEBUG_PRINT1 ("EXECUTING at_dot.\n");
-         if (PTR_CHAR_POS ((unsigned char *) d) + 1 != point)
-           goto fail;
-         break;
-#endif /* not emacs19 */
 
        case syntaxspec:
           DEBUG_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt);
index 2267792fb074f1eed6f3bf435ace72bea243848b..37426cf4e3e47c2e834fd9fc16e69ff38a3ddeb4 100644 (file)
@@ -21,7 +21,8 @@ Cambridge, MA 02139, USA.  */
 #include <errno.h>
 #include <string.h>
 
-link_warning ("the `gets' function is unreliable and should not be used.")
+link_warning (gets,
+             "the `gets' function is unreliable and should not be used.")
 
 /* Read a newline-terminated string from stdin into S,
    removing the trailing newline.  Return S or NULL.  */
index 92ba5182eda8a5c8b34543148fc402dd9f85ae44..959aaa3dda0e2a1d83b5007ea19e94d98719c524 100644 (file)
@@ -1,5 +1,5 @@
 /* msort -- an alternative to qsort, with an identical interface.
-   Copyright (C) 1992 Free Software Foundation, Inc.
+   Copyright (C) 1992, 1995 Free Software Foundation, Inc.
    Written by Mike Haertel, September 1988.
 
 This file is part of the GNU C Library.
@@ -22,11 +22,7 @@ Cambridge, MA 02139, USA.  */
 #include <ansidecl.h>
 #include <stdlib.h>
 #include <string.h>
-
-#define MEMCPY(dst, src, s)                    \
-  ((s) == sizeof (int)                         \
-   ? (*(int *) (dst) = *(int *) (src), (dst))  \
-   : memcpy (dst, src, s))
+#include <memcopy.h>
 
 static void
 DEFUN(msort_with_tmp, (b, n, s, cmp, t),
@@ -49,22 +45,38 @@ DEFUN(msort_with_tmp, (b, n, s, cmp, t),
 
   tmp = t;
 
-  while (n1 > 0 && n2 > 0)
-    {
-      if ((*cmp) (b1, b2) <= 0)
-       {
-         MEMCPY (tmp, b1, s);
-         b1 += s;
-         --n1;
-       }
-      else
-       {
-         MEMCPY (tmp, b2, s);
-         b2 += s;
-         --n2;
-       }
-      tmp += s;
-    }
+  if (s == OPSIZ && (b1 - b2) % OPSIZ == 0)
+    /* We are operating on aligned words.  Use direct word stores.  */
+    while (n1 > 0 && n2 > 0)
+      {
+       if ((*cmp) (b1, b2) <= 0)
+         {
+           --n1;
+           *((op_t *) tmp)++ = *((op_t *) b1)++;
+         }
+       else
+         {
+           --n2;
+           *((op_t *) tmp)++ = *((op_t *) b2)++;
+         }
+      }
+  else
+    while (n1 > 0 && n2 > 0)
+      {
+       if ((*cmp) (b1, b2) <= 0)
+         {
+           memcpy (tmp, b1, s);
+           b1 += s;
+           --n1;
+         }
+       else
+         {
+           memcpy (tmp, b2, s);
+           b2 += s;
+           --n2;
+         }
+       tmp += s;
+      }
   if (n1 > 0)
     memcpy (tmp, b1, n1 * s);
   memcpy (b, t, (n - n2) * s);
index f5466228286f8f8381e149d86750f4bf0b475ef2..77916cdc3862b60135bc82dee8db176f6d3cdcba 100644 (file)
@@ -25,11 +25,11 @@ ENTRY (__longjmp)
        movl 4(%esp), %ecx      /* User's jmp_buf in %ecx.  */
        movl 8(%esp), %eax      /* Second argument is return value.  */
        /* Restore registers.  */
-       movl JB_BX(%ecx), %ebx
-       movl JB_SI(%ecx), %esi
-       movl JB_DI(%ecx), %edi
-       movl JB_BP(%ecx), %ebp
-       movl JB_SP(%ecx), %esp
+       movl (JB_BX*4)(%ecx), %ebx
+       movl (JB_SI*4)(%ecx), %esi
+       movl (JB_DI*4)(%ecx), %edi
+       movl (JB_BP*4)(%ecx), %ebp
+       movl (JB_SP*4)(%ecx), %esp
        /* Jump to saved PC.  */
-       movl JB_PC(%ecx), %ecx
+       movl (JB_PC*4)(%ecx), %ecx
        jmp *%ecx
index d509e08b6f65ce3e58770d09312b02e40924c37d..800c2d7b685a8c1a490591d2f2d15da0d589bfba 100644 (file)
@@ -65,7 +65,7 @@ elf_machine_load_address (void)
    This will be the first relocation in the text of the dynamic linker;
    we skip it to avoid trying to modify read-only text in this early stage.  */
 #define ELF_MACHINE_BEFORE_RTLD_RELOC(dynamic_info) \
-  ++(const Elf32_Rel *) (dynamic_info)[DT_REL]->d_un.d_ptr;
+  ++(const Elf32_Rel *) (dynamic_info)[DT_REL]->d_un.d_ptr; \
   (dynamic_info)[DT_RELSZ]->d_un.d_val -= sizeof (Elf32_Rel);
 
 /* Perform the relocation specified by RELOC and SYM (which is fully resolved).
index a07d6f1137ab8a93a8ba1af8b153582309520b6e..ccb714760684102acab2e76011080f5d0f512a79 100644 (file)
@@ -24,13 +24,26 @@ Cambridge, MA 02139, USA.  */
 ENTRY (__sigsetjmp)
        movl 4(%esp), %eax      /* User's jmp_buf in %eax.  */
        /* Save registers.  */
-       movl %ebx, JB_BX(%eax)
-       movl %esi, JB_SI(%eax)
-       movl %edi, JB_DI(%eax)
-       movl %ebp, JB_BP(%eax)
+       movl %ebx, (JB_BX*4)(%eax)
+       movl %esi, (JB_SI*4)(%eax)
+       movl %edi, (JB_DI*4)(%eax)
+       movl %ebp, (JB_BP*4)(%eax)
        leal 4(%esp), %ecx      /* Save SP as it will be after we return.  */
-       movl %ecx, JB_SP(%eax)
+       movl %ecx, (JB_SP*4)(%eax)
        movl 0(%esp), %ecx      /* Save PC we are returning to now.  */
-       movl %ecx, JB_PC(%eax)
-       xorl %eax, %eax         /* Return zero.  */
-       ret
+       movl %ecx, (JB_PC*4)(%eax)
+
+       /* Make a tail call to __sigjmp_save; it takes the same args.  */
+#ifdef PIC
+       /* We cannot use the PLT, because it requires that %ebx be set, but
+           we can't save and restore our caller's value.  Instead, we do an
+           indirect jump through the GOT, using for the temporary register
+           %ecx, which is call-clobbered.  */
+       call here
+here:  popl %ecx
+       addl $_GLOBAL_OFFSET_TABLE_+[.-here], %ecx
+       movl C_SYMBOL_NAME(__sigjmp_save@GOT)(%ecx), %ecx
+       jmp *%ecx
+#else
+       jmp __sigjmp_save
+#endif
This page took 0.057719 seconds and 5 git commands to generate.