Hopefully the last fix for crosscompilation of sims with mingw32.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15048 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Nicolas Pennequin 2007-10-09 18:44:07 +00:00
parent b24631c07f
commit 9ff40579c3
2 changed files with 6 additions and 0 deletions

View file

@ -755,7 +755,11 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
printf("There were still: %d files open\n", fpoint);
while(fpoint>0)
{
#ifdef SIMULATOR
close(filearray[fpoint]);
#else
rb->close(filearray[fpoint]);
#endif
fpoint--;
}

View file

@ -41,11 +41,13 @@ char *my_strtok( char * s, const char * delim );
#ifdef SIMULATOR
#undef open
#undef close
#undef lseek
#undef filesize
#undef read
#undef write
#define open(a,b) rb->sim_open((a),(b))
#define close(a) rb->sim_close((a))
#define lseek(a,b,c) rb->sim_lseek((a),(b),(c))
#define filesize(a) rb->sim_filesize((a))
#define read(a,b,c) rb->sim_read((a),(b),(c))