comparison src/share/vm/utilities/globalDefinitions_visCPP.hpp @ 659:520d43965b1f

6812297: update project creation for Visual Studio 2005-2008 Summary: Add 2 news classes to create VC8 and VC9 projects Reviewed-by: apetrusenko, xlu
author ikrylov
date Fri, 27 Mar 2009 01:35:39 -0500
parents c3a720eefe82
children bd02caa94611
comparison
equal deleted inserted replaced
658:fe62b51b93f4 659:520d43965b1f
151 const jlong max_jlong = CONST64(0x7fffffffffffffff); 151 const jlong max_jlong = CONST64(0x7fffffffffffffff);
152 152
153 //---------------------------------------------------------------------------------------------------- 153 //----------------------------------------------------------------------------------------------------
154 // Miscellaneous 154 // Miscellaneous
155 155
156 inline int vsnprintf(char* buf, size_t count, const char* fmt, va_list argptr) {
157 // If number of characters written == count, Windows doesn't write a
158 // terminating NULL, so we do it ourselves.
159 int ret = _vsnprintf(buf, count, fmt, argptr);
160 if (count > 0) buf[count-1] = '\0';
161 return ret;
162 }
163
164 // Visual Studio 2005 deprecates POSIX names - use ISO C++ names instead 156 // Visual Studio 2005 deprecates POSIX names - use ISO C++ names instead
165 #if _MSC_VER >= 1400 157 #if _MSC_VER >= 1400
166 #define open _open 158 #define open _open
167 #define close _close 159 #define close _close
168 #define read _read 160 #define read _read
178 #pragma warning( disable : 4244 ) // possible loss of data 170 #pragma warning( disable : 4244 ) // possible loss of data
179 #pragma warning( disable : 4512 ) // assignment operator could not be generated 171 #pragma warning( disable : 4512 ) // assignment operator could not be generated
180 #pragma warning( disable : 4201 ) // nonstandard extension used : nameless struct/union (needed in windows.h) 172 #pragma warning( disable : 4201 ) // nonstandard extension used : nameless struct/union (needed in windows.h)
181 #pragma warning( disable : 4511 ) // copy constructor could not be generated 173 #pragma warning( disable : 4511 ) // copy constructor could not be generated
182 #pragma warning( disable : 4291 ) // no matching operator delete found; memory will not be freed if initialization thows an exception 174 #pragma warning( disable : 4291 ) // no matching operator delete found; memory will not be freed if initialization thows an exception
175 #if _MSC_VER >= 1400
176 #pragma warning( disable : 4996 ) // unsafe string functions. Same as define _CRT_SECURE_NO_WARNINGS/_CRT_SECURE_NO_DEPRICATE
177 #endif
178
179 inline int vsnprintf(char* buf, size_t count, const char* fmt, va_list argptr) {
180 // If number of characters written == count, Windows doesn't write a
181 // terminating NULL, so we do it ourselves.
182 int ret = _vsnprintf(buf, count, fmt, argptr);
183 if (count > 0) buf[count-1] = '\0';
184 return ret;
185 }
183 186
184 // Portability macros 187 // Portability macros
185 #define PRAGMA_INTERFACE 188 #define PRAGMA_INTERFACE
186 #define PRAGMA_IMPLEMENTATION 189 #define PRAGMA_IMPLEMENTATION
187 #define PRAGMA_IMPLEMENTATION_(arg) 190 #define PRAGMA_IMPLEMENTATION_(arg)