1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 //--------------------------------------------------------------------------
29 #ifndef _CONNECTIVITY_OFUNCTIONDEFS_HXX_
30 #define _CONNECTIVITY_OFUNCTIONDEFS_HXX_
31 
32 #if defined(WNT)
33 
34 #ifdef _MSC_VER
35 #pragma warning(push)
36 #pragma warning(disable:4005)
37 #endif
38 
39 // just to go with calling convention of windows
40 #define SQL_API __stdcall
41 #include <odbc/sqlext.h>
42 #undef SQL_API
43 #define SQL_API __stdcall
44 
45 #ifdef _MSC_VER
46 #pragma warning(pop)
47 #endif
48 
49 #ifndef SQL_C_BOOKMARK
50 #define SQL_C_BOOKMARK   SQL_C_ULONG                     /* BOOKMARK         */
51 #endif
52 
53 #ifndef SQL_OPT_TRACE_OFF
54 #define SQL_OPT_TRACE_OFF               0UL
55 #endif
56 
57 #define SDB_ODBC_CHAR UCHAR
58 
59 #endif
60 
61 //--------------------------------------------------------------------------
62 
63 #ifdef OS2
64 #define ALLREADY_HAVE_OS2_TYPES
65 #define DONT_TD_VOID
66 #include <svpm.h>
67 #include <odbc/sqlext.h>
68 #define SDB_ODBC_CHAR UCHAR
69 #endif // OS2
70 
71 #ifdef OS2__00
72 
73 #ifdef ODBCIMP
74 
75 // Stub-Version: dynamische Bindung an die DLL zur Laufzeit.
76 // odbcstub definiert die in den Quellen benutzten NSQL...-Methoden
77 // als indirekte Funktionsaufrufe.
78 // odbcimp zieht sich selbst preos2, odbc und postos2 an.
79 //	#include "odbc3imp.hxx"
80 
81 #else
82 
83 // Zur Zeit verwenden wir die ODBC-DLL von Watcom-SQL direkt (ueber die
84 // mitgelieferte Lib).
85 
86 #ifndef ODBC_OS2
87 #define ODBC_OS2
88 #endif
89 
90 #include <svpm.h>
91 #include <odbc.h>
92 #define SQL_API __syscall
93 #ifndef SQL_MAX_MESSAGE_LENGTH
94 #define SQL_MAX_MESSAGE_LENGTH MAX_MESSAGE_LENGTH
95 #endif
96 #ifndef SQL_MAX_DSN_LENGTH
97 #define SQL_MAX_DSN_LENGTH MAX_DSN_LENGTH
98 #endif
99 #ifndef SQL_AUTOCOMMIT_ON
100 #define SQL_AUTOCOMMIT_ON 1UL
101 #endif
102 #ifndef SQL_AUTOCOMMIT_OFF
103 #define SQL_AUTOCOMMIT_OFF 0UL
104 #endif
105 
106 #define SQL_FETCH_PRIOR SQL_FETCH_PREV
107 #define SQL_NO_TOTAL (-4)
108 
109 //	#include "odbc3defs.hxx"
110 
111 #endif
112 
113 // In der ODBC.H von Watcom werden Strings als char * erwartet
114 // (nicht, wie sonst bei ODBC ueblich, als UCHAR *).
115 #if defined( ICC ) || defined( WTC )
116 #define SDB_ODBC_CHAR unsigned char
117 #else
118 #define SDB_ODBC_CHAR char
119 #endif
120 
121 #endif
122 
123 //--------------------------------------------------------------------------
124 
125 #ifdef UNX
126 
127 // Zur Zeit verwenden wir die ODBC-shared library von Q+E direkt (ueber die
128 // mitgelieferte Lib).
129 
130 #ifndef ODBC_UNX
131 #define ODBC_UNX
132 #endif
133 #define CALLBACK
134 #define EXPORT
135 #ifdef SYSTEM_ODBC_HEADERS
136 #include <sqlext.h>
137 #else
138 #include <odbc/sqlext.h>
139 #endif
140 #undef sal_Bool // Ist in qeodbc.h definiert, wird aber von solar.h noch einmal
141 			// definiert.
142 
143 #define SDB_ODBC_CHAR UCHAR
144 #define SQL_WCHAR		 	(-8)
145 #define SQL_WVARCHAR	 	(-9)
146 #define SQL_WLONGVARCHAR 	(-10)
147 #define SQL_C_WCHAR			SQL_WCHAR
148 
149 
150 #endif // UNX
151 
152 //--------------------------------------------------------------------------
153 
154 #ifndef SQL_WCHAR
155 #define SQL_WCHAR		 	(-8)
156 #endif
157 #ifndef SQL_WVARCHAR
158 #define SQL_WVARCHAR	 	(-9)
159 #endif
160 #ifndef SQL_WLONGVARCHAR
161 #define SQL_WLONGVARCHAR 	(-10)
162 #endif
163 #ifndef SQL_C_WCHAR
164 #define SQL_C_WCHAR			SQL_WCHAR
165 #endif
166 
167 #ifdef UNICODE
168 #define SQL_C_TCHAR		SQL_C_WCHAR
169 #else
170 #define SQL_C_TCHAR		SQL_C_CHAR
171 #endif
172 
173 #endif // _CONNECTIVITY_OFUNCTIONDEFS_HXX_
174 
175 
176