154 #define CONST64(x) (x ## i64) 155 #define UCONST64(x) ((uint64_t)CONST64(x)) 156 157 const jlong min_jlong = CONST64(0x8000000000000000); 158 const jlong max_jlong = CONST64(0x7fffffffffffffff); 159 160 //---------------------------------------------------------------------------------------------------- 161 // Miscellaneous 162 163 // Visual Studio 2005 deprecates POSIX names - use ISO C++ names instead 164 #if _MSC_VER >= 1400 165 #define open _open 166 #define close _close 167 #define read _read 168 #define write _write 169 #define lseek _lseek 170 #define unlink _unlink 171 #define strdup _strdup 172 #endif 173 174 #pragma warning( disable : 4100 ) // unreferenced formal parameter 175 #pragma warning( disable : 4127 ) // conditional expression is constant 176 #pragma warning( disable : 4514 ) // unreferenced inline function has been removed 177 #pragma warning( disable : 4244 ) // possible loss of data 178 #pragma warning( disable : 4512 ) // assignment operator could not be generated 179 #pragma warning( disable : 4201 ) // nonstandard extension used : nameless struct/union (needed in windows.h) 180 #pragma warning( disable : 4511 ) // copy constructor could not be generated 181 #pragma warning( disable : 4291 ) // no matching operator delete found; memory will not be freed if initialization thows an exception 182 #ifdef CHECK_UNHANDLED_OOPS 183 #pragma warning( disable : 4521 ) // class has multiple copy ctors of a single type 184 #pragma warning( disable : 4522 ) // class has multiple assignment operators of a single type 185 #endif // CHECK_UNHANDLED_OOPS 186 #if _MSC_VER >= 1400 187 #pragma warning( disable : 4996 ) // unsafe string functions. Same as define _CRT_SECURE_NO_WARNINGS/_CRT_SECURE_NO_DEPRICATE 188 #endif 189 190 // Portability macros 191 #define PRAGMA_INTERFACE 192 #define PRAGMA_IMPLEMENTATION 193 #define PRAGMA_IMPLEMENTATION_(arg) 200 // The 32 bits ones might need I32 but seem to work ok without it. 201 #define PRId32 "d" 202 #define PRIu32 "u" 203 #define PRIx32 "x" 204 205 #define PRId64 "I64d" 206 #define PRIu64 "I64u" 207 #define PRIx64 "I64x" 208 209 #ifdef _LP64 210 #define PRIdPTR "I64d" 211 #define PRIuPTR "I64u" 212 #define PRIxPTR "I64x" 213 #else 214 #define PRIdPTR "d" 215 #define PRIuPTR "u" 216 #define PRIxPTR "x" 217 #endif 218 219 #define offset_of(klass,field) offsetof(klass,field) 220 221 #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_VISCPP_HPP | 154 #define CONST64(x) (x ## i64) 155 #define UCONST64(x) ((uint64_t)CONST64(x)) 156 157 const jlong min_jlong = CONST64(0x8000000000000000); 158 const jlong max_jlong = CONST64(0x7fffffffffffffff); 159 160 //---------------------------------------------------------------------------------------------------- 161 // Miscellaneous 162 163 // Visual Studio 2005 deprecates POSIX names - use ISO C++ names instead 164 #if _MSC_VER >= 1400 165 #define open _open 166 #define close _close 167 #define read _read 168 #define write _write 169 #define lseek _lseek 170 #define unlink _unlink 171 #define strdup _strdup 172 #endif 173 174 #if _MSC_VER < 1800 175 // Fixes some wrong warnings about 'this' : used in base member initializer list 176 #pragma warning( disable : 4355 ) 177 #endif 178 179 #pragma warning( disable : 4100 ) // unreferenced formal parameter 180 #pragma warning( disable : 4127 ) // conditional expression is constant 181 #pragma warning( disable : 4514 ) // unreferenced inline function has been removed 182 #pragma warning( disable : 4244 ) // possible loss of data 183 #pragma warning( disable : 4512 ) // assignment operator could not be generated 184 #pragma warning( disable : 4201 ) // nonstandard extension used : nameless struct/union (needed in windows.h) 185 #pragma warning( disable : 4511 ) // copy constructor could not be generated 186 #pragma warning( disable : 4291 ) // no matching operator delete found; memory will not be freed if initialization thows an exception 187 #ifdef CHECK_UNHANDLED_OOPS 188 #pragma warning( disable : 4521 ) // class has multiple copy ctors of a single type 189 #pragma warning( disable : 4522 ) // class has multiple assignment operators of a single type 190 #endif // CHECK_UNHANDLED_OOPS 191 #if _MSC_VER >= 1400 192 #pragma warning( disable : 4996 ) // unsafe string functions. Same as define _CRT_SECURE_NO_WARNINGS/_CRT_SECURE_NO_DEPRICATE 193 #endif 194 195 // Portability macros 196 #define PRAGMA_INTERFACE 197 #define PRAGMA_IMPLEMENTATION 198 #define PRAGMA_IMPLEMENTATION_(arg) 205 // The 32 bits ones might need I32 but seem to work ok without it. 206 #define PRId32 "d" 207 #define PRIu32 "u" 208 #define PRIx32 "x" 209 210 #define PRId64 "I64d" 211 #define PRIu64 "I64u" 212 #define PRIx64 "I64x" 213 214 #ifdef _LP64 215 #define PRIdPTR "I64d" 216 #define PRIuPTR "I64u" 217 #define PRIxPTR "I64x" 218 #else 219 #define PRIdPTR "d" 220 #define PRIuPTR "u" 221 #define PRIxPTR "x" 222 #endif 223 224 #define offset_of(klass,field) offsetof(klass,field) 225 226 // Inlining support 227 // MSVC has '__declspec(noinline)' but according to the official documentation 228 // it only applies to member functions. There are reports though which pretend 229 // that it also works for freestanding functions. 230 #define NOINLINE __declspec(noinline) 231 #define ALWAYSINLINE __forceinline 232 233 #endif // SHARE_VM_UTILITIES_GLOBALDEFINITIONS_VISCPP_HPP |