Browse Source

__set_errno must be redefined after #include "sys/syscall.h".
syscall.h should not have it's own version of __set_errno, instead syscall.h should
include errno.h(see powerpc) since errno handling depends on threads/no threads.

I leave the the fixing of syscall.h since there might be some smaller compile problems.

Joakim Tjernlund 18 years ago
parent
commit
b031a35828

+ 2 - 1
ldso/ldso/arm/dl-syscalls.h

@@ -1,6 +1,7 @@
 /* We can't use the real errno in ldso, since it has not yet
  * been dynamicly linked in yet. */
+#include "sys/syscall.h"
 extern int _dl_errno;
+#undef __set_errno
 #define __set_errno(X) {(_dl_errno) = (X);}
-#include "sys/syscall.h"
 

+ 2 - 1
ldso/ldso/cris/dl-syscalls.h

@@ -1,5 +1,6 @@
 /* We can't use the real errno in ldso, since it has not yet
  * been dynamicly linked in yet. */
+#include "sys/syscall.h"
 extern int _dl_errno;
+#undef __set_errno
 #define __set_errno(X) {(_dl_errno) = (X);}
-#include "sys/syscall.h"

+ 2 - 1
ldso/ldso/frv/dl-syscalls.h

@@ -20,9 +20,10 @@ USA.  */
 
 /* We can't use the real errno in ldso, since it has not yet
  * been dynamicly linked in yet. */
+#include "sys/syscall.h"
 extern int _dl_errno;
+#undef __set_errno
 #define __set_errno(X) {(_dl_errno) = (X);}
-#include "sys/syscall.h"
 #include <sys/mman.h>
 
 /* The code below is extracted from libc/sysdeps/linux/frv/_mmap.c */

+ 2 - 1
ldso/ldso/i386/dl-syscalls.h

@@ -1,5 +1,6 @@
 /* We can't use the real errno in ldso, since it has not yet
  * been dynamicly linked in yet. */
+#include "sys/syscall.h"
 extern int _dl_errno;
+#undef __set_errno
 #define __set_errno(X) {(_dl_errno) = (X);}
-#include "sys/syscall.h"

+ 2 - 1
ldso/ldso/m68k/dl-syscalls.h

@@ -1,5 +1,6 @@
 /* We can't use the real errno in ldso, since it has not yet
  * been dynamicly linked in yet. */
+#include "sys/syscall.h"
 extern int _dl_errno;
+#undef __set_errno
 #define __set_errno(X) {(_dl_errno) = (X);}
-#include "sys/syscall.h"

+ 2 - 1
ldso/ldso/mips/dl-syscalls.h

@@ -1,7 +1,8 @@
 /* We can't use the real errno in ldso, since it has not yet
  * been dynamicly linked in yet. */
+#include "sys/syscall.h"
 extern int _dl_errno;
+#undef __set_errno
 #define __set_errno(X) {(_dl_errno) = (X);}
-#include "sys/syscall.h"
 
 #define MMAP_HAS_6_ARGS

+ 2 - 1
ldso/ldso/sh/dl-syscalls.h

@@ -1,7 +1,8 @@
 /* We can't use the real errno in ldso, since it has not yet
  * been dynamicly linked in yet. */
+#include "sys/syscall.h"
 extern int _dl_errno;
+#undef __set_errno
 #define __set_errno(X) {(_dl_errno) = (X);}
-#include "sys/syscall.h"
 
 #define MMAP_HAS_6_ARGS

+ 2 - 1
ldso/ldso/sh64/dl-syscalls.h

@@ -1,8 +1,9 @@
 /* We can't use the real errno in ldso, since it has not yet
  * been dynamicly linked in yet. */
+#include "sys/syscall.h"
 extern int _dl_errno;
+#undef __set_errno
 #define __set_errno(X) {(_dl_errno) = (X);}
-#include "sys/syscall.h"
 
 #undef __syscall_return
 #define __syscall_return(type, res)					\

+ 2 - 1
ldso/ldso/x86_64/dl-syscalls.h

@@ -1,7 +1,8 @@
 /* We can't use the real errno in ldso, since it has not yet
  * been dynamicly linked in yet. */
+#include "sys/syscall.h"
 extern int _dl_errno;
+#undef __set_errno
 #define __set_errno(X) {(_dl_errno) = (X);}
-#include "sys/syscall.h"
 
 #define MMAP_HAS_6_ARGS