Bump for 3.6-28
[LibreOffice.git] / connectivity / source / inc / odbc / OFunctiondefs.hxx
blobe4c8968e2ab71710e2ee8521fd12e5a1bbe3ab6d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 //--------------------------------------------------------------------------
30 #ifndef _CONNECTIVITY_OFUNCTIONDEFS_HXX_
31 #define _CONNECTIVITY_OFUNCTIONDEFS_HXX_
33 #if defined(WNT)
35 #ifdef _MSC_VER
36 #pragma warning(push)
37 #pragma warning(disable:4005)
38 #endif
40 // just to go with calling convention of windows
41 #define SQL_API __stdcall
42 #include <odbc/sqlext.h>
43 #undef SQL_API
44 #define SQL_API __stdcall
46 #ifdef _MSC_VER
47 #pragma warning(pop)
48 #endif
50 #ifndef SQL_C_BOOKMARK
51 #define SQL_C_BOOKMARK SQL_C_ULONG /* BOOKMARK */
52 #endif
54 #ifndef SQL_OPT_TRACE_OFF
55 #define SQL_OPT_TRACE_OFF 0UL
56 #endif
58 #define SDB_ODBC_CHAR UCHAR
60 #endif
62 //--------------------------------------------------------------------------
64 #ifdef OS2__00
66 #ifdef ODBCIMP
68 // Stub version: dynamic binding to the DLL at runtime.
69 // odbcstub defines the NSQL... methods used in the sources
70 // as indirect function calls.
71 // odbcimp uses preos2, odbc and postos2 itself.
72 // #include "odbc3imp.hxx"
74 #else
76 // Currently, we directly use the ODBC DLL from Watcom SQL (via the supplied lib)
78 #ifndef ODBC_OS2
79 #define ODBC_OS2
80 #endif
82 #include <svpm.h>
83 #include <odbc.h>
84 #define SQL_API __syscall
85 #ifndef SQL_MAX_MESSAGE_LENGTH
86 #define SQL_MAX_MESSAGE_LENGTH MAX_MESSAGE_LENGTH
87 #endif
88 #ifndef SQL_MAX_DSN_LENGTH
89 #define SQL_MAX_DSN_LENGTH MAX_DSN_LENGTH
90 #endif
91 #ifndef SQL_AUTOCOMMIT_ON
92 #define SQL_AUTOCOMMIT_ON 1UL
93 #endif
94 #ifndef SQL_AUTOCOMMIT_OFF
95 #define SQL_AUTOCOMMIT_OFF 0UL
96 #endif
98 #define SQL_FETCH_PRIOR SQL_FETCH_PREV
99 #define SQL_NO_TOTAL (-4)
101 #endif
103 // The ODBC.h from Watcom expects char*, not UCHAR* usually used with ODBC
104 #if defined( ICC )
105 #define SDB_ODBC_CHAR unsigned char
106 #else
107 #define SDB_ODBC_CHAR char
108 #endif
110 #endif
112 //--------------------------------------------------------------------------
114 #ifdef UNX
116 // Currently, we directly use the ODBC shared library from Q+E (via the supplied lib)
118 #ifndef ODBC_UNX
119 #define ODBC_UNX
120 #endif
121 #define CALLBACK
122 #define EXPORT
123 #ifdef SYSTEM_ODBC_HEADERS
124 #include <sqlext.h>
125 #else
126 #include <odbc/sqlext.h>
127 #endif
128 #undef sal_Bool // Is defined in qeodbc.h, but gets redefined by solar.h
130 #define SDB_ODBC_CHAR UCHAR
131 #define SQL_WCHAR (-8)
132 #define SQL_WVARCHAR (-9)
133 #define SQL_WLONGVARCHAR (-10)
134 #define SQL_C_WCHAR SQL_WCHAR
137 #endif // UNX
139 //--------------------------------------------------------------------------
141 #ifndef SQL_WCHAR
142 #define SQL_WCHAR (-8)
143 #endif
144 #ifndef SQL_WVARCHAR
145 #define SQL_WVARCHAR (-9)
146 #endif
147 #ifndef SQL_WLONGVARCHAR
148 #define SQL_WLONGVARCHAR (-10)
149 #endif
150 #ifndef SQL_C_WCHAR
151 #define SQL_C_WCHAR SQL_WCHAR
152 #endif
154 #ifdef UNICODE
155 #define SQL_C_TCHAR SQL_C_WCHAR
156 #else
157 #define SQL_C_TCHAR SQL_C_CHAR
158 #endif
160 #endif // _CONNECTIVITY_OFUNCTIONDEFS_HXX_
163 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */