summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorBjörn Stenberg <bjorn@haxx.se>2003-01-28 23:14:41 +0000
committerBjörn Stenberg <bjorn@haxx.se>2003-01-28 23:14:41 +0000
commit2ba4fedd6400cb74c604ba4c9e3c56c6e2f79e78 (patch)
treec86ef5adb17723f9f59c84e3c9a94d89fa0b0844 /uisimulator
parentb82241b970f3506feed692c8d30e08ce026a750b (diff)
downloadrockbox-2ba4fedd6400cb74c604ba4c9e3c56c6e2f79e78.tar.gz
rockbox-2ba4fedd6400cb74c604ba4c9e3c56c6e2f79e78.zip
Added close() and proper creat() to x11 emulator
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3179 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/x11/file.h4
-rw-r--r--uisimulator/x11/io.c6
2 files changed, 9 insertions, 1 deletions
diff --git a/uisimulator/x11/file.h b/uisimulator/x11/file.h
index 63ccfe108c..49c49116fb 100644
--- a/uisimulator/x11/file.h
+++ b/uisimulator/x11/file.h
@@ -21,12 +21,14 @@
#include <sys/types.h>
int x11_open(char *name, int opts);
+int x11_close(int fd);
int x11_creat(char *name, int mode);
int x11_remove(char *name);
int x11_rename(char *oldpath, char *newpath);
#define open(x,y) x11_open(x,y)
-#define creat(x,y) x11_open(x,y)
+#define close(x) x11_close(x)
+#define creat(x,y) x11_creat(x,y)
#define remove(x) x11_remove(x)
#define rename(x,y) x11_rename(x,y)
diff --git a/uisimulator/x11/io.c b/uisimulator/x11/io.c
index 6a19dd07b1..6210e6d927 100644
--- a/uisimulator/x11/io.c
+++ b/uisimulator/x11/io.c
@@ -23,6 +23,7 @@
#include <sys/stat.h>
#include <sys/vfs.h>
#include <dirent.h>
+#include <unistd.h>
#include <fcntl.h>
#include "debug.h"
@@ -109,6 +110,11 @@ int x11_open(char *name, int opts)
return open(name, opts);
}
+int x11_close(int fd)
+{
+ return close(fd);
+}
+
int x11_creat(char *name, int mode)
{
char buffer[256]; /* sufficiently big */