6812297: update project creation for Visual Studio 2005-2008

Add 2 news classes to create VC8 and VC9 projects

Reviewed-by: apetrusenko, xlu
This commit is contained in:
Ivan P Krylov 2009-03-27 01:35:39 -05:00
parent ae0f3167d3
commit 595ff704c0
10 changed files with 213 additions and 31 deletions

View file

@ -153,14 +153,6 @@ const jlong max_jlong = CONST64(0x7fffffffffffffff);
//----------------------------------------------------------------------------------------------------
// Miscellaneous
inline int vsnprintf(char* buf, size_t count, const char* fmt, va_list argptr) {
// If number of characters written == count, Windows doesn't write a
// terminating NULL, so we do it ourselves.
int ret = _vsnprintf(buf, count, fmt, argptr);
if (count > 0) buf[count-1] = '\0';
return ret;
}
// Visual Studio 2005 deprecates POSIX names - use ISO C++ names instead
#if _MSC_VER >= 1400
#define open _open
@ -180,6 +172,17 @@ inline int vsnprintf(char* buf, size_t count, const char* fmt, va_list argptr) {
#pragma warning( disable : 4201 ) // nonstandard extension used : nameless struct/union (needed in windows.h)
#pragma warning( disable : 4511 ) // copy constructor could not be generated
#pragma warning( disable : 4291 ) // no matching operator delete found; memory will not be freed if initialization thows an exception
#if _MSC_VER >= 1400
#pragma warning( disable : 4996 ) // unsafe string functions. Same as define _CRT_SECURE_NO_WARNINGS/_CRT_SECURE_NO_DEPRICATE
#endif
inline int vsnprintf(char* buf, size_t count, const char* fmt, va_list argptr) {
// If number of characters written == count, Windows doesn't write a
// terminating NULL, so we do it ourselves.
int ret = _vsnprintf(buf, count, fmt, argptr);
if (count > 0) buf[count-1] = '\0';
return ret;
}
// Portability macros
#define PRAGMA_INTERFACE