[uClibc-cvs] uClibc/ldso/ldso/frv dl-syscalls.h,1.1,1.2
Erik Andersen
andersen at uclibc.org
Wed May 12 22:54:53 UTC 2004
Update of /var/cvs/uClibc/ldso/ldso/frv
In directory nail:/tmp/cvs-serv535/ldso/frv
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/frv/dl-syscalls.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- a/dl-syscalls.h 18 Feb 2004 08:04:49 -0000 1.1
+++ b/dl-syscalls.h 12 May 2004 22:54:51 -0000 1.2
@@ -17,12 +17,11 @@
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. */
-
-/* Define the __set_errno macro as nothing so that INLINE_SYSCALL
- * won't set errno, which is important since we make system calls
- * before the errno symbol is dynamicly linked. */
-#define __set_errno(X) {(void)(X);}
+/* We can't use the real errno in ldso, since it has not yet
+ * been dynamicly linked in yet. */
+extern int _dl_errno;
+#define __set_errno(X) {(_dl_errno) = (X);}
#include "sys/syscall.h"
#include <sys/mman.h>
More information about the uClibc-cvs
mailing list