]> vaikene.ee Git - evaf/commitdiff
Windows build fixes.
authorEnar Väikene <enar.vaikene@mt.com>
Sun, 24 Apr 2011 06:32:40 +0000 (09:32 +0300)
committerEnar Väikene <enar.vaikene@mt.com>
Sun, 24 Apr 2011 06:32:40 +0000 (09:32 +0300)
src/libs/Common/logger.cpp
src/libs/Common/version.rc
src/main/GUI/version.rc
src/main/GUI/winconsole.cpp
src/main/GUI/winconsole.h

index 98d37708cc4f4630a15c8a5c6d86a92d4a268c05..8ccb0139fcd20a7285cb801c8c907f1f6ab8dfd8 100644 (file)
@@ -382,13 +382,15 @@ QString Logger::printf(char const * const fmt, ...) const
 #endif
 
     va_list ap;
-    ::va_start(ap, fmt);
 #ifdef Q_OS_WIN32
+    va_start(ap, fmt);
     _vsnprintf_s(str, sizeof(str), _TRUNCATE, fmt, ap);
+    va_end(ap);
 #else
+    ::va_start(ap, fmt);
     if (::vasprintf(&str, fmt, ap)); // IF is needed to avoid the compiler warning
-#endif
     ::va_end(ap);
+#endif
 
     QString rval(str);
 
index 4ada8620125068720a77c9629d22585994908613..04ed2f88b06e0bffa7bde38452de62b89c2ef026 100644 (file)
@@ -43,8 +43,8 @@ VS_VERSION_INFO VERSIONINFO
                                 VALUE "FileDescription", VER_FILE_DESCRIPTION_STR
                                 VALUE "FileVersion", VER_FILE_VERSION_STR
                                 VALUE "LegalCopyright", VER_LEGAL_COPYRIGHT_STR
-                                VALUE "OriginalFilename", VER_ORIGINAL_FILENAME_STR
-                                VALUE "ProductName", VER_PRODUC_TNAME_STR
+                                VALUE "OriginalFilename", VER_ORIGINAL_FILE_NAME_STR
+                                VALUE "ProductName", VER_PRODUCT_NAME_STR
                                 VALUE "ProductVersion", VER_PRODUCT_VERSION_STR
                                 VALUE "Build Date", VER_PRODUCT_DATE_STR
                                 VALUE "Module Name", VER_MODULE_NAME_STR
index bf94cb05eb00214a48f1caf6207efa75b0f9fede..695d42bc4dabccca899c0c8c87f8b7714e5f4cb5 100644 (file)
@@ -43,8 +43,8 @@ VS_VERSION_INFO VERSIONINFO
                                 VALUE "FileDescription", VER_FILE_DESCRIPTION_STR
                                 VALUE "FileVersion", VER_FILE_VERSION_STR
                                 VALUE "LegalCopyright", VER_LEGAL_COPYRIGHT_STR
-                                VALUE "OriginalFilename", VER_ORIGINAL_FILENAME_STR
-                                VALUE "ProductName", VER_PRODUC_TNAME_STR
+                                VALUE "OriginalFilename", VER_ORIGINAL_FILE_NAME_STR
+                                VALUE "ProductName", VER_PRODUCT_NAME_STR
                                 VALUE "ProductVersion", VER_PRODUCT_VERSION_STR
                                 VALUE "Build Date", VER_PRODUCT_DATE_STR
                                 VALUE "Module Name", VER_MODULE_NAME_STR
index 6a59c69c5608eddb2c0c152604aa391e7dbb315c..cd35c33fd43f3d082bb5ebd19f267f512df7dade 100644 (file)
  * Agreement provided with the Software.
  */
 
-#ifdef Q_OS_WIN32
-
 #include "winconsole.h"
 
-#define _CRT_SECURE_NO_WARNINGS
+#define _CRT_SECURE_NO_DEPRECATE
 
 #include <windows.h>
 #include <stdio.h>
 
-using namespace eVaf::GUI::Internal;
-
-void enableWinConsole()
+void eVaf::GUI::Internal::enableWinConsole()
 {
     AllocConsole();
     freopen("conin$", "r", stdin);
@@ -36,6 +32,4 @@ void enableWinConsole()
     freopen("conout$", "w", stderr);
 }
 
-#undef _CRT_SECURE_NO_WARNINGS
-
-#endif
+#undef _CRT_SECURE_NO_DEPRECATE
index dc075b121a86ff4e99e111e889bbce3637537450..128b5ea2468eb9f3f6c6f713182e4b709b7b7e8a 100644 (file)
@@ -24,15 +24,11 @@ namespace eVaf {
 namespace GUI {
 namespace Internal {
 
-#ifdef Q_OS_WIN32
-
 /**
  * Enables the console window on Windows
  */
 void enableWinConsole();
 
-#endif
-
 } // namespace eVaf::GUI::Internal
 } // namespace eVaf::GUI
 } // namespace eVaf