summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog18
-rw-r--r--hurd/hurdlookup.c6
-rw-r--r--setjmp/setjmp.h6
-rw-r--r--sysdeps/generic/memmem.c6
-rw-r--r--sysdeps/mach/hurd/mkdir.c4
-rw-r--r--sysdeps/mach/hurd/xmknod.c2
6 files changed, 31 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 3d949d2cc2..41a3f70018 100644
--- 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
diff --git a/hurd/hurdlookup.c b/hurd/hurdlookup.c
index 05ed03833c..227f20e274 100644
--- a/hurd/hurdlookup.c
+++ b/hurd/hurdlookup.c
@@ -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;
diff --git a/setjmp/setjmp.h b/setjmp/setjmp.h
index 479cf973ec..12b05f1033 100644
--- a/setjmp/setjmp.h
+++ b/setjmp/setjmp.h
@@ -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. */
diff --git a/sysdeps/generic/memmem.c b/sysdeps/generic/memmem.c
index 79b4544db5..099897ab80 100644
--- a/sysdeps/generic/memmem.c
+++ b/sysdeps/generic/memmem.c
@@ -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] &&
diff --git a/sysdeps/mach/hurd/mkdir.c b/sysdeps/mach/hurd/mkdir.c
index d477815994..560f5e0a3d 100644
--- a/sysdeps/mach/hurd/mkdir.c
+++ b/sysdeps/mach/hurd/mkdir.c
@@ -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);
diff --git a/sysdeps/mach/hurd/xmknod.c b/sysdeps/mach/hurd/xmknod.c
index 68fb2249b2..b2386d80ee 100644
--- a/sysdeps/mach/hurd/xmknod.c
+++ b/sysdeps/mach/hurd/xmknod.c
@@ -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. */