summaryrefslogtreecommitdiffstats
path: root/libc/sysdeps/linux/mips
diff options
context:
space:
mode:
Diffstat (limited to 'libc/sysdeps/linux/mips')
-rw-r--r--libc/sysdeps/linux/mips/__syscall_error.c8
-rw-r--r--libc/sysdeps/linux/mips/bits/msq.h23
-rw-r--r--libc/sysdeps/linux/mips/bsd-setjmp.S2
-rw-r--r--libc/sysdeps/linux/mips/clone.S5
4 files changed, 31 insertions, 7 deletions
diff --git a/libc/sysdeps/linux/mips/__syscall_error.c b/libc/sysdeps/linux/mips/__syscall_error.c
index 9ab65ed79..de65a1f39 100644
--- a/libc/sysdeps/linux/mips/__syscall_error.c
+++ b/libc/sysdeps/linux/mips/__syscall_error.c
@@ -1,4 +1,4 @@
-/* Wrapper around clone system call.
+/* Wrapper for setting errno.
Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -18,12 +18,12 @@
02111-1307 USA. */
#include <errno.h>
+#include <features.h>
/* This routine is jumped to by all the syscall handlers, to stash
* an error number into errno. */
-int __syscall_error (int err_no)
+int attribute_hidden __syscall_error(int err_no)
{
- __set_errno (err_no);
+ __set_errno(err_no);
return -1;
}
-
diff --git a/libc/sysdeps/linux/mips/bits/msq.h b/libc/sysdeps/linux/mips/bits/msq.h
index c2c1dd2e8..2b0d38ec8 100644
--- a/libc/sysdeps/linux/mips/bits/msq.h
+++ b/libc/sysdeps/linux/mips/bits/msq.h
@@ -21,6 +21,7 @@
#endif
#include <bits/types.h>
+#include <bits/wordsize.h>
/* Define options for message queue functions. */
#define MSG_NOERROR 010000 /* no error if message is too big */
@@ -38,16 +39,34 @@ typedef unsigned long int msglen_t;
struct msqid_ds
{
struct ipc_perm msg_perm; /* structure describing operation permission */
+#if (__WORDSIZE == 32) && !defined(__MIPSEL__)
+ unsigned long __unused1;
+#endif
__time_t msg_stime; /* time of last msgsnd command */
+#if (__WORDSIZE == 32) && defined(__MIPSEL__)
+ unsigned long __unused1;
+#endif
+#if (__WORDSIZE == 32) && !defined(__MIPSEL__)
+ unsigned long __unused2;
+#endif
__time_t msg_rtime; /* time of last msgrcv command */
+#if (__WORDSIZE == 32) && defined(__MIPSEL__)
+ unsigned long __unused2;
+#endif
+#if (__WORDSIZE == 32) && !defined(__MIPSEL__)
+ unsigned long __unused3;
+#endif
__time_t msg_ctime; /* time of last change */
+#if (__WORDSIZE == 32) && defined(__MIPSEL__)
+ unsigned long __unused3;
+#endif
unsigned long int __msg_cbytes; /* current number of bytes on queue */
msgqnum_t msg_qnum; /* number of messages currently on queue */
msglen_t msg_qbytes; /* max number of bytes allowed on queue */
__pid_t msg_lspid; /* pid of last msgsnd() */
__pid_t msg_lrpid; /* pid of last msgrcv() */
- unsigned long int __unused1;
- unsigned long int __unused2;
+ unsigned long int __unused4;
+ unsigned long int __unused5;
};
#ifdef __USE_MISC
diff --git a/libc/sysdeps/linux/mips/bsd-setjmp.S b/libc/sysdeps/linux/mips/bsd-setjmp.S
index 51af9c891..49a904d29 100644
--- a/libc/sysdeps/linux/mips/bsd-setjmp.S
+++ b/libc/sysdeps/linux/mips/bsd-setjmp.S
@@ -34,8 +34,8 @@
.type setjmp,@function
setjmp:
-#ifdef __PIC__
.set noreorder
+#ifdef __PIC__
.cpload t9
.set reorder
la t9, __sigsetjmp
diff --git a/libc/sysdeps/linux/mips/clone.S b/libc/sysdeps/linux/mips/clone.S
index 3b879040a..079d2bef2 100644
--- a/libc/sysdeps/linux/mips/clone.S
+++ b/libc/sysdeps/linux/mips/clone.S
@@ -72,6 +72,11 @@ __clone:
/* Something bad happened -- no child created */
error:
addiu sp,32
+
+ /* uClibc change -- start */
+ move a0,v0 /* Pass return val to C function. */
+ /* uClibc change -- stop */
+
#ifdef __PIC__
la t9,__syscall_error
jr t9