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