about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/i386
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/i386')
-rw-r--r--sysdeps/unix/sysv/linux/i386/brk.c3
-rw-r--r--sysdeps/unix/sysv/linux/i386/sigaction.c4
-rw-r--r--sysdeps/unix/sysv/linux/i386/sysdep.S3
-rw-r--r--sysdeps/unix/sysv/linux/i386/sysdep.h2
4 files changed, 8 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/brk.c b/sysdeps/unix/sysv/linux/i386/brk.c
index f9e92dde5e..d11c3c40d9 100644
--- a/sysdeps/unix/sysv/linux/i386/brk.c
+++ b/sysdeps/unix/sysv/linux/i386/brk.c
@@ -45,11 +45,10 @@ __brk (void *addr)
 
   if (newbrk < addr)
     {
-      errno = ENOMEM;
+      __set_errno (ENOMEM);
       return -1;
     }
 
   return 0;
 }
 weak_alias (__brk, brk)
-
diff --git a/sysdeps/unix/sysv/linux/i386/sigaction.c b/sysdeps/unix/sysv/linux/i386/sigaction.c
index 58e637eed5..f3ecd4bd15 100644
--- a/sysdeps/unix/sysv/linux/i386/sigaction.c
+++ b/sysdeps/unix/sysv/linux/i386/sigaction.c
@@ -1,5 +1,5 @@
 /* POSIX.1 `sigaction' call for Linux/i386.
-Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+Copyright (C) 1991, 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
@@ -48,7 +48,7 @@ __sigaction (int sig, const struct sigaction *act, struct sigaction *oact)
 
   if (result < 0)
     {
-      errno = -result;
+      __set_errno (-result);
       return -1;
     }
   return 0;
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.S b/sysdeps/unix/sysv/linux/i386/sysdep.S
index 0f3e31dbce..213af51548 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep.S
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.S
@@ -33,6 +33,9 @@ errno:	.zero 4
 	.globl _errno
 	.type _errno,@object
 _errno = errno	/* This name is expected by hj libc.so.5 startup code.  */
+	.globl __errno
+	.type __errno,@object
+__errno = errno	/* This name is expected by the MT code.  */
 	.text
 
 /* The following code is only used in the shared library when we
diff --git a/sysdeps/unix/sysv/linux/i386/sysdep.h b/sysdeps/unix/sysv/linux/i386/sysdep.h
index cbd7b5553b..1bf20bd718 100644
--- a/sysdeps/unix/sysv/linux/i386/sysdep.h
+++ b/sysdeps/unix/sysv/linux/i386/sysdep.h
@@ -71,6 +71,8 @@ syscall_error:								      \
   movl %ecx, (%eax);							      \
   movl $-1, %eax;							      \
   ret;
+/* A quick note: it is assumed that the call to `__errno_location' does
+   not modify the parameter value!  */
 #else
 #define SYSCALL_ERROR_HANDLER						      \
   .type syscall_error,@function;					      \