log4cplus  2.0.0
tchar.h
Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //  Copyright (C) 2010-2015, Vaclav Haisman. All rights reserved.
00003 //  
00004 //  Redistribution and use in source and binary forms, with or without modifica-
00005 //  tion, are permitted provided that the following conditions are met:
00006 //  
00007 //  1. Redistributions of  source code must  retain the above copyright  notice,
00008 //     this list of conditions and the following disclaimer.
00009 //  
00010 //  2. Redistributions in binary form must reproduce the above copyright notice,
00011 //     this list of conditions and the following disclaimer in the documentation
00012 //     and/or other materials provided with the distribution.
00013 //  
00014 //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
00015 //  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
00016 //  FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
00017 //  APACHE SOFTWARE  FOUNDATION  OR ITS CONTRIBUTORS  BE LIABLE FOR  ANY DIRECT,
00018 //  INDIRECT, INCIDENTAL, SPECIAL,  EXEMPLARY, OR CONSEQUENTIAL  DAMAGES (INCLU-
00019 //  DING, BUT NOT LIMITED TO, PROCUREMENT  OF SUBSTITUTE GOODS OR SERVICES; LOSS
00020 //  OF USE, DATA, OR  PROFITS; OR BUSINESS  INTERRUPTION)  HOWEVER CAUSED AND ON
00021 //  ANY  THEORY OF LIABILITY,  WHETHER  IN CONTRACT,  STRICT LIABILITY,  OR TORT
00022 //  (INCLUDING  NEGLIGENCE OR  OTHERWISE) ARISING IN  ANY WAY OUT OF THE  USE OF
00023 //  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00024 
00027 #ifndef LOG4CPLUS_TCHAR_HEADER_
00028 #define LOG4CPLUS_TCHAR_HEADER_
00029 
00030 #include <log4cplus/config.hxx>
00031 
00032 #if defined (LOG4CPLUS_HAVE_PRAGMA_ONCE)
00033 #pragma once
00034 #endif
00035 
00036 #if defined (_WIN32)
00037 #include <cstddef>
00038 #endif
00039 
00040 
00041 #ifdef UNICODE
00042 #  define LOG4CPLUS_TEXT2(STRING) L##STRING
00043 #else
00044 #  define LOG4CPLUS_TEXT2(STRING) STRING
00045 #endif // UNICODE
00046 #define LOG4CPLUS_TEXT(STRING) LOG4CPLUS_TEXT2(STRING)
00047 
00048 
00049 namespace log4cplus
00050 {
00051 
00052 #if defined (UNICODE)
00053 typedef wchar_t tchar;
00054 
00055 #else
00056 typedef char tchar;
00057 
00058 #endif
00059 
00060 } // namespace log4cplus
00061 
00062 
00063 #endif // LOG4CPLUS_TCHAR_HEADER_