00001 /***************************************************************************** 00002 * Copyright (C) 2011 by Benjamin Hadorn (b_hadorn@bluewin.ch) 00003 ***************************************************************************** 00004 * Project : Zeus Base Library 00005 * Module : BCB_Config 00006 * Package : Zeus.ZeusBase.Config.Compilers 00007 * Author : Benjamin Hadorn 00008 * Date : 27.12.2011 00009 * System : Zeus-Framework 00010 ***************************************************************************** 00011 * Licence: * 00012 * This library is free software; you can redistribute it and/or modify * 00013 * it under the terms of the GNU Lesser General Public License as * 00014 * published by the Free Software Foundation; either version * 00015 * 2.1 of the License, or (at your option) any later version. * 00016 * * 00017 * This library is distributed in the hope that it will be useful, * 00018 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00020 * GNU Lesser General Public License for more details. * 00021 * * 00022 * You should have received a copy of the GNU Lesser General Public * 00023 * License along with this library; if not, write to the Free Software * 00024 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA * 00025 *****************************************************************************/ 00026 00027 /***************************************************************************** 00028 * Changes: 00029 * 27.12.2011 bha: created zeus 2.0 00030 *****************************************************************************/ 00031 00032 #ifndef __BCB_Config_22934542321 00033 #define __BCB_Config_22934542321 00034 00035 //speed or footprint optimization 00036 // DO_OPTIMIZE_SPEED : optimizes the speed of the code 00037 // DO_OPTIMIZE_FOOTPRINT : optimizes the footprint of the code 00038 #if __BCOPT__ == 1 00039 #define DO_OPTIMIZE_SPEED 00040 #undef DO_OPTIMIZE_FOOTPRINT 00041 #else 00042 #undef DO_OPTIMIZE_SPEED 00043 #define DO_OPTIMIZE_FOOTPRINT 00044 #endif 00045 00046 00047 //Use bindings standard library 00048 #define USE_STL_BINDINGS 00049 00050 //Use bindings for borland 00051 #define USE_BCB_BINDINGS 00052 00053 //uses windows.h include 00054 #define USE_WINDOWS_H 00055 00056 //IPV6 not available on borland C++ builder 6.x because winsock2.h is not 00057 // included by windows.h 00058 #if __BCPLUSPLUS__ <= 0x0560 00059 #undef ENABLE_IPV6_BINDING 00060 #undef USE_STANDARD_INET_NTOP 00061 #undef USE_STANDARD_INET_PTON 00062 #else 00063 #define ENABLE_IPV6_BINDING 00064 #define _WINSOCKAPI_ //Prevent inclusion of winsock.h in windows.h 00065 00066 //define this for windows vista and higher 00067 #undef USE_STANDARD_INET_NTOP 00068 #undef USE_STANDARD_INET_PTON 00069 #endif 00070 00071 //Unicode string support 00072 #if __BCPLUSPLUS__ < 0x0610 00073 #undef ENABLE_BCB_UNICODESTRING 00074 #else 00075 #define ENABLE_BCB_UNICODESTRING 00076 #endif 00077 00078 //Bluetooth support 00079 #if __BCPLUSPLUS__ < 0x0610 00080 #undef ENABLE_WIN32_BLUETOOTH 00081 #else 00082 #define ENABLE_WIN32_BLUETOOTH 00083 #endif 00084 00085 //disable the warning if the precompiled header can't be created 00086 #pragma warn - 8058 00087 #pragma warn - 8026 00088 #pragma warn - 8027 00089 00090 //On debug versions the memory mapping is error prone for multithreading 00091 #if defined(_DEBUG) 00092 #define CREATE_SAFE(pVar, new_routine) \ 00093 pVar = NULL; \ 00094 for(Int i_928261 = 0; pVar == NULL && i_928261 < 4; i_928261++) \ 00095 { pVar = new_routine; } 00096 #else 00097 #define CREATE_SAFE(pVar, new_routine) pVar = new_routine; 00098 #endif 00099 00100 //The compiler option -b must be set for BCB projects otherwise enum's are not 00101 // handled properly passing as interface method parameters. Specially for VC 00102 // projects the problem is known, since they handle enums as int. 00103 #pragma defineonoption ENUM_AS_INT -b 00104 00105 #ifndef ENUM_AS_INT 00106 #error Compiler does not handle enums as int (Option -b not set). BCB projects are incompatible with VC projects. 00107 #endif 00108 00109 #endif 00110