mithilesh1125 / tesseract-ocr

Automatically exported from code.google.com/p/tesseract-ocr
Other
0 stars 0 forks source link

__WIN32__ erroneously used in classify\errorcounter.cpp #623

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
classify\errorcounter.cpp does:

   #if defined __WIN32__ || defined _MSC_VER
   #include <ctime>
   #endif

This is the *only* occurrence of __WIN32__ in the entire code base.

Should probably be __MSW32__ instead.

Better yet, get rid of the tesseract-ocr custom defines and use the
standard _WIN32 (means both 32-bit & 64-bit windows). _WIN64 if for some 
strange reason you need to know if running on 64-bit windows. _MSC_VER if you 
need to check specifically for the VC++ compiler.

Original issue reported on code.google.com by tomp2...@gmail.com on 18 Feb 2012 at 1:31

GoogleCodeExporter commented 9 years ago
See "C/C+ Preprocessor Reference | The Preprocessor | Macros |
Predefined Macros"
(http://msdn.microsoft.com/en-us/library/b0084kay(v=vs.90).aspx) for the
complete list of predefined macros for Visual Studio 2008.

Original comment by tomp2...@gmail.com on 18 Feb 2012 at 1:33

GoogleCodeExporter commented 9 years ago
thanks. I just find out that #include <ctime> works ok on several compiler 
(linux gcc, mingw, VC++ so I removed "#if defined/#endif" (r676)

Original comment by zde...@gmail.com on 18 Feb 2012 at 9:19