about summary refs log tree commit diff
path: root/sysdeps/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1996-10-02 01:40:17 +0000
committerUlrich Drepper <drepper@redhat.com>1996-10-02 01:40:17 +0000
commita68b0d31a37a86785b3dbeeee3fad96ee71fadcd (patch)
tree61537b1f028002a9e6e0f5354fced6128bda8b9c /sysdeps/posix
parent2d07133b507b13d4a5ed6dc250f4345c8a26942a (diff)
downloadglibc-a68b0d31a37a86785b3dbeeee3fad96ee71fadcd.tar.gz
glibc-a68b0d31a37a86785b3dbeeee3fad96ee71fadcd.tar.xz
glibc-a68b0d31a37a86785b3dbeeee3fad96ee71fadcd.zip
update from main archive 961001
Diffstat (limited to 'sysdeps/posix')
-rw-r--r--sysdeps/posix/euidaccess.c2
-rw-r--r--sysdeps/posix/sigvec.c3
-rw-r--r--sysdeps/posix/tempname.c19
3 files changed, 19 insertions, 5 deletions
diff --git a/sysdeps/posix/euidaccess.c b/sysdeps/posix/euidaccess.c
index 26f3af6374..f3a10c9b9c 100644
--- a/sysdeps/posix/euidaccess.c
+++ b/sysdeps/posix/euidaccess.c
@@ -67,7 +67,7 @@ gid_t getegid ();
 extern int errno;
 #endif
 #ifndef __set_errno
-#define __set_errno(val) errno = 8val)
+#define __set_errno(val) errno = (val)
 #endif
 
 #if defined(EACCES) && !defined(EACCESS)
diff --git a/sysdeps/posix/sigvec.c b/sysdeps/posix/sigvec.c
index 6a224e1733..7e9aeb368e 100644
--- a/sysdeps/posix/sigvec.c
+++ b/sysdeps/posix/sigvec.c
@@ -26,6 +26,9 @@ Cambridge, MA 02139, USA.  */
 static __sighandler_t wrapped_handlers[NSIG];
 static sigset_t wrapped_masks[NSIG];
 
+static void wrapper_handler __P ((int sig));
+static inline int convert_mask __P ((sigset_t *set, const int mask));
+
 static void
 wrapper_handler (sig)
      int sig;
diff --git a/sysdeps/posix/tempname.c b/sysdeps/posix/tempname.c
index d58024fe7e..61774a0b3e 100644
--- a/sysdeps/posix/tempname.c
+++ b/sysdeps/posix/tempname.c
@@ -150,7 +150,7 @@ __stdio_gen_tempname (char *buf, size_t bufsize, const char *dir,
   len = dlen + 1 + plen + 5 + 3;
   while (1)
     {
-      const size_t i;
+      size_t i;
 
       if (*idx >= ((sizeof (letters) - 1) * (sizeof (letters) - 1) *
 		   (sizeof (letters) - 1)))
@@ -193,11 +193,18 @@ __stdio_gen_tempname (char *buf, size_t bufsize, const char *dir,
 		 Create a stream for it.  */
 #ifdef USE_IN_LIBIO
 	      int save;
+	      struct locked_FILE
+		{
+		  struct _IO_FILE_plus fp;
+#ifdef _IO_MTSAFE_IO
+		  _IO_lock_t lock;
+#endif
+		} *new_f;
 	      struct _IO_FILE_plus *fp;
 
-	      fp = (struct _IO_FILE_plus *)
-		malloc (sizeof (struct _IO_FILE_plus));
-	      if (fp == NULL)
+	      new_f = (struct locked_FILE *)
+		malloc (sizeof (struct locked_FILE));
+	      if (new_f == NULL)
 		{
 		  /* We lost trying to create a stream (out of memory?).
 		     Nothing to do but remove the file, close the descriptor,
@@ -209,6 +216,10 @@ __stdio_gen_tempname (char *buf, size_t bufsize, const char *dir,
 		  __set_errno (save);
 		  return NULL;
 		}
+	      fp = &new_f->fp;
+#ifdef _IO_MTSAFE_IO
+	      fp->file._lock = &new_f->lock;
+#endif
 	      _IO_init (&fp->file, 0);
 	      _IO_JUMPS (&fp->file) = &_IO_file_jumps;
 	      _IO_file_init (&fp->file);