1 /*************************************************************************/ 2 /* module: Compiler Flag Definition File */ 3 /* file: define.h */ 4 /* target system: win */ 5 /* target OS: win */ 6 /*************************************************************************/ 7 8 /* 9 * Copyright Notice 10 * Copyright (c) Ericsson, IBM, Lotus, Matsushita Communication 11 * Industrial Co., Ltd., Motorola, Nokia, Openwave Systems, Inc., 12 * Palm, Inc., Psion, Starfish Software, Symbian, Ltd. (2001). 13 * All Rights Reserved. 14 * Implementation of all or part of any Specification may require 15 * licenses under third party intellectual property rights, 16 * including without limitation, patent rights (such a third party 17 * may or may not be a Supporter). The Sponsors of the Specification 18 * are not responsible and shall not be held responsible in any 19 * manner for identifying or failing to identify any or all such 20 * third party intellectual property rights. 21 * 22 * THIS DOCUMENT AND THE INFORMATION CONTAINED HEREIN ARE PROVIDED 23 * ON AN "AS IS" BASIS WITHOUT WARRANTY OF ANY KIND AND ERICSSON, IBM, 24 * LOTUS, MATSUSHITA COMMUNICATION INDUSTRIAL CO. LTD, MOTOROLA, 25 * NOKIA, PALM INC., PSION, STARFISH SOFTWARE AND ALL OTHER SYNCML 26 * SPONSORS DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 27 * BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 28 * HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 29 * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT 30 * SHALL ERICSSON, IBM, LOTUS, MATSUSHITA COMMUNICATION INDUSTRIAL CO., 31 * LTD, MOTOROLA, NOKIA, PALM INC., PSION, STARFISH SOFTWARE OR ANY 32 * OTHER SYNCML SPONSOR BE LIABLE TO ANY PARTY FOR ANY LOSS OF 33 * PROFITS, LOSS OF BUSINESS, LOSS OF USE OF DATA, INTERRUPTION OF 34 * BUSINESS, OR FOR DIRECT, INDIRECT, SPECIAL OR EXEMPLARY, INCIDENTAL, 35 * PUNITIVE OR CONSEQUENTIAL DAMAGES OF ANY KIND IN CONNECTION WITH 36 * THIS DOCUMENT OR THE INFORMATION CONTAINED HEREIN, EVEN IF ADVISED 37 * OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE. 38 * 39 * The above notice and this paragraph must be included on all copies 40 * of this document that are made. 41 * 42 */ 43 44 /** 45 * File for Windows Specific Compiler Flags 46 */ 47 48 #ifndef _DEFINE_H 49 #define _DEFINE_H 50 #define __ANSI_C__ 51 52 53 /* thread safety (added by luz (at) synthesis.ch, 2001-10-29) */ 54 /* Note: moved define of this to target_options.h of every target */ 55 //#undef __MAKE_THREADSAFE 56 57 /* enable Alloc helpers */ 58 #define __USE_ALLOCFUNCS__ 59 60 /* do we need WBXML (binary XML) processing ? */ 61 #define __SML_WBXML__ 62 /* do we need XML processing ? */ 63 #define __SML_XML__ 64 /* are we using a 'light' toolkit ? */ 65 //#define __SML_LITE__ 66 /* do we use Sub DTD extensions ? */ 67 #define __USE_EXTENSIONS__ 68 /* do we need Metainformation DTD parsing ? */ 69 #define __USE_METINF__ 70 /* do we use Device Info DTD ? */ 71 #define __USE_DEVINF__ 72 /* do we use DM TND DTD ? */ 73 #define __USE_DMTND__ 74 75 /* which of the following optional commands should be included ? */ 76 77 #define ADD_SEND 78 #define ATOMIC_SEND 79 #define ATOMIC_RECEIVE 80 #define COPY_SEND 81 #define COPY_RECEIVE 82 #define EXEC_SEND 83 #define EXEC_RECEIVE 84 #define GET_SEND 85 #define MAP_RECEIVE 86 #define MAPITEM_RECEIVE 87 #define RESULT_RECEIVE 88 #define SEARCH_SEND 89 #define SEARCH_RECEIVE 90 #define SEQUENCE_SEND 91 #define SEQUENCE_RECEIVE 92 93 94 /* TK: to improve interoperability and handling we 95 * switched to using .def files instead of compiler 96 * specific per function definitions. As long as we only 97 * use C this is the easiest and cleanes way 98 */ 99 100 #define SML_API 101 #define SML_API_DEF 102 #define XPT_API 103 #define XPT_API_DEF 104 105 /* TK: Old, now obsolete code follows here */ 106 #ifdef USE_OLD_DEFINES 107 /* 108 When building the DLL code with GNU, you should define BUILDING_DLL so that 109 the variables/functions are exported correctly. When using the DLL, 110 do NOT define BUILDING_DLL, and then the variables/functions will be 111 imported correctly. 112 113 You need to be using egcs-1.1.1 or newer. 114 115 Building the DLL: 116 - define BUILDING_DLL, which defines SML_API __attribute__((dllexport)) 117 Building the client code: 118 - DO NOT define BUILDING_DLL, which defines SML_API to be one __attribute__((dllimport)) 119 */ 120 121 122 #if __GNUC__ || __MSVC__ || __MSVCPP__ || _WIN32_WCE 123 /* define this, if you want to link the toolkit static */ 124 #if __LINK_TOOLKIT_STATIC__ || __linux__ 125 #define SML_API 126 #define SML_API_DEF 127 #define XPT_API 128 #define XPT_API_DEF 129 #else 130 #if BUILDING_DLL 131 #define SML_API __declspec (dllexport) 132 #define SML_API_DEF __declspec (dllexport) 133 #define XPT_API __declspec (dllexport) 134 #define XPT_API_DEF __declspec (dllexport) 135 #else /* Not BUILDING_DLL */ 136 #define SML_API __declspec (dllimport) 137 #define SML_API_DEF __declspec (dllimport) 138 #define XPT_API __declspec (dllimport) 139 #define XPT_API_DEF __declspec (dllimport) 140 #endif /* Not BUILDING_DLL */ 141 #endif 142 #else 143 #if __IBMC__ || __IBMCPP__ 144 #define SML_API_DEF __stdcall 145 #define SML_API __stdcall _Export 146 #define XPT_API_DEF __stdcall 147 #define XPT_API __stdcall _Export 148 #else 149 #if WIN32 150 #define SML_API __declspec (dllexport) 151 #define SML_API_DEF __declspec (dllexport) 152 #define XPT_API #error 153 #define XPT_API_DEF #error 154 #else 155 #define SML_API_DEF __stdcall 156 #define SML_API __stdcall 157 #define XPT_API_DEF __stdcall 158 #define XPT_API __stdcall 159 #endif 160 #endif 161 #endif 162 #endif // USE_OLD_DEFINES 163 164 #endif 165