summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Arends <edx@rockbox.org>2002-04-28 19:29:57 +0000
committerFelix Arends <edx@rockbox.org>2002-04-28 19:29:57 +0000
commit0196c0c45bd7835a2dbc2bc3e075382e3cf3cba4 (patch)
treea085289d96d94639d1fc089a4e6b8b75c259e191
parent98ed5ed17a246e01805b6d187bdfc445fe7d0f7b (diff)
downloadrockbox-0196c0c45bd7835a2dbc2bc3e075382e3cf3cba4.zip
rockbox-0196c0c45bd7835a2dbc2bc3e075382e3cf3cba4.tar.gz
rockbox-0196c0c45bd7835a2dbc2bc3e075382e3cf3cba4.tar.bz2
rockbox-0196c0c45bd7835a2dbc2bc3e075382e3cf3cba4.tar.xz
added win32 simulator compability
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@303 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/common/dir.h18
-rw-r--r--firmware/common/file.h7
2 files changed, 20 insertions, 5 deletions
diff --git a/firmware/common/dir.h b/firmware/common/dir.h
index 0e0dbfb..622af11 100644
--- a/firmware/common/dir.h
+++ b/firmware/common/dir.h
@@ -20,16 +20,26 @@
#ifndef _DIR_H_
#define _DIR_H_
-typdef struct {
- int offset;
-} DIR;
-
struct dirent {
unsigned char d_name[256];
int attribute;
int size;
};
+#ifndef SIMULATOR
+typedef struct {
+ int offset;
+} DIR;
+#else // SIMULATOR
+#ifdef _WIN32
+typedef struct DIRtag
+{
+ struct dirent fd;
+ intptr_t handle;
+} DIR;
+#endif // _WIN32
+#endif // SIMULATOR
+
extern DIR* opendir(char* name);
extern int closedir(DIR* dir);
diff --git a/firmware/common/file.h b/firmware/common/file.h
index c608fbc..dde78bc 100644
--- a/firmware/common/file.h
+++ b/firmware/common/file.h
@@ -32,9 +32,14 @@ extern int read(int fd, void* buf, int count);
extern int write(int fd, void* buf, int count);
extern int lseek(int fd, int offset, int whence);
-#endif
extern int remove(char* pathname);
extern int rename(char* oldname, char* newname);
+#else
+#ifdef _WIN32
+#include <io.h>
+#include <stdio.h>
+#endif
+#endif
#endif