[uClibc-cvs] uClibc/ldso/ldso/powerpc dl-syscalls.h,1.4,1.5
Erik Andersen
andersen at uclibc.org
Wed May 12 22:54:56 UTC 2004
Update of /var/cvs/uClibc/ldso/ldso/powerpc
In directory nail:/tmp/cvs-serv535/ldso/powerpc
Modified Files:
dl-syscalls.h
Log Message:
Add a local '_dl_errno' to be used by syscalls in ldso, allowing
useful syscall failure diagnostics.
Index: dl-syscalls.h
===================================================================
RCS file: /var/cvs/uClibc/ldso/ldso/powerpc/dl-syscalls.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- a/dl-syscalls.h 15 Jun 2003 01:08:43 -0000 1.4
+++ b/dl-syscalls.h 12 May 2004 22:54:53 -0000 1.5
@@ -19,6 +19,11 @@
#define __NR_stat 106
#define __NR_mprotect 125
+
+/* We can't use the real errno in ldso, since it has not yet
+ * been dynamicly linked in yet. */
+extern int _dl_errno;
+
/* Here are the macros which define how this platform makes
* system calls. This particular variant does _not_ set
* errno (note how it is disabled in __syscall_return) since
@@ -27,7 +32,7 @@
#undef __syscall_return
#define __syscall_return(type) \
- return (__sc_err & 0x10000000 ? /*errno = __sc_ret,*/ __sc_ret = -1 : 0), \
+ return (__sc_err & 0x10000000 ? _dl_errno = __sc_ret, __sc_ret = -1 : 0), \
(type) __sc_ret
#undef __syscall_clobbers
More information about the uClibc-cvs
mailing list