From 0e9b2733fa46bb92178a832d85c0773ce16814af Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Wed, 14 Apr 2010 06:52:29 +0200 Subject: win32: Work around for dup2 Original dup2() does not return the fdto. --- include/mingw.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/mingw.h b/include/mingw.h index a828bd835..ed718fb5d 100644 --- a/include/mingw.h +++ b/include/mingw.h @@ -258,6 +258,7 @@ IMPL(strptime,char*,NULL,const char *s UNUSED_PARAM, const char *format UNUSED_P IMPL(alarm,unsigned int,0,unsigned int seconds UNUSED_PARAM); NOIMPL(chown,const char *path UNUSED_PARAM, uid_t uid UNUSED_PARAM, gid_t gid UNUSED_PARAM); NOIMPL(chroot,const char *root UNUSED_PARAM); +int mingw_dup2 (int fd, int fdto); char *mingw_getcwd(char *pointer, int len); @@ -293,6 +294,7 @@ static inline void sync(void) {} int mingw_unlink(const char *pathname); NOIMPL(vfork,void); +#define dup2 mingw_dup2 #define getcwd mingw_getcwd #define lchown(a,b,c) chown(a,b,c) #define open mingw_open -- cgit v1.2.3-55-g6feb