diff options
Diffstat (limited to 'uisimulator/x11')
-rw-r--r-- | uisimulator/x11/file.h | 4 | ||||
-rw-r--r-- | uisimulator/x11/io.c | 6 |
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 @@ | |||
21 | #include <sys/types.h> | 21 | #include <sys/types.h> |
22 | 22 | ||
23 | int x11_open(char *name, int opts); | 23 | int x11_open(char *name, int opts); |
24 | int x11_close(int fd); | ||
24 | int x11_creat(char *name, int mode); | 25 | int x11_creat(char *name, int mode); |
25 | int x11_remove(char *name); | 26 | int x11_remove(char *name); |
26 | int x11_rename(char *oldpath, char *newpath); | 27 | int x11_rename(char *oldpath, char *newpath); |
27 | 28 | ||
28 | #define open(x,y) x11_open(x,y) | 29 | #define open(x,y) x11_open(x,y) |
29 | #define creat(x,y) x11_open(x,y) | 30 | #define close(x) x11_close(x) |
31 | #define creat(x,y) x11_creat(x,y) | ||
30 | #define remove(x) x11_remove(x) | 32 | #define remove(x) x11_remove(x) |
31 | #define rename(x,y) x11_rename(x,y) | 33 | #define rename(x,y) x11_rename(x,y) |
32 | 34 | ||
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 @@ | |||
23 | #include <sys/stat.h> | 23 | #include <sys/stat.h> |
24 | #include <sys/vfs.h> | 24 | #include <sys/vfs.h> |
25 | #include <dirent.h> | 25 | #include <dirent.h> |
26 | #include <unistd.h> | ||
26 | 27 | ||
27 | #include <fcntl.h> | 28 | #include <fcntl.h> |
28 | #include "debug.h" | 29 | #include "debug.h" |
@@ -109,6 +110,11 @@ int x11_open(char *name, int opts) | |||
109 | return open(name, opts); | 110 | return open(name, opts); |
110 | } | 111 | } |
111 | 112 | ||
113 | int x11_close(int fd) | ||
114 | { | ||
115 | return close(fd); | ||
116 | } | ||
117 | |||
112 | int x11_creat(char *name, int mode) | 118 | int x11_creat(char *name, int mode) |
113 | { | 119 | { |
114 | char buffer[256]; /* sufficiently big */ | 120 | char buffer[256]; /* sufficiently big */ |