{"action":"created","issue":{"url":"https://api.github.com/repos/cpputest/cpputest/issues/482","labels_url":"https://api.github.com/repos/cpputest/cpputest/issues/482/labels{/name}","comments_url":"https://api.github.com/repos/cpputest/cpputest/issues/482/comments","events_url":"https://api.github.com/repos/cpputest/cpputest/issues/482/events","html_url":"https://github.com/cpputest/cpputest/issues/482","id":57033825,"number":482,"title":"VC98 compilation broken","user":{"login":"PaulBussmann","id":10923218,"avatar_url":"https://avatars.githubusercontent.com/u/10923218?v=3","gravatar_id":"","url":"https://api.github.com/users/PaulBussmann","html_url":"https://github.com/PaulBussmann","followers_url":"https://api.github.com/users/PaulBussmann/followers","following_url":"https://api.github.com/users/PaulBussmann/following{/other_user}","gists_url":"https://api.github.com/users/PaulBussmann/gists{/gist_id}","starred_url":"https://api.github.com/users/PaulBussmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PaulBussmann/subscriptions","organizations_url":"https://api.github.com/users/PaulBussmann/orgs","repos_url":"https://api.github.com/users/PaulBussmann/repos","events_url":"https://api.github.com/users/PaulBussmann/events{/privacy}","received_events_url":"https://api.github.com/users/PaulBussmann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-09T14:00:09Z","updated_at":"2015-02-11T11:10:36Z","closed_at":null,"body":"The Visual Studio support for VC98 seems broken.\r\n\r\nThe following patch fixes this issue:\r\n\r\ndiff --git a/CppUTest.dsp b/CppUTest.dsp\r\nindex 6872242..3868bb4 100644\r\n--- a/CppUTest.dsp\r\n+++ b/CppUTest.dsp\r\n@@ -41,7 +41,7 @@ RSC=rc.exe\r\n # PROP Intermediate_Dir \"Release\"\r\n # PROP Target_Dir \"\"\r\n # ADD BASE CPP /nologo /W3 /GX /O2 /D \"WIN32\" /D \"NDEBUG\" /D \"_MBCS\" /D \"_LIB\" /YX /FD /c\r\n-# ADD CPP /nologo /W3 /GX /O2 /D \"WIN32\" /D \"NDEBUG\" /D \"_MBCS\" /D \"_LIB\" /YX /FD /c\r\n+# ADD CPP /nologo /W3 /GX /O2 /I \".\\include\\Platforms\\VisualCpp\" /I \".\\include\" /D \"WIN32\" /D \"NDEBUG\" /D \"_MBCS\" /D \"_LIB\" /YX /FD /c\r\n # ADD BASE RSC /l 0x409 /d \"NDEBUG\"\r\n # ADD RSC /l 0x409 /d \"NDEBUG\"\r\n BSC32=bscmake.exe\r\n@@ -64,7 +64,7 @@ LIB32=link.exe -lib\r\n # PROP Intermediate_Dir \"Debug\"\r\n # PROP Target_Dir \"\"\r\n # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D \"WIN32\" /D \"_DEBUG\" /D \"_MBCS\" /D \"_LIB\" /YX /FD /GZ /c\r\n-# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I \".\\include\\Platforms\\VisualCpp\" /I \".\\include\\CppUTest\" /D \"WIN32\" /D \"_DEBUG\" /D \"_MBCS\" /D \"_LIB\" /FD /GZ /c\r\n+# ADD CPP /nologo /MDd /W3 /GX /ZI /Od /I \".\\include\\Platforms\\VisualCpp\" /I \".\\include\" /D \"WIN32\" /D \"_DEBUG\" /D \"_MBCS\" /D \"_LIB\" /FR /FD /GZ /c\r\n # SUBTRACT CPP /YX\r\n # ADD BASE RSC /l 0x409 /d \"_DEBUG\"\r\n # ADD RSC /l 0x409 /d \"_DEBUG\"\r\n@@ -90,14 +90,6 @@ SOURCE=.\\SRC\\CPPUTEST\\CommandLineTestRunner.cpp\r\n # End Source File\r\n # Begin Source File\r\n \r\n-SOURCE=.\\SRC\\CPPUTEST\\EqualsFailure.cpp\r\n-# End Source File\r\n-# Begin Source File\r\n-\r\n-SOURCE=.\\SRC\\CPPUTEST\\Failure.cpp\r\n-# End Source File\r\n-# Begin Source File\r\n-\r\n SOURCE=.\\SRC\\CPPUTEST\\JUnitTestOutput.cpp\r\n # End Source File\r\n # Begin Source File\r\n@@ -106,26 +98,14 @@ SOURCE=.\\SRC\\CPPUTEST\\MemoryLeakWarningPlugin.cpp\r\n # End Source File\r\n # Begin Source File\r\n \r\n-SOURCE=.\\SRC\\CPPUTEST\\NullTest.cpp\r\n-# End Source File\r\n-# Begin Source File\r\n-\r\n SOURCE=.\\SRC\\CPPUTEST\\SimpleString.cpp\r\n # End Source File\r\n # Begin Source File\r\n \r\n-SOURCE=.\\SRC\\CPPUTEST\\SimpleStringExtensions.cpp\r\n-# End Source File\r\n-# Begin Source File\r\n-\r\n SOURCE=.\\SRC\\CPPUTEST\\TestHarness_c.cpp\r\n # End Source File\r\n # Begin Source File\r\n \r\n-SOURCE=.\\SRC\\CPPUTEST\\TestInstaller.cpp\r\n-# End Source File\r\n-# Begin Source File\r\n-\r\n SOURCE=.\\SRC\\CPPUTEST\\TestOutput.cpp\r\n # End Source File\r\n # Begin Source File\r\n@@ -148,10 +128,6 @@ SOURCE=.\\SRC\\CPPUTEST\\Utest.cpp\r\n \r\n SOURCE=.\\src\\Platforms\\VisualCpp\\UtestPlatform.cpp\r\n # End Source File\r\n-# Begin Source File\r\n-\r\n-SOURCE=.\\src\\Platforms\\VisualCpp\\Win32MemoryLeakWarning.cpp\r\n-# End Source File\r\n # End Group\r\n # Begin Group \"Header Files\"\r\n \r\ndiff --git a/include/Platforms/VisualCpp/Platform.h b/include/Platforms/VisualCpp/Platform.h\r\nindex d208ee6..45f662f 100644\r\n--- a/include/Platforms/VisualCpp/Platform.h\r\n+++ b/include/Platforms/VisualCpp/Platform.h\r\n@@ -26,16 +26,16 @@\r\n  */\r\n \r\n #ifdef _MSC_VER\r\n-//#pragma warning(disable:4786)\r\n-//#pragma warning(disable:4290)\r\n-//#pragma warning(disable:4996)\r\n+#pragma warning(disable:4786)\r\n+#pragma warning(disable:4290)\r\n+#pragma warning(disable:4996)\r\n #endif\r\n \r\n #ifdef WIN32\r\n     #ifdef _VC80_UPGRADE\r\n-        //#pragma warning(disable:4996)\r\n-        //#pragma warning(disable:4290)\r\n+        #pragma warning(disable:4996)\r\n+        #pragma warning(disable:4290)\r\n     #else\r\n-        //#define vsnprintf _vsnprintf\r\n+        #define vsnprintf _vsnprintf\r\n     #endif\r\n #endif\r\ndiff --git a/src/Platforms/VisualCpp/UtestPlatform.cpp b/src/Platforms/VisualCpp/UtestPlatform.cpp\r\nindex 7b4da7f..d52380e 100644\r\n--- a/src/Platforms/VisualCpp/UtestPlatform.cpp\r\n+++ b/src/Platforms/VisualCpp/UtestPlatform.cpp\r\n@@ -73,7 +73,7 @@ static const char* TimeStringImplementation()\r\n     time_t the_time = time(NULL);\r\n     struct tm the_local_time;\r\n     static char dateTime[80];\r\n-    localtime_s(&the_local_time, &the_time);\r\n+    _getsystime(&the_local_time);\r\n     strftime(dateTime, 80, \"%Y-%m-%dT%H:%M:%S\", &the_local_time);\r\n     return dateTime;\r\n }\r\n@@ -87,7 +87,7 @@ int PlatformSpecificVSNprintf(char *str, size_t size, const char* format, va_lis\r\n     char* buf = 0;\r\n     size_t sizeGuess = size;\r\n \r\n-    int result = _vsnprintf_s( str, size, _TRUNCATE, format, args);\r\n+    int result = _vsnprintf( str, size, format, args);\r\n     str[size-1] = 0;\r\n     while (result == -1)\r\n     {\r\n@@ -95,7 +95,7 @@ int PlatformSpecificVSNprintf(char *str, size_t size, const char* format, va_lis\r\n             free(buf);\r\n         sizeGuess += 10;\r\n         buf = (char*)malloc(sizeGuess);\r\n-        result = _vsnprintf_s( buf, sizeGuess, _TRUNCATE, format, args);\r\n+        result = _vsnprintf( buf, sizeGuess, format, args);\r\n     }\r\n \r\n     if (buf != 0)\r\n@@ -106,8 +106,7 @@ int PlatformSpecificVSNprintf(char *str, size_t size, const char* format, va_lis\r\n \r\n PlatformSpecificFile PlatformSpecificFOpen(const char* filename, const char* flag)\r\n {\r\n-   FILE* file;\r\n-   fopen_s(&file, filename, flag);\r\n+   FILE* file = fopen(filename, flag);\r\n    return file;\r\n }\r\n \r\n@@ -165,7 +164,7 @@ extern \"C\" int (*PlatformSpecificIsNan)(double) = _isnan;\r\n \r\n int PlatformSpecificVSNprintf(char *str, unsigned int size, const char* format, void* args)\r\n {\r\n-   return _vsnprintf_s( str, size, _TRUNCATE, format, (va_list) args);\r\n+   return _vsnprintf( str, size, format, (va_list) args);\r\n }\r\n \r\n static PlatformSpecificMutex Win32MutexCreate(void)\r\n"},"comment":{"url":"https://api.github.com/repos/cpputest/cpputest/issues/comments/73865221","html_url":"https://github.com/cpputest/cpputest/issues/482#issuecomment-73865221","issue_url":"https://api.github.com/repos/cpputest/cpputest/issues/482","id":73865221,"user":{"login":"arstrube","id":4686469,"avatar_url":"https://avatars.githubusercontent.com/u/4686469?v=3","gravatar_id":"","url":"https://api.github.com/users/arstrube","html_url":"https://github.com/arstrube","followers_url":"https://api.github.com/users/arstrube/followers","following_url":"https://api.github.com/users/arstrube/following{/other_user}","gists_url":"https://api.github.com/users/arstrube/gists{/gist_id}","starred_url":"https://api.github.com/users/arstrube/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arstrube/subscriptions","organizations_url":"https://api.github.com/users/arstrube/orgs","repos_url":"https://api.github.com/users/arstrube/repos","events_url":"https://api.github.com/users/arstrube/events{/privacy}","received_events_url":"https://api.github.com/users/arstrube/received_events","type":"User","site_admin":false},"created_at":"2015-02-11T11:10:36Z","updated_at":"2015-02-11T11:10:36Z","body":"I think it would be good to make the necessary changes to the .dsp / dsw . This should be done in any case (there seems to be nobody but you able to do it anymore). Perhaps make this a separate pull request. Nobody will mind merging it. (You could maybe cherry pick just those onto a new branch / pull request for starters).\r\n\r\nThen about your suggestion with a separate platform directory - I was thinking of that myself but hadn't thought it through. Oviously, we can't just undo the changes we introduced to support more current versions of VC. Conditional compilation might be another route we could take. @basvodde what do you think? "}}