summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-01-23 11:36:02 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-01-23 11:36:02 +0000
commit8e044b785668c71786e29d8c7d261b3762a7cae6 (patch)
tree27cde93d18be691d4e38487db693f636a8f89b98 /uisimulator
parentef7293f0bc336beb30f3a5f2eafad4a447f60ac5 (diff)
downloadrockbox-8e044b785668c71786e29d8c7d261b3762a7cae6.tar.gz
rockbox-8e044b785668c71786e29d8c7d261b3762a7cae6.tar.bz2
rockbox-8e044b785668c71786e29d8c7d261b3762a7cae6.zip
mkdir() fix for the winsim, should fix the red build.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4269 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/win32/dir-win32.h9
-rw-r--r--uisimulator/win32/dir.h2
-rw-r--r--uisimulator/win32/file.h2
-rw-r--r--uisimulator/win32/io.c16
4 files changed, 20 insertions, 9 deletions
diff --git a/uisimulator/win32/dir-win32.h b/uisimulator/win32/dir-win32.h
index 151f6f3674..c34a53aa1e 100644
--- a/uisimulator/win32/dir-win32.h
+++ b/uisimulator/win32/dir-win32.h
@@ -17,13 +17,10 @@
*
****************************************************************************/
-#ifndef __FILE_WIN32_H__
-#define __FILE_WIN32_H__
-
-#define mkdir(x, y) dos_mkdir(x)
+#ifndef __DIR_WIN32_H__
+#define __DIR_WIN32_H__
#include <io.h>
#include "../../firmware/include/dir.h"
-
-#endif // #ifndef __FILE_WIN32_H__
+#endif // #ifndef __DIR_WIN32_H__
diff --git a/uisimulator/win32/dir.h b/uisimulator/win32/dir.h
index 6b275abda8..acf1c93879 100644
--- a/uisimulator/win32/dir.h
+++ b/uisimulator/win32/dir.h
@@ -72,7 +72,7 @@ typedef struct DIRtag
extern DIR* opendir(char* name);
extern int closedir(DIR* dir);
-extern int mkdir(char* name);
+extern int mkdir(char* name, int mode);
extern struct dirent* readdir(DIR* dir);
diff --git a/uisimulator/win32/file.h b/uisimulator/win32/file.h
index a542992cf9..2c94ba320a 100644
--- a/uisimulator/win32/file.h
+++ b/uisimulator/win32/file.h
@@ -38,6 +38,6 @@ int win32_filesize(int fd);
#include "../../firmware/include/file.h"
#undef rename
-
+#define mkdir(x,y) win32_mkdir(x,y)
#endif
diff --git a/uisimulator/win32/io.c b/uisimulator/win32/io.c
index 862923dd5f..5055ba69e7 100644
--- a/uisimulator/win32/io.c
+++ b/uisimulator/win32/io.c
@@ -18,7 +18,6 @@
****************************************************************************/
#include <stdio.h>
-
#include "file.h"
#include "debug.h"
@@ -47,3 +46,18 @@ int win32_filesize(int fd)
return(size);
}
+
+extern (mkdir)(const char *name);
+
+int win32_mkdir(const char *name, int mode)
+{
+ char buffer[256]; /* sufficiently big */
+ (void)mode;
+ if(name[0] == '/') {
+ sprintf(buffer, "%s%s", SIMULATOR_ARCHOS_ROOT, name);
+
+ debugf("We create the real directory '%s'\n", buffer);
+ return (mkdir)(buffer);
+ }
+ return (mkdir)(name);
+}