From 19e3b6fb8b51713d8bb95b1f8f7285103c14a826 Mon Sep 17 00:00:00 2001 From: Björn Stenberg Date: Thu, 8 Jan 2009 20:54:36 +0000 Subject: Fix cygwin sim build. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19728 a1c6a512-1295-4272-9138-f99709370657 --- apps/plugins/doom/rockmacros.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/plugins/doom/rockmacros.h b/apps/plugins/doom/rockmacros.h index 78574c8440..6abf025aac 100644 --- a/apps/plugins/doom/rockmacros.h +++ b/apps/plugins/doom/rockmacros.h @@ -33,16 +33,22 @@ extern bool doomexit; /* libc functions */ int printf(const char *fmt, ...); int fileexists(const char * fname); -int my_open(const char *file, int flags); -int my_close(int id); char *my_strtok( char * s, const char * delim ); #define alloca __builtin_alloca #define fdprintf(...) rb->fdprintf(__VA_ARGS__) #define vsnprintf(...) rb->vsnprintf(__VA_ARGS__) #define read_line(a,b,c) rb->read_line((a),(b),(c)) +#ifdef SIMULATOR +#define open(a,b) rb->open((a),(b)) +#define close(a) rb->close((a)) +#else +int my_open(const char *file, int flags); +int my_close(int id); #define open(a,b) my_open((a),(b)) #define close(a) my_close((a)) +#endif + #define lseek(a,b,c) rb->lseek((a),(b),(c)) #define filesize(a) rb->filesize((a)) #define read(a,b,c) rb->read((a),(b),(c)) -- cgit v1.2.3