aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/mingw.h20
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
123int fdprintf(int fd, const char *format, ...); 123int fdprintf(int fd, const char *format, ...);
124FILE* mingw_fopen(const char *filename, const char *mode);
125int 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);
216NOIMPL(fchown,int fd UNUSED_PARAM, uid_t uid UNUSED_PARAM, gid_t gid UNUSED_PARAM); 220NOIMPL(fchown,int fd UNUSED_PARAM, uid_t uid UNUSED_PARAM, gid_t gid UNUSED_PARAM);
217int mingw_mkdir(const char *path, int mode); 221int 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 */
226int mingw_lstat(const char *file_name, struct stat *buf);
227int 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);
258NOIMPL(chown,const char *path UNUSED_PARAM, uid_t uid UNUSED_PARAM, gid_t gid UNUSED_PARAM); 272NOIMPL(chown,const char *path UNUSED_PARAM, uid_t uid UNUSED_PARAM, gid_t gid UNUSED_PARAM);
259NOIMPL(chroot,const char *root UNUSED_PARAM); 273NOIMPL(chroot,const char *root UNUSED_PARAM);
260int mingw_dup (int fd); 274int mingw_dup (int fd);
275int mingw_dup2 (int fd, int fdto);
261char *mingw_getcwd(char *pointer, int len); 276char *mingw_getcwd(char *pointer, int len);
262 277
263 278
@@ -281,6 +296,7 @@ IMPL(fsync,int,0,int fd UNUSED_PARAM);
281NOIMPL(kill,pid_t pid UNUSED_PARAM, int sig UNUSED_PARAM); 296NOIMPL(kill,pid_t pid UNUSED_PARAM, int sig UNUSED_PARAM);
282int link(const char *oldpath, const char *newpath); 297int link(const char *oldpath, const char *newpath);
283NOIMPL(mknod,const char *name UNUSED_PARAM, mode_t mode UNUSED_PARAM, dev_t device UNUSED_PARAM); 298NOIMPL(mknod,const char *name UNUSED_PARAM, mode_t mode UNUSED_PARAM, dev_t device UNUSED_PARAM);
299int mingw_open (const char *filename, int oflags, ...);
284int pipe(int filedes[2]); 300int pipe(int filedes[2]);
285NOIMPL(readlink,const char *path UNUSED_PARAM, char *buf UNUSED_PARAM, size_t bufsiz UNUSED_PARAM); 301NOIMPL(readlink,const char *path UNUSED_PARAM, char *buf UNUSED_PARAM, size_t bufsiz UNUSED_PARAM);
286NOIMPL(setgid,gid_t gid UNUSED_PARAM); 302NOIMPL(setgid,gid_t gid UNUSED_PARAM);
@@ -293,8 +309,10 @@ int mingw_unlink(const char *pathname);
293NOIMPL(vfork,void); 309NOIMPL(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/*