diff options
-rw-r--r-- | include/mingw.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/include/mingw.h b/include/mingw.h index 479fbbe2b..ffedb2bee 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
@@ -121,6 +121,10 @@ NOIMPL(sigfillset,int *mask UNUSED_PARAM); | |||
121 | #define fseeko(f,o,w) fseek(f,o,w) | 121 | #define fseeko(f,o,w) fseek(f,o,w) |
122 | 122 | ||
123 | int fdprintf(int fd, const char *format, ...); | 123 | int fdprintf(int fd, const char *format, ...); |
124 | FILE* mingw_fopen(const char *filename, const char *mode); | ||
125 | int mingw_rename(const char*, const char*); | ||
126 | #define fopen mingw_fopen | ||
127 | #define rename mingw_rename | ||
124 | 128 | ||
125 | /* | 129 | /* |
126 | * ANSI emulation wrappers | 130 | * ANSI emulation wrappers |
@@ -216,8 +220,18 @@ NOIMPL(fchmod,int fildes UNUSED_PARAM, mode_t mode UNUSED_PARAM); | |||
216 | NOIMPL(fchown,int fd UNUSED_PARAM, uid_t uid UNUSED_PARAM, gid_t gid UNUSED_PARAM); | 220 | NOIMPL(fchown,int fd UNUSED_PARAM, uid_t uid UNUSED_PARAM, gid_t gid UNUSED_PARAM); |
217 | int mingw_mkdir(const char *path, int mode); | 221 | int mingw_mkdir(const char *path, int mode); |
218 | 222 | ||
223 | /* Use mingw_lstat() instead of lstat()/stat() and | ||
224 | * mingw_fstat() instead of fstat() on Windows. | ||
225 | */ | ||
226 | int mingw_lstat(const char *file_name, struct stat *buf); | ||
227 | int mingw_fstat(int fd, struct stat *buf); | ||
228 | |||
219 | #define mkdir mingw_mkdir | 229 | #define mkdir mingw_mkdir |
220 | #define lstat stat | 230 | #define stat(x,y) mingw_lstat(x,y) |
231 | #define lseek _lseeki64 | ||
232 | #define fstat mingw_fstat | ||
233 | #define lstat mingw_lstat | ||
234 | #define _stati64 mingw_lstat | ||
221 | 235 | ||
222 | /* | 236 | /* |
223 | * sys/sysmacros.h | 237 | * sys/sysmacros.h |
@@ -258,6 +272,7 @@ IMPL(alarm,unsigned int,0,unsigned int seconds UNUSED_PARAM); | |||
258 | NOIMPL(chown,const char *path UNUSED_PARAM, uid_t uid UNUSED_PARAM, gid_t gid UNUSED_PARAM); | 272 | NOIMPL(chown,const char *path UNUSED_PARAM, uid_t uid UNUSED_PARAM, gid_t gid UNUSED_PARAM); |
259 | NOIMPL(chroot,const char *root UNUSED_PARAM); | 273 | NOIMPL(chroot,const char *root UNUSED_PARAM); |
260 | int mingw_dup (int fd); | 274 | int mingw_dup (int fd); |
275 | int mingw_dup2 (int fd, int fdto); | ||
261 | char *mingw_getcwd(char *pointer, int len); | 276 | char *mingw_getcwd(char *pointer, int len); |
262 | 277 | ||
263 | 278 | ||
@@ -281,6 +296,7 @@ IMPL(fsync,int,0,int fd UNUSED_PARAM); | |||
281 | NOIMPL(kill,pid_t pid UNUSED_PARAM, int sig UNUSED_PARAM); | 296 | NOIMPL(kill,pid_t pid UNUSED_PARAM, int sig UNUSED_PARAM); |
282 | int link(const char *oldpath, const char *newpath); | 297 | int link(const char *oldpath, const char *newpath); |
283 | NOIMPL(mknod,const char *name UNUSED_PARAM, mode_t mode UNUSED_PARAM, dev_t device UNUSED_PARAM); | 298 | NOIMPL(mknod,const char *name UNUSED_PARAM, mode_t mode UNUSED_PARAM, dev_t device UNUSED_PARAM); |
299 | int mingw_open (const char *filename, int oflags, ...); | ||
284 | int pipe(int filedes[2]); | 300 | int pipe(int filedes[2]); |
285 | NOIMPL(readlink,const char *path UNUSED_PARAM, char *buf UNUSED_PARAM, size_t bufsiz UNUSED_PARAM); | 301 | NOIMPL(readlink,const char *path UNUSED_PARAM, char *buf UNUSED_PARAM, size_t bufsiz UNUSED_PARAM); |
286 | NOIMPL(setgid,gid_t gid UNUSED_PARAM); | 302 | NOIMPL(setgid,gid_t gid UNUSED_PARAM); |
@@ -293,8 +309,10 @@ int mingw_unlink(const char *pathname); | |||
293 | NOIMPL(vfork,void); | 309 | NOIMPL(vfork,void); |
294 | 310 | ||
295 | //#define dup mingw_dup | 311 | //#define dup mingw_dup |
312 | #define dup2 mingw_dup2 | ||
296 | #define getcwd mingw_getcwd | 313 | #define getcwd mingw_getcwd |
297 | #define lchown(a,b,c) chown(a,b,c) | 314 | #define lchown(a,b,c) chown(a,b,c) |
315 | #define open mingw_open | ||
298 | #define unlink mingw_unlink | 316 | #define unlink mingw_unlink |
299 | 317 | ||
300 | /* | 318 | /* |