diff options
Diffstat (limited to 'src/StormPort.h')
-rw-r--r-- | src/StormPort.h | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/src/StormPort.h b/src/StormPort.h index aa309e1..f00afd6 100644 --- a/src/StormPort.h +++ b/src/StormPort.h @@ -44,6 +44,10 @@ #define _CRT_NON_CONFORMING_SWPRINTFS #endif + #if defined(UNICODE) || defined(_UNICODE) + #define STORMLIB_WIDE_CHAR + #endif + #include <tchar.h> #include <assert.h> #include <ctype.h> @@ -52,15 +56,9 @@ // Suppress definitions of `min` and `max` macros by <windows.h>: #define NOMINMAX 1 #include <windows.h> - #include <wininet.h> - #define STORMLIB_LITTLE_ENDIAN - #ifdef _WIN64 - #define STORMLIB_64BIT - #else - #define STORMLIB_32BIT - #endif + #define STORMLIB_LITTLE_ENDIAN #define STORMLIB_CDECL __cdecl @@ -74,7 +72,6 @@ #if !defined(STORMLIB_PLATFORM_DEFINED) && defined(__APPLE__) // Mac BSD API - // Macintosh #include <sys/types.h> #include <sys/stat.h> #include <sys/mman.h> @@ -320,13 +317,8 @@ // Definition of Windows-specific types for non-Windows platforms #ifndef STORMLIB_WINDOWS - #if __LP64__ - #define STORMLIB_64BIT - #else - #define STORMLIB_32BIT - #endif - // __cdecl meand nothing on non-Windows + // __cdecl means nothing on non-Windows #define STORMLIB_CDECL /* */ // Typedefs for ANSI C @@ -340,7 +332,7 @@ typedef long long LONGLONG; typedef unsigned long long ULONGLONG; typedef void * HANDLE; - typedef void * LPOVERLAPPED; // Unsupported on Linux and Mac + typedef void * LPOVERLAPPED; typedef char TCHAR; typedef unsigned int LCID; typedef LONG * PLONG; @@ -351,7 +343,7 @@ typedef char * LPTSTR; typedef char * LPSTR; - #ifdef STORMLIB_32BIT + #ifndef __LP64__ #define _LZMA_UINT32_IS_ULONG #endif @@ -409,12 +401,14 @@ #define ERROR_DISK_FULL ENOSPC #define ERROR_ALREADY_EXISTS EEXIST #define ERROR_INSUFFICIENT_BUFFER ENOBUFS - #define ERROR_BAD_FORMAT 1000 // No such error code under Linux - #define ERROR_NO_MORE_FILES 1001 // No such error code under Linux - #define ERROR_HANDLE_EOF 1002 // No such error code under Linux - #define ERROR_CAN_NOT_COMPLETE 1003 // No such error code under Linux - #define ERROR_FILE_CORRUPT 1004 // No such error code under Linux - #define ERROR_BUFFER_OVERFLOW 1005 // No such error code under Linux + #define ERROR_BAD_FORMAT 1000 // No such error codes under Linux + #define ERROR_NO_MORE_FILES 1001 + #define ERROR_HANDLE_EOF 1002 + #define ERROR_CAN_NOT_COMPLETE 1003 + #define ERROR_FILE_CORRUPT 1004 + #define ERROR_BUFFER_OVERFLOW 1005 + #define ERROR_INVALID_DATA 1006 + #define ERROR_NO_UNICODE_TRANSLATION 1007 #endif // Macros that can sometimes be missing |