[dasher] Use the _WIN32 define rather than WIN32



commit e677c9c90c868c011056d3c78bef542de9fcba48
Author: Patrick Welche <prlw1 cam ac uk>
Date:   Fri Sep 28 12:09:53 2012 +0100

    Use the _WIN32 define rather than WIN32
    
    One of those instances looks as though it ought to be
      HAVE_KANJICONVERSIONIME_H

 Src/DasherCore/FileLogger.cpp                      |    8 ++++----
 Src/DasherCore/FileLogger.h                        |    8 ++++----
 .../LanguageModelling/JapaneseLanguageModel.cpp    |    4 ++--
 Src/DasherCore/NodeCreationManager.cpp             |    2 +-
 Src/DasherCore/SocketInputBase.cpp                 |    2 +-
 Src/Win32/Common/WinCommon.h                       |    1 -
 6 files changed, 12 insertions(+), 13 deletions(-)
---
diff --git a/Src/DasherCore/FileLogger.cpp b/Src/DasherCore/FileLogger.cpp
index b0e6baa..b53851d 100644
--- a/Src/DasherCore/FileLogger.cpp
+++ b/Src/DasherCore/FileLogger.cpp
@@ -77,7 +77,7 @@ CFileLogger::CFileLogger(const std::string& strFilenamePath, eLogLevel iLogLevel
 
 CFileLogger::~CFileLogger()
 {
-#ifdef WIN32
+#ifdef _WIN32
   if (m_bFunctionTiming)
   {
     // Dump the results of our function timing logging
@@ -342,7 +342,7 @@ void CFileLogger::LogFunctionExit(const std::string& strFunctionName)
   }
 }
 
-#ifdef WIN32
+#ifdef _WIN32
 void CFileLogger::LogFunctionTicks(const std::string& strFunctionName, __int64 iTicks)
 {
   __int64 iCurrent;
@@ -437,7 +437,7 @@ CFunctionLogger::CFunctionLogger(const std::string& strFunctionName, CFileLogger
       m_pLogger->LogFunctionEntry(m_strFunctionName);
     else
     {
-#ifdef WIN32
+#ifdef _WIN32
       BigInt iStartTicks;
       _asm
       {
@@ -460,7 +460,7 @@ CFunctionLogger::~CFunctionLogger()
       m_pLogger->LogFunctionExit(m_strFunctionName);
     else
     {
-#ifdef WIN32
+#ifdef _WIN32
       BigInt iEndTicks;
 
       _asm
diff --git a/Src/DasherCore/FileLogger.h b/Src/DasherCore/FileLogger.h
index 727b008..fb225bd 100644
--- a/Src/DasherCore/FileLogger.h
+++ b/Src/DasherCore/FileLogger.h
@@ -62,7 +62,7 @@
   if (g_pLogger != NULL)\
     g_pLogger->LogCritical s ;
 
-#ifdef WIN32
+#ifdef _WIN32
 // Types required by our high resolution WIN32 timing routines
 
 typedef  struct _BinInt32
@@ -126,7 +126,7 @@ public:
 
     void LogFunctionEntry(const std::string& strFunctionName);                  // Used by FunctionLogger to log entry to a function
     void LogFunctionExit(const std::string& strFunctionName);                   // Used by FunctionLogger to log exit from a function
-#ifdef WIN32
+#ifdef _WIN32
     void LogFunctionTicks(const std::string& strFunctionName, __int64 iTicks);  // Used by FunctionLogger to log how long was spent in a function
 #endif
     bool GetFunctionTiming();
@@ -147,7 +147,7 @@ private:
     std::string     GetIndentedString(const std::string& strText);
     std::string     GetTimeDateStamp();
 
-#ifdef WIN32
+#ifdef _WIN32
     MAP_STRING_INT64    m_mapFunctionTicks;     // Keeps track of how many ticks spent in each of our functions (who create a CFunctionLogger object)
 #endif
 
@@ -165,7 +165,7 @@ private:
     std::string     m_strFunctionName;          // Name of the function this object is logging
     CFileLogger*    m_pLogger;                  // Pointer to the logging object to use 
     
-#ifdef WIN32
+#ifdef _WIN32
     BigInt          m_iStartTicks;              // Tick count at start of timing
 #endif
 
diff --git a/Src/DasherCore/LanguageModelling/JapaneseLanguageModel.cpp b/Src/DasherCore/LanguageModelling/JapaneseLanguageModel.cpp
index ceda181..1f35b55 100644
--- a/Src/DasherCore/LanguageModelling/JapaneseLanguageModel.cpp
+++ b/Src/DasherCore/LanguageModelling/JapaneseLanguageModel.cpp
@@ -14,7 +14,7 @@
 #include "KanjiConversion.h"
 #ifdef HAVE_LIBCANNA
 #include "KanjiConversionCanna.h"
-#elif WIN32
+#elif _WIN32
 #include "KanjiConversionIME.h"
 #endif
 
@@ -111,7 +111,7 @@ void CJapaneseLanguageModel::GetProbs(Context context, std::vector<unsigned int>
       //TODO: Write a conversion code here
 #ifdef HAVE_LIBCANNA
       CKanjiConversionCanna canna;
-#elif WIN32
+#elif _WIN32
       CKanjiConversionIME canna;
 #else
       CKanjiConversion canna;
diff --git a/Src/DasherCore/NodeCreationManager.cpp b/Src/DasherCore/NodeCreationManager.cpp
index 26c333d..1f14e2b 100644
--- a/Src/DasherCore/NodeCreationManager.cpp
+++ b/Src/DasherCore/NodeCreationManager.cpp
@@ -64,7 +64,7 @@ CNodeCreationManager::CNodeCreationManager(CSettingsUser *pCreateFrom,
     case 1: {
       // Japanese
       CConversionManager *pConversionManager =
-#ifdef WIN32
+#ifdef _WIN32
       new CIMEConversionHelper;
 #else
       new CCannaConversionHelper(this, pAlphInfo, GetLongParameter(LP_CONVERSION_TYPE), GetLongParameter(LP_CONVERSION_ORDER));
diff --git a/Src/DasherCore/SocketInputBase.cpp b/Src/DasherCore/SocketInputBase.cpp
index fe59bcb..b747229 100644
--- a/Src/DasherCore/SocketInputBase.cpp
+++ b/Src/DasherCore/SocketInputBase.cpp
@@ -11,7 +11,7 @@
 #include <string.h>
 #include <errno.h>
 #include <stdarg.h>
-#ifdef WIN32
+#ifdef _WIN32
 #include <winsock2.h>
 #define DASHER_SOCKET_CLOSE_FUNCTION closesocket
 #else
diff --git a/Src/Win32/Common/WinCommon.h b/Src/Win32/Common/WinCommon.h
index 9c19672..047edd4 100644
--- a/Src/Win32/Common/WinCommon.h
+++ b/Src/Win32/Common/WinCommon.h
@@ -14,7 +14,6 @@
 #define NOMINMAX
 #define WIN32_LEAN_AND_MEAN     // Excludes rarely-used stuff from the Windows headers
 
-
 #include <atlbase.h>
 #include <atlwin.h>
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]