lzma/7zTypes.h
changeset 780 8d029fecde3a
parent 774 916c2e81e77f
equal deleted inserted replaced
779:7acc8a8abdf6 780:8d029fecde3a
     1 /* 7zTypes.h */
     1 /* 7zTypes.h */
     2 
     2 
     3 #ifndef __COMMON_TYPES_H
     3 #ifndef __COMMON_TYPES_H
     4 #define __COMMON_TYPES_H
     4 #define __COMMON_TYPES_H
     5 
     5 
     6 #ifndef UInt32
     6 #ifndef _7ZIP_BYTE_DEFINED
       
     7 #define _7ZIP_BYTE_DEFINED
       
     8 typedef unsigned char Byte;
       
     9 #endif 
       
    10 
       
    11 #ifndef _7ZIP_UINT16_DEFINED
       
    12 #define _7ZIP_UINT16_DEFINED
       
    13 typedef unsigned short UInt16;
       
    14 #endif 
       
    15 
       
    16 #ifndef _7ZIP_UINT32_DEFINED
       
    17 #define _7ZIP_UINT32_DEFINED
     7 #ifdef _LZMA_UINT32_IS_ULONG
    18 #ifdef _LZMA_UINT32_IS_ULONG
     8 #define UInt32 unsigned long
    19 typedef unsigned long UInt32;
     9 #else
    20 #else
    10 #define UInt32 unsigned int
    21 typedef unsigned int UInt32;
    11 #endif
    22 #endif
    12 #endif
    23 #endif 
    13 
       
    14 #ifndef Byte
       
    15 #define Byte unsigned char
       
    16 #endif
       
    17 
       
    18 #ifndef UInt16
       
    19 #define UInt16 unsigned short
       
    20 #endif
       
    21 
    24 
    22 /* #define _SZ_NO_INT_64 */
    25 /* #define _SZ_NO_INT_64 */
    23 /* define it your compiler doesn't support long long int */
    26 /* define it your compiler doesn't support long long int */
    24 
    27 
       
    28 #ifndef _7ZIP_UINT64_DEFINED
       
    29 #define _7ZIP_UINT64_DEFINED
    25 #ifdef _SZ_NO_INT_64
    30 #ifdef _SZ_NO_INT_64
    26 #define UInt64 unsigned long
    31 typedef unsigned long UInt64;
    27 #else
    32 #else
    28 #ifdef _MSC_VER
    33 #ifdef _MSC_VER
    29 #define UInt64 unsigned __int64
    34 typedef unsigned __int64 UInt64;
    30 #else
    35 #else
    31 #define UInt64 unsigned long long int
    36 typedef unsigned long long int UInt64;
       
    37 #endif
    32 #endif
    38 #endif
    33 #endif
    39 #endif
    34 
    40 
    35 
    41 
    36 /* #define _SZ_FILE_SIZE_64 */
    42 /* #define _SZ_FILE_SIZE_64 */
    37 /* Use _SZ_FILE_SIZE_64 if you need support for files larger than 4 GB*/
    43 /* Use _SZ_FILE_SIZE_64 if you need support for files larger than 4 GB*/
    38 
    44 
    39 #ifndef CFileSize
    45 #ifndef CFileSize
    40 #ifdef _SZ_FILE_SIZE_64
    46 #ifdef _SZ_FILE_SIZE_64
    41 #define CFileSize UInt64
    47 typedef UInt64 CFileSize; 
    42 #else
    48 #else
    43 #define CFileSize UInt32
    49 typedef UInt32 CFileSize; 
    44 #endif
    50 #endif
    45 #endif
    51 #endif
    46 
    52 
    47 #define SZ_RESULT int
    53 #define SZ_RESULT int
    48 
    54