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
This commit is contained in:
@@ -36,7 +36,7 @@ typedef short gid_t;
|
||||
/* PATH_MAX is per POSIX defined in <limits.h> */
|
||||
# define inline __inline__
|
||||
#endif
|
||||
#ifdef _MSC_VER
|
||||
#ifdef WIN32
|
||||
# include <io.h>
|
||||
# define mkdir MS_INSANE_MKDIR
|
||||
// direct.h would give a bad definition of mkdir(). Now it gives
|
||||
@@ -45,19 +45,21 @@ typedef short gid_t;
|
||||
// the MS-specific stuff.
|
||||
# include <direct.h>
|
||||
# undef mkdir
|
||||
# include <sys/stat.h>
|
||||
typedef int ssize_t;
|
||||
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 <sys/stat.h>
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user