Mercurial > hg > truffle
diff 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 |
line wrap: on
line diff
--- a/src/share/vm/utilities/globalDefinitions_visCPP.hpp Thu Mar 26 16:00:51 2009 -0400 +++ b/src/share/vm/utilities/globalDefinitions_visCPP.hpp Fri Mar 27 01:35:39 2009 -0500 @@ -153,14 +153,6 @@ //---------------------------------------------------------------------------------------------------- // 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 @@ #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