diff options
author | Steven Noonan <steven@uplinklabs.net> | 2009-10-12 08:03:13 -0700 |
---|---|---|
committer | Steven Noonan <steven@uplinklabs.net> | 2009-10-12 08:03:13 -0700 |
commit | e902c1dbf887d58cd370a86bc676c5297cfffad5 (patch) | |
tree | e292c5ad001296d59fc412adcef9710805836ccf /crawl-ref/source/msvc.h | |
parent | 94c8330d25fcece0e2811f82edea8258c0869b8e (diff) | |
download | crawl-ref-e902c1dbf887d58cd370a86bc676c5297cfffad5.tar.gz crawl-ref-e902c1dbf887d58cd370a86bc676c5297cfffad5.zip |
MSVC: add tiles build support
Signed-off-by: Steven Noonan <steven@uplinklabs.net>
Diffstat (limited to 'crawl-ref/source/msvc.h')
-rw-r--r-- | crawl-ref/source/msvc.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/crawl-ref/source/msvc.h b/crawl-ref/source/msvc.h index 00d26ab80a..be75c72fc8 100644 --- a/crawl-ref/source/msvc.h +++ b/crawl-ref/source/msvc.h @@ -4,18 +4,24 @@ * Written by: Paul Du Bois
*/
-#if defined(_MSC_VER)
+#ifndef __msvc_h
+#define __msvc_h
+#if defined(TARGET_COMPILER_VC)
+
+#include <io.h>
#define fileno _fileno
#define itoa _itoa
#define snprintf _snprintf
#define strcasecmp _stricmp
+#define strdup _strdup
#define stricmp _stricmp
#define strlwr _strlwr
#define strncasecmp _strnicmp
#define strnicmp _strnicmp
#define unlink _unlink
+#define ftruncate _chsize
// No va_copy in MSVC
#if !defined(va_copy)
@@ -55,7 +61,8 @@ struct dirent DIR* opendir(const char* path);
dirent* readdir(DIR*);
int closedir(DIR*);
-int ftruncate(int fp, int size);
#endif /* defined(_MSC_VER) */
+
+#endif
\ No newline at end of file |