]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Sun Jan 28 17:25:38 1996 Roland McGrath <roland@churchy.gnu.ai.mit.edu> cvs/libc-960129
authorRoland McGrath <roland@gnu.org>
Sun, 28 Jan 1996 22:47:31 +0000 (22:47 +0000)
committerRoland McGrath <roland@gnu.org>
Sun, 28 Jan 1996 22:47:31 +0000 (22:47 +0000)
* setjmp/setjmp.h (jmp_buf): Give a tag in the struct defn, to
make C++ happy.
* alpha/jmp_buf.h: Likewise.
* m68k/jmp_buf.h: Likewise.
* mips/jmp_buf.h: Likewise.
* sparc/jmp_buf.h: Likewise.
* vax/jmp_buf.h: Likewise.
Sun Jan 28 17:25:38 1996  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

* setjmp/setjmp.h (jmp_buf): Give a tag in the struct defn, to
make C++ happy.
* alpha/jmp_buf.h: Likewise.
* m68k/jmp_buf.h: Likewise.
* mips/jmp_buf.h: Likewise.
* sparc/jmp_buf.h: Likewise.
* vax/jmp_buf.h: Likewise.

* sysdeps/generic/memmem.c: Fix return value in case where
NEEDLE_LEN==0.

* hurd/hurdlookup.c (__file_name_lookup_under,
__file_name_lookup): Restrict mode with umask.
* sysdeps/mach/hurd/xmknod.c: Restrict mode with umask.
* sysdeps/mach/hurd/mkdir.c: Restrict mode with umask.

ChangeLog
hurd/hurdlookup.c
setjmp/setjmp.h
sysdeps/generic/memmem.c
sysdeps/mach/hurd/mkdir.c
sysdeps/mach/hurd/xmknod.c

index 3d949d2cc2e9cd9ac1cdd5729868343698f85955..41a3f70018d02c756a32c8d440005daadecaf7fc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+Sun Jan 28 17:25:38 1996  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
+
+       * setjmp/setjmp.h (jmp_buf): Give a tag in the struct defn, to
+       make C++ happy.
+       * alpha/jmp_buf.h: Likewise.
+       * m68k/jmp_buf.h: Likewise.
+       * mips/jmp_buf.h: Likewise.
+       * sparc/jmp_buf.h: Likewise.
+       * vax/jmp_buf.h: Likewise.
+
+       * sysdeps/generic/memmem.c: Fix return value in case where
+       NEEDLE_LEN==0.
+
+       * hurd/hurdlookup.c (__file_name_lookup_under,
+       __file_name_lookup): Restrict mode with umask.
+       * sysdeps/mach/hurd/xmknod.c: Restrict mode with umask.
+       * sysdeps/mach/hurd/mkdir.c: Restrict mode with umask.
+
 Fri Jan 26 12:20:45 1996  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>
 
        * stdlib/strtol.c: Undo last change.  ANSI C changed since the
index 05ed03833c646a1da68f4e2af371636c1bf35f7f..227f20e2747027609647474614c75456e08b893a 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 
 The GNU C Library is free software; you can redistribute it and/or
@@ -352,7 +352,7 @@ __file_name_lookup (const char *file_name, int flags, mode_t mode)
   file_t result;
 
   err = __hurd_file_name_lookup (&_hurd_ports_use, &__getdport,
-                                file_name, flags, mode,
+                                file_name, flags, mode & ~_hurd_umask,
                                 &result);
 
   return err ? (__hurd_fail (err), MACH_PORT_NULL) : result;
@@ -388,7 +388,7 @@ __file_name_lookup_under (file_t startdir,
     }
 
   err = __hurd_file_name_lookup (&use_init_port, &__getdport,
-                                file_name, flags, mode,
+                                file_name, flags, mode & ~_hurd_umask,
                                 &result);
 
   return err ? (__hurd_fail (err), MACH_PORT_NULL) : result;
index 479cf973ecb691e64ffe9d4cecb8e45de2acc913..12b05f1033c691f17a1e61a0bdf4779220580844 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 92, 93, 94, 95, 96 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 
 The GNU C Library is free software; you can redistribute it and/or
@@ -32,7 +32,7 @@ __BEGIN_DECLS
 #include <sigset.h>            /* Get `__sigset_t'.  */
 
 /* Calling environment, plus possibly a saved signal mask.  */
-typedef struct
+typedef struct __jmp_buf       /* C++ doesn't like tagless structs.  */
   {
     /* NOTE: The machine-dependent definitions of `__sigsetjmp'
        assume that a `jmp_buf' begins with a `__jmp_buf'.
@@ -54,7 +54,7 @@ extern int __sigsetjmp __P ((jmp_buf __env, int __savemask));
    The ANSI C standard says `setjmp' is a macro.  */
 #define        setjmp(env)     __sigsetjmp ((env), 0)
 #else
-/* We are in 4.3 BSD-compatibility mode in which `setjmp' 
+/* We are in 4.3 BSD-compatibility mode in which `setjmp'
    saves the signal mask like `sigsetjmp (ENV, 1)'.  */
 #define        setjmp(env)     __sigsetjmp ((env), 1)
 #endif /* Favor BSD.  */
index 79b4544db5ea9b7c231046f52a37bdda1a4f338d..099897ab80a448a99799b052c2dc0fe01f683850 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 
 The GNU C Library is free software; you can redistribute it and/or
@@ -33,7 +33,9 @@ DEFUN(memmem, (haystack, haystack_len,
     = (CONST char *) haystack + haystack_len - needle_len;
 
   if (needle_len == 0)
-    return (PTR) &((CONST char *) haystack)[needle_len - 1];
+    /* The first occurrence of the empty string is deemed to occur at
+       the end of the string.  */
+    return (PTR) &((CONST char *) haystack)[haystack_len - 1];
 
   for (begin = (CONST char *) haystack; begin <= last_possible; ++begin)
     if (begin[0] == ((CONST char *) needle)[0] &&
index d477815994efe3b17665f0452701aaf5a70a5359..560f5e0a3dbd48662eedd3493bc25e8c09c8984e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1994, 1995 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
 This file is part of the GNU C Library.
 
 The GNU C Library is free software; you can redistribute it and/or
@@ -31,7 +31,7 @@ DEFUN(__mkdir, (file_name, mode), CONST char *file_name AND mode_t mode)
   file_t parent = __file_name_split (file_name, (char **) &name);
   if (parent == MACH_PORT_NULL)
     return -1;
-  err = __dir_mkdir (parent, name, mode);
+  err = __dir_mkdir (parent, name, mode & ~_hurd_umask);
   __mach_port_deallocate (__mach_task_self (), parent);
   if (err)
     return __hurd_fail (err);
index 68fb2249b27d293ce761dc6951f4088800c64d72..b2386d80eedc054fd541e48abd4fd572b3528ff8 100644 (file)
@@ -90,7 +90,7 @@ __xmknod (int vers, const char *file_name, mode_t mode, dev_t *dev)
     return -1;
 
   /* Create a new, unlinked node in the target directory.  */
-  err = __dir_mkfile (dir, O_WRITE, mode & ~S_IFMT & _hurd_umask, &node);
+  err = __dir_mkfile (dir, O_WRITE, (mode & ~S_IFMT) & ~_hurd_umask, &node);
 
   if (! err)
     /* Set the node's translator to make it a device.  */