OSDN Git Service

ldso: merge duplicate dl-syscalls.h code to common header
authorMike Frysinger <vapier@gentoo.org>
Wed, 5 Oct 2011 03:26:08 +0000 (23:26 -0400)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Thu, 6 Oct 2011 20:34:36 +0000 (22:34 +0200)
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
17 files changed:
ldso/include/dl-syscall.h
ldso/ldso/arm/dl-syscalls.h
ldso/ldso/avr32/dl-syscalls.h
ldso/ldso/bfin/dl-syscalls.h
ldso/ldso/c6x/dl-syscalls.h
ldso/ldso/cris/dl-syscalls.h
ldso/ldso/frv/dl-syscalls.h
ldso/ldso/i386/dl-syscalls.h
ldso/ldso/m68k/dl-syscalls.h
ldso/ldso/microblaze/dl-syscalls.h
ldso/ldso/mips/dl-syscalls.h
ldso/ldso/powerpc/dl-syscalls.h
ldso/ldso/sh/dl-syscalls.h
ldso/ldso/sh64/dl-syscalls.h
ldso/ldso/sparc/dl-syscalls.h
ldso/ldso/x86_64/dl-syscalls.h
ldso/ldso/xtensa/dl-syscalls.h

index da3ac7f..7539c22 100644 (file)
@@ -8,6 +8,13 @@
 #ifndef _LD_SYSCALL_H_
 #define _LD_SYSCALL_H_
 
+/* 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);}
+
 /* Pull in the arch specific syscall implementation */
 #include <dl-syscalls.h>
 /*  For MAP_ANONYMOUS -- differs between platforms */
index 1c0e669..195461f 100644 (file)
@@ -1,9 +1,3 @@
-/* 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);}
 /* _call_via_rX calls are used in thumb ldso because of calls via
  * function pointers, but ldso is not linked with anything which
  * provides them, so define them here (only required for thumb).
index 996bb87..f40c4fd 100644 (file)
@@ -1,6 +1 @@
-/* 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);}
+/* stub for arch-specific syscall issues */
index f74cf1a..a119c74 100644 (file)
@@ -18,12 +18,6 @@ License along with uClibc; see the file COPYING.LIB.  If not, write to
 the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
 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/mman.h>
 
 /* The code below is extracted from libc/sysdeps/linux/frv/_mmap.c */
index 9ff3358..66d96ab 100644 (file)
@@ -4,14 +4,6 @@
  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  */
 
-/* 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/mman.h>
-
 #ifdef __NR_pread64
 #define __NR___syscall_pread __NR_pread64
 static __always_inline _syscall5(ssize_t, __syscall_pread, int, fd, void *, buf,
index 996bb87..f40c4fd 100644 (file)
@@ -1,6 +1 @@
-/* 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);}
+/* stub for arch-specific syscall issues */
index a4bff1d..13b887b 100644 (file)
@@ -4,12 +4,6 @@
  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
  */
 
-/* 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/mman.h>
 
 /* The code below is extracted from libc/sysdeps/linux/frv/_mmap.c */
index 996bb87..f40c4fd 100644 (file)
@@ -1,6 +1 @@
-/* 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);}
+/* stub for arch-specific syscall issues */
index 996bb87..f40c4fd 100644 (file)
@@ -1,6 +1 @@
-/* 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);}
+/* stub for arch-specific syscall issues */
index 996bb87..f40c4fd 100644 (file)
@@ -1,6 +1 @@
-/* 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);}
+/* stub for arch-specific syscall issues */
index 996bb87..f40c4fd 100644 (file)
@@ -1,6 +1 @@
-/* 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);}
+/* stub for arch-specific syscall issues */
index 996bb87..f40c4fd 100644 (file)
@@ -1,6 +1 @@
-/* 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);}
+/* stub for arch-specific syscall issues */
index 712852c..f9f13c7 100644 (file)
@@ -1,10 +1,3 @@
-/* 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);}
-
 #if __GNUC_PREREQ (4, 1)
 #warning !!! gcc 4.1 and later have problems with __always_inline so redefined as inline
 # ifdef __always_inline
index 4fe50fa..2ea4bb7 100644 (file)
@@ -1,10 +1,3 @@
-/* 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);}
-
 #undef __syscall_return
 #define __syscall_return(type, res)                                    \
 do {                                                                   \
index 996bb87..f40c4fd 100644 (file)
@@ -1,6 +1 @@
-/* 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);}
+/* stub for arch-specific syscall issues */
index 996bb87..f40c4fd 100644 (file)
@@ -1,6 +1 @@
-/* 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);}
+/* stub for arch-specific syscall issues */
index 4b42a57..f40c4fd 100644 (file)
@@ -1,7 +1 @@
-/* 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);}
-
+/* stub for arch-specific syscall issues */