00001
00010 #ifndef DKUTIL_CSTD_OS_H
00011 #define DKUTIL_CSTD_OS_H
00012
00013
00014
00015 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
00016 # ifndef WIN32
00017 # define WIN32
00018 # endif
00019
00020
00021 #ifndef _WIN32_IE
00022 # define _WIN32_IE 0x0200
00023 #endif
00024 #ifndef _WIN32_WINNT
00025 # define _WIN32_WINNT 0x0400
00026 #endif
00027 #ifndef WINVER
00028 # define WINVER 0x0400
00029 #endif
00030 #define WIN32_LEAN_AND_MEAN
00031 #define NOMINMAX
00032 #define OEMRESOURCE
00033
00034 #ifndef POINTER_64
00035 # define POINTER_64
00036 #endif
00037
00038 # include <windows.h>
00039 #undef _WIN32_IE
00040 #undef _WIN32_WINNT
00041 #undef WINVER
00042 #undef WIN32_LEAN_AND_MEAN
00043 #undef NOMINMAX
00044 #undef OEMRESOURCE
00045 #undef POINTER_64
00046
00047 #include <stddef.h>
00048 #else
00049
00050 #include "stddef.h"
00051
00052 #endif
00053
00054 #include "define.h"
00055
00057 #ifndef BOOL
00058 # define BOOL int
00059 #endif
00060 #ifndef TRUE
00061 # define TRUE 1
00062 #endif
00063 #ifndef FALSE
00064 # define FALSE 0
00065 #endif
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084 #ifdef WIN32
00085
00086
00087 typedef ULARGE_INTEGER DKC_UINT64_STRUCT;
00088 typedef LARGE_INTEGER DKC_INT64_STRUCT;
00089
00090
00091 #else
00092
00093 #ifndef ULONGLONG
00094 # define ULONGLONG unsigned long long int
00095 #endif
00096
00097 #ifndef LONGLONG
00098 # define LONGLONG long long int
00099 #endif
00100
00102
00103
00104
00105
00106 typedef union dkc_s64bit_struct {
00107
00108 struct {
00109 uint32 LowPart;
00110 int32 HighPart;
00111 };
00112
00113 struct {
00114 uint32 LowPart;
00115 int32 HighPart;
00116 }u;
00117
00118 LONGLONG QuadPart;
00119 } DKC_INT64_STRUCT;
00120
00121
00122 typedef union dkc_u64bit_struct {
00123
00124 struct {
00125 uint32 LowPart;
00126 uint32 HighPart;
00127 };
00128
00129 struct {
00130 uint32 LowPart;
00131 uint32 HighPart;
00132 } u;
00133
00134 ULONGLONG QuadPart;
00135 } DKC_UINT64_STRUCT;
00136
00137 #endif //end of WIN32
00138
00139 #ifndef uint64
00140 # define uint64 ULONGLONG
00141 #endif
00142 #ifndef int64
00143 # define int64 LONGLONG
00144 #endif
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164
00165
00166
00167
00168
00169
00170
00171
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181 #endif //end of include once
00182