summaryrefslogtreecommitdiff
path: root/firmware
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
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')
-rw-r--r--firmware/SOURCES2
-rw-r--r--firmware/include/errno.h7
2 files changed, 9 insertions, 0 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES
index 23c3a6dddc..7ebfba38e1 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -14,7 +14,9 @@ common/file.c
14common/dircache.c 14common/dircache.c
15#endif 15#endif
16common/disk.c 16common/disk.c
17#if !defined(SIMULATOR) || defined(__MINGW32__) || defined(__CYGWIN__)
17common/errno.c 18common/errno.c
19#endif
18common/memcmp.c 20common/memcmp.c
19common/memchr.c 21common/memchr.c
20common/qsort.c 22common/qsort.c
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 */