00001
00002
00003
00004
00005
00006
00007 #ifndef __msvc_h
00008 #define __msvc_h
00009
00010 #if defined(TARGET_COMPILER_VC)
00011
00012 #include <io.h>
00013 #include <math.h>
00014
00015 #define fileno _fileno
00016 #define itoa _itoa
00017 #define snprintf _snprintf
00018 #define strcasecmp _stricmp
00019 #define strdup _strdup
00020 #define stricmp _stricmp
00021 #define strlwr _strlwr
00022 #define strncasecmp _strnicmp
00023 #define strnicmp _strnicmp
00024 #define unlink _unlink
00025 #define ftruncate _chsize
00026 #define putenv _putenv
00027
00028
00029 #if !defined(va_copy)
00030 #define va_copy(dst, src) \
00031 ((void) memcpy(&(dst), &(src), sizeof(va_list)))
00032 #endif
00033
00034 #pragma warning(disable : 4290)
00035 #pragma warning(disable : 4351)
00036
00037 #pragma warning(disable : 4800)
00038
00039
00040 #pragma warning(disable : 4099)
00041
00042
00043 #pragma warning(disable : 4244)
00044
00045
00046
00047
00048
00049
00050 #define DT_DIR 4
00051 #define DT_REG 8
00052
00053 struct DIR;
00054 struct dirent
00055 {
00056
00057 unsigned short d_reclen;
00058 unsigned char d_type;
00059 unsigned short d_namlen;
00060 char d_name[255];
00061 };
00062
00063 DIR* opendir(const char* path);
00064 dirent* readdir(DIR*);
00065 int closedir(DIR*);
00066
00067 inline double round(double x)
00068 {
00069 if (x >= 0.0)
00070 return floor(x + 0.5);
00071 else
00072 return ceil(x - 0.5);
00073 }
00074
00075 #endif
00076
00077 #endif