summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-08-27 12:38:25 +0000
committerThomas Martitz <kugel@rockbox.org>2010-08-27 12:38:25 +0000
commit2c2e261648d5ae1befe5c4f269a655cc06b6e1e9 (patch)
tree16ea536a547deb252276c29d34eeee08f029866f /uisimulator
parent79798ff5f30dea7419f360e197763abb3b46259a (diff)
downloadrockbox-2c2e261648d5ae1befe5c4f269a655cc06b6e1e9.tar.gz
rockbox-2c2e261648d5ae1befe5c4f269a655cc06b6e1e9.tar.bz2
rockbox-2c2e261648d5ae1befe5c4f269a655cc06b6e1e9.zip
Use system headers a bit more: use host's fcntl.h for O_RDONLY etc.
Removes the need to fix up those in the simulator. Also work around some posix-mingw incompatibilities (e.g. getcwd()). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27904 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/common/io.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/uisimulator/common/io.c b/uisimulator/common/io.c
index 9862b4a7a2..6547421668 100644
--- a/uisimulator/common/io.c
+++ b/uisimulator/common/io.c
@@ -179,9 +179,10 @@ struct mydir {
typedef struct mydir MYDIR;
-#if 1 /* maybe this needs disabling for MSVC... */
static unsigned int rockbox2sim(int opt)
{
+#if 0
+/* this shouldn't be needed since we use the host's versions */
int newopt = O_BINARY;
if(opt & 1)
@@ -196,8 +197,10 @@ static unsigned int rockbox2sim(int opt)
newopt |= O_TRUNC;
return newopt;
-}
+#else
+ return opt|O_BINARY;
#endif
+}
/** Simulator I/O engine routines **/
#define IO_YIELD_THRESHOLD 512
@@ -537,7 +540,7 @@ int sim_fsync(int fd)
void *lc_open(const char *filename, char *buf, size_t buf_size)
{
const char *sim_path = get_sim_pathname(filename);
- void *handle = _lc_open((const char*)UTF8_TO_OS(sim_path), buf, buf_size);
+ void *handle = _lc_open(UTF8_TO_OS(sim_path), buf, buf_size);
if (handle == NULL)
{