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