summaryrefslogtreecommitdiff
path: root/firmware/include/errno.h
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-02-28 23:56:44 +0000
committerJens Arnold <amiconn@rockbox.org>2006-02-28 23:56:44 +0000
commitb4ada860b3f9b5811de9b4bb1de78c042e7a349e (patch)
tree3bc7f11e47f3ec36f439453fca1bf044afb9b225 /firmware/include/errno.h
parentef4e43822fcbdfeb9ede918eb7936d0c945f66ac (diff)
downloadrockbox-b4ada860b3f9b5811de9b4bb1de78c042e7a349e.tar.gz
rockbox-b4ada860b3f9b5811de9b4bb1de78c042e7a349e.zip
Allow building simulators on systems where errno is thread-local by using the system's implementation of errno.h for simulator builds.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8871 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/include/errno.h')
-rw-r--r--firmware/include/errno.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/include/errno.h b/firmware/include/errno.h
index 4162f6a9ed..1843b56f1d 100644
--- a/firmware/include/errno.h
+++ b/firmware/include/errno.h
@@ -1,6 +1,12 @@
1/* errno is not a global variable, because that would make using it 1/* errno is not a global variable, because that would make using it
2 non-reentrant. Instead, its address is returned by the function 2 non-reentrant. Instead, its address is returned by the function
3 __errno. */ 3 __errno. */
4
5#if defined(SIMULATOR) && !defined(__MINGW32__) && !defined(__CYGWIN__)
6
7#include "/usr/include/errno.h" /* use the host system implementation */
8
9#else /* use our own implementation */
4 10
5#ifndef _SYS_ERRNO_H_ 11#ifndef _SYS_ERRNO_H_
6 12
@@ -132,3 +138,4 @@ extern int errno;
132#define __ELASTERROR 2000 /* Users can add values starting here */ 138#define __ELASTERROR 2000 /* Users can add values starting here */
133 139
134#endif /* _SYS_ERRNO_H */ 140#endif /* _SYS_ERRNO_H */
141#endif /* !SIMULATOR */