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 #include <odbc/sqlext.h>
38 #undef SQL_API
39 #define SQL_API __stdcall
40 
41 #ifdef _MSC_VER
42 #pragma warning(pop)
43 #endif
44 
45 #ifndef SQL_C_BOOKMARK
46 #define SQL_C_BOOKMARK   SQL_C_ULONG                     /* BOOKMARK         */
47 #endif
48 
49 #ifndef SQL_OPT_TRACE_OFF
50 #define SQL_OPT_TRACE_OFF               0UL
51 #endif
52 
53 #define SDB_ODBC_CHAR UCHAR
54 
55 #endif
56 
57 //--------------------------------------------------------------------------
58 
59 #ifdef OS2
60 #define ALLREADY_HAVE_OS2_TYPES
61 #define DONT_TD_VOID
62 #include <svpm.h>
63 #include <odbc/sqlext.h>
64 #define SDB_ODBC_CHAR UCHAR
65 #endif // OS2
66 
67 #ifdef OS2__00
68 
69 #ifdef ODBCIMP
70 
71 // Stub-Version: dynamische Bindung an die DLL zur Laufzeit.
72 // odbcstub definiert die in den Quellen benutzten NSQL...-Methoden
73 // als indirekte Funktionsaufrufe.
74 // odbcimp zieht sich selbst preos2, odbc und postos2 an.
75 //	#include "odbc3imp.hxx"
76 
77 #else
78 
79 // Zur Zeit verwenden wir die ODBC-DLL von Watcom-SQL direkt (ueber die
80 // mitgelieferte Lib).
81 
82 #ifndef ODBC_OS2
83 #define ODBC_OS2
84 #endif
85 
86 #include <svpm.h>
87 #include <odbc.h>
88 #define SQL_API __syscall
89 #ifndef SQL_MAX_MESSAGE_LENGTH
90 #define SQL_MAX_MESSAGE_LENGTH MAX_MESSAGE_LENGTH
91 #endif
92 #ifndef SQL_MAX_DSN_LENGTH
93 #define SQL_MAX_DSN_LENGTH MAX_DSN_LENGTH
94 #endif
95 #ifndef SQL_AUTOCOMMIT_ON
96 #define SQL_AUTOCOMMIT_ON 1UL
97 #endif
98 #ifndef SQL_AUTOCOMMIT_OFF
99 #define SQL_AUTOCOMMIT_OFF 0UL
100 #endif
101 
102 #define SQL_FETCH_PRIOR SQL_FETCH_PREV
103 #define SQL_NO_TOTAL (-4)
104 
105 //	#include "odbc3defs.hxx"
106 
107 #endif
108 
109 // In der ODBC.H von Watcom werden Strings als char * erwartet
110 // (nicht, wie sonst bei ODBC ueblich, als UCHAR *).
111 #if defined( ICC ) || defined( WTC )
112 #define SDB_ODBC_CHAR unsigned char
113 #else
114 #define SDB_ODBC_CHAR char
115 #endif
116 
117 #endif
118 
119 //--------------------------------------------------------------------------
120 
121 #ifdef UNX
122 
123 // Zur Zeit verwenden wir die ODBC-shared library von Q+E direkt (ueber die
124 // mitgelieferte Lib).
125 
126 #ifndef ODBC_UNX
127 #define ODBC_UNX
128 #endif
129 #define CALLBACK
130 #define EXPORT
131 #ifdef SYSTEM_ODBC_HEADERS
132 #include <sqlext.h>
133 #else
134 #include <odbc/sqlext.h>
135 #endif
136 #undef sal_Bool // Ist in qeodbc.h definiert, wird aber von solar.h noch einmal
137 			// definiert.
138 
139 #define SDB_ODBC_CHAR UCHAR
140 #define SQL_WCHAR		 	(-8)
141 #define SQL_WVARCHAR	 	(-9)
142 #define SQL_WLONGVARCHAR 	(-10)
143 #define SQL_C_WCHAR			SQL_WCHAR
144 
145 
146 #endif // UNX
147 
148 //--------------------------------------------------------------------------
149 
150 #ifndef SQL_WCHAR
151 #define SQL_WCHAR		 	(-8)
152 #endif
153 #ifndef SQL_WVARCHAR
154 #define SQL_WVARCHAR	 	(-9)
155 #endif
156 #ifndef SQL_WLONGVARCHAR
157 #define SQL_WLONGVARCHAR 	(-10)
158 #endif
159 #ifndef SQL_C_WCHAR
160 #define SQL_C_WCHAR			SQL_WCHAR
161 #endif
162 
163 #ifdef UNICODE
164 #define SQL_C_TCHAR		SQL_C_WCHAR
165 #else
166 #define SQL_C_TCHAR		SQL_C_CHAR
167 #endif
168 
169 #endif // _CONNECTIVITY_OFUNCTIONDEFS_HXX_
170 
171 
172