From d86b2da1252501d9ef4d30d73e982052cfedc4ff Mon Sep 17 00:00:00 2001 From: meep-eep Date: Thu, 17 Jul 2003 22:42:59 +0000 Subject: [PATCH] Change in an attempt to fix compilation on mingw. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@1059 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/src/sc2code/libs/uio/uioport.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/sc2/src/sc2code/libs/uio/uioport.h b/sc2/src/sc2code/libs/uio/uioport.h index f100c21ce..3733fccaf 100644 --- a/sc2/src/sc2code/libs/uio/uioport.h +++ b/sc2/src/sc2code/libs/uio/uioport.h @@ -36,28 +36,30 @@ typedef short gid_t; /* PATH_MAX is per POSIX defined in */ # define inline __inline__ #endif -#ifdef _MSC_VER +#ifdef WIN32 # include -#define mkdir MS_INSANE_MKDIR +# define mkdir MS_INSANE_MKDIR // direct.h would give a bad definition of mkdir(). Now it gives // a bad definition of MS_INSANE_MKDIR(), which we won't use. // Yes, it's a hack, but this way the hack will stay local to // the MS-specific stuff. # include -#undef mkdir -# include -typedef int ssize_t; +# undef mkdir typedef unsigned short mode_t; -# define access _access -# define F_OK 0 -# define W_OK 2 -# define R_OK 4 -# define open _open static inline int mkdir(const char *pathname, mode_t mode) { (void) mode; return _mkdir(pathname); } +#endif /* WIN32 */ +#ifdef _MSC_VER +# include +typedef int ssize_t; +# define access _access +# define F_OK 0 +# define W_OK 2 +# define R_OK 4 +# define open _open # define read _read # define rmdir _rmdir # define lseek _lseek