00001 // Module: Log4CPLUS 00002 // File: config-win32.h 00003 // Created: 4/2003 00004 // Author: Tad E. Smith 00005 // 00006 // 00007 // Copyright 2003-2009 Tad E. Smith 00008 // 00009 // Licensed under the Apache License, Version 2.0 (the "License"); 00010 // you may not use this file except in compliance with the License. 00011 // You may obtain a copy of the License at 00012 // 00013 // http://www.apache.org/licenses/LICENSE-2.0 00014 // 00015 // Unless required by applicable law or agreed to in writing, software 00016 // distributed under the License is distributed on an "AS IS" BASIS, 00017 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00018 // See the License for the specific language governing permissions and 00019 // limitations under the License. 00020 00023 #ifndef LOG4CPLUS_CONFIG_WIN32_HEADER_ 00024 #define LOG4CPLUS_CONFIG_WIN32_HEADER_ 00025 00026 #ifdef _WIN32 00027 #include <windows.h> 00028 00029 /* Define if you have the ftime function. */ 00030 #define LOG4CPLUS_HAVE_FTIME 1 00031 00032 #if defined (_WIN32_WCE) 00033 # define LOG4CPLUS_DLLMAIN_HINSTANCE HANDLE 00034 # undef LOG4CPLUS_HAVE_NT_EVENT_LOG 00035 #else 00036 # define LOG4CPLUS_DLLMAIN_HINSTANCE HINSTANCE 00037 # define LOG4CPLUS_HAVE_NT_EVENT_LOG 00038 # define LOG4CPLUS_HAVE_WIN32_CONSOLE 00039 #endif 00040 00041 // log4cplus_EXPORTS is used by the CMake build system. DLL_EXPORT is 00042 // used by the autotools build system. 00043 #if defined (log4cplus_EXPORTS) || defined (DLL_EXPORT) 00044 # undef LOG4CPLUS_BUILD_DLL 00045 # define LOG4CPLUS_BUILD_DLL 00046 #endif 00047 00048 #if ! defined (LOG4CPLUS_BUILD_DLL) 00049 # undef LOG4CPLUS_STATIC 00050 # define LOG4CPLUS_STATIC 00051 #endif 00052 00053 #if defined (LOG4CPLUS_STATIC) && defined (LOG4CPLUS_BUILD_DLL) 00054 # error LOG4CPLUS_STATIC and LOG4CPLUS_BUILD_DLL cannot be defined both. 00055 #endif 00056 00057 #if defined (LOG4CPLUS_BUILD_DLL) 00058 # if defined (INSIDE_LOG4CPLUS) 00059 # define LOG4CPLUS_EXPORT __declspec(dllexport) 00060 # else 00061 # define LOG4CPLUS_EXPORT __declspec(dllimport) 00062 # endif 00063 #else 00064 # define LOG4CPLUS_EXPORT 00065 #endif 00066 00067 #ifndef LOG4CPLUS_SINGLE_THREADED 00068 # define LOG4CPLUS_USE_WIN32_THREADS 00069 #endif 00070 00071 #if defined(_MSC_VER) 00072 // Warning about: identifier was truncated to '255' characters in the debug information 00073 # pragma warning( disable : 4786 ) 00074 // Warning about: <type1> needs to have dll-interface to be used by clients of class <type2> 00075 # pragma warning( disable : 4251 ) 00076 00077 # if _MSC_VER >= 1400 00078 # define LOG4CPLUS_WORKING_LOCALE 00079 # endif 00080 00081 #endif 00082 00083 00084 #endif // _WIN32 00085 #endif // LOG4CPLUS_CONFIG_WIN32_HEADER_ 00086