00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __oiv_inttypes_h__
00028 #define __oiv_inttypes_h__
00029
00030 #if defined(_WIN32)
00031 # if !defined(WIN32)
00032 # define WIN32
00033 # endif
00034 # if defined(_WIN64)
00035 # if !defined(WIN64)
00036 # define WIN64
00037 # endif
00038 # endif
00039 #endif
00040
00041 #ifdef _WIN32
00042 typedef signed __int8 int8_t;
00043 typedef unsigned __int8 uint8_t;
00044 typedef signed __int16 int16_t;
00045 typedef unsigned __int16 uint16_t;
00046 typedef signed __int32 int32_t;
00047 typedef unsigned __int32 uint32_t;
00048 typedef signed __int64 int64_t;
00049 typedef unsigned __int64 uint64_t;
00050
00051 #define SO_WCHAR_T unsigned short
00052 # define INT64FMT "%I64d"
00053
00054 #elif defined (__linux__) || defined(__APPLE__)
00055
00056 # include <stdint.h>
00057 #endif
00058
00059 #ifndef _WIN32
00060 #define SO_WCHAR_T wchar_t
00061
00062 #if defined(__GNUC__) && defined(__LP64__) && (__LP64__ == 1)
00063 # define INT64FMT "%ld"
00064 #else
00065 # define INT64FMT "%lld"
00066 #endif
00067 #endif
00068
00069 #if defined(_WIN64) || _MSC_VER >= 1300
00070
00071 #elif defined(_WIN32) && !defined(_WIN64) && _MSC_VER < 1300
00072 typedef unsigned uintptr_t;
00073 typedef unsigned long DWORD_PTR;
00074 typedef signed int intptr_t;
00075 #elif defined(__linux__)
00076
00077 typedef unsigned long DWORD_PTR;
00078 #else
00079 typedef unsigned long DWORD_PTR;
00080 #endif
00081
00082 #if defined(_WIN32) && !defined(_WIN64) && _MSC_VER < 1300
00083 # ifndef SetWindowLongPtr
00084 # define SetWindowLongPtr SetWindowLong
00085 # endif
00086 # ifndef GetWindowLongPtr
00087 # define GetWindowLongPtr GetWindowLong
00088 # endif
00089 # ifndef LONG_PTR
00090 # define LONG_PTR LONG
00091 # endif
00092 # ifndef GWLP_HINSTANCE
00093 # define GWLP_HINSTANCE GWL_HINSTANCE
00094 # endif
00095 # ifndef GWLP_WNDPROC
00096 # define GWLP_WNDPROC GWL_WNDPROC
00097 # endif
00098 # ifndef GWLP_USERDATA
00099 # define GWLP_USERDATA GWL_USERDATA
00100 # endif
00101 # ifndef DWLP_USER
00102 # define DWLP_USER DWL_USER
00103 # endif
00104 #endif
00105
00106 #endif
00107
00108