1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 //-------------------------------------------------------------------------- 25 #ifndef _CONNECTIVITY_OFUNCTIONDEFS_HXX_ 26 #define _CONNECTIVITY_OFUNCTIONDEFS_HXX_ 27 28 #if defined(WNT) 29 30 #ifdef _MSC_VER 31 #pragma warning(push) 32 #pragma warning(disable:4005) 33 #endif 34 35 // just to go with calling convention of windows 36 #define SQL_API __stdcall 37 // On Win64, we need additional types predefined: 38 #if _WIN64 39 typedef long long INT64; 40 typedef unsigned long long UINT64; 41 #endif 42 #include <odbc/sqlext.h> 43 #undef SQL_API 44 #define SQL_API __stdcall 45 46 #ifdef _MSC_VER 47 #pragma warning(pop) 48 #endif 49 50 #ifndef SQL_C_BOOKMARK 51 #define SQL_C_BOOKMARK SQL_C_ULONG /* BOOKMARK */ 52 #endif 53 54 #ifndef SQL_OPT_TRACE_OFF 55 #define SQL_OPT_TRACE_OFF 0UL 56 #endif 57 58 #define SDB_ODBC_CHAR UCHAR 59 60 #endif 61 62 //-------------------------------------------------------------------------- 63 64 #ifdef OS2 65 #define ALLREADY_HAVE_OS2_TYPES 66 #define DONT_TD_VOID 67 #include <svpm.h> 68 #include <odbc/sqlext.h> 69 #define SDB_ODBC_CHAR UCHAR 70 #endif // OS2 71 72 #ifdef OS2__00 73 74 #ifdef ODBCIMP 75 76 // Stub-Version: dynamische Bindung an die DLL zur Laufzeit. 77 // odbcstub definiert die in den Quellen benutzten NSQL...-Methoden 78 // als indirekte Funktionsaufrufe. 79 // odbcimp zieht sich selbst preos2, odbc und postos2 an. 80 // #include "odbc3imp.hxx" 81 82 #else 83 84 // Zur Zeit verwenden wir die ODBC-DLL von Watcom-SQL direkt (ueber die 85 // mitgelieferte Lib). 86 87 #ifndef ODBC_OS2 88 #define ODBC_OS2 89 #endif 90 91 #include <svpm.h> 92 #include <odbc.h> 93 #define SQL_API __syscall 94 #ifndef SQL_MAX_MESSAGE_LENGTH 95 #define SQL_MAX_MESSAGE_LENGTH MAX_MESSAGE_LENGTH 96 #endif 97 #ifndef SQL_MAX_DSN_LENGTH 98 #define SQL_MAX_DSN_LENGTH MAX_DSN_LENGTH 99 #endif 100 #ifndef SQL_AUTOCOMMIT_ON 101 #define SQL_AUTOCOMMIT_ON 1UL 102 #endif 103 #ifndef SQL_AUTOCOMMIT_OFF 104 #define SQL_AUTOCOMMIT_OFF 0UL 105 #endif 106 107 #define SQL_FETCH_PRIOR SQL_FETCH_PREV 108 #define SQL_NO_TOTAL (-4) 109 110 // #include "odbc3defs.hxx" 111 112 #endif 113 114 // In der ODBC.H von Watcom werden Strings als char * erwartet 115 // (nicht, wie sonst bei ODBC ueblich, als UCHAR *). 116 #if defined( ICC ) || defined( WTC ) 117 #define SDB_ODBC_CHAR unsigned char 118 #else 119 #define SDB_ODBC_CHAR char 120 #endif 121 122 #endif 123 124 //-------------------------------------------------------------------------- 125 126 #ifdef UNX 127 128 // Zur Zeit verwenden wir die ODBC-shared library von Q+E direkt (ueber die 129 // mitgelieferte Lib). 130 131 #ifndef ODBC_UNX 132 #define ODBC_UNX 133 #endif 134 #define CALLBACK 135 #define EXPORT 136 #ifdef SYSTEM_ODBC_HEADERS 137 #include <sqlext.h> 138 #else 139 #include <odbc/sqlext.h> 140 #endif 141 #undef sal_Bool // Ist in qeodbc.h definiert, wird aber von solar.h noch einmal 142 // definiert. 143 144 #define SDB_ODBC_CHAR UCHAR 145 #define SQL_WCHAR (-8) 146 #define SQL_WVARCHAR (-9) 147 #define SQL_WLONGVARCHAR (-10) 148 #define SQL_C_WCHAR SQL_WCHAR 149 150 151 #endif // UNX 152 153 //-------------------------------------------------------------------------- 154 155 #ifndef SQL_WCHAR 156 #define SQL_WCHAR (-8) 157 #endif 158 #ifndef SQL_WVARCHAR 159 #define SQL_WVARCHAR (-9) 160 #endif 161 #ifndef SQL_WLONGVARCHAR 162 #define SQL_WLONGVARCHAR (-10) 163 #endif 164 #ifndef SQL_C_WCHAR 165 #define SQL_C_WCHAR SQL_WCHAR 166 #endif 167 168 #ifdef UNICODE 169 #define SQL_C_TCHAR SQL_C_WCHAR 170 #else 171 #define SQL_C_TCHAR SQL_C_CHAR 172 #endif 173 174 #endif // _CONNECTIVITY_OFUNCTIONDEFS_HXX_ 175