124201887SPedro Giffuni /* 224201887SPedro Giffuni * iodbcunix.h 324201887SPedro Giffuni * 4acaca342SPedro Giffuni * $Id: iodbcunix.h,v 1.8 2009/08/30 10:48:32 source Exp $ 524201887SPedro Giffuni * 624201887SPedro Giffuni * ODBC defines for Unix 724201887SPedro Giffuni * 824201887SPedro Giffuni * The iODBC driver manager. 924201887SPedro Giffuni * 1024201887SPedro Giffuni * Copyright (C) 1995 by Ke Jin <kejin@empress.com> 11acaca342SPedro Giffuni * Copyright (C) 1996-2009 by OpenLink Software <iodbc@openlinksw.com> 1224201887SPedro Giffuni * All Rights Reserved. 1324201887SPedro Giffuni * 1424201887SPedro Giffuni * This software is released under the terms of either of the following 1524201887SPedro Giffuni * licenses: 1624201887SPedro Giffuni * 1724201887SPedro Giffuni * - GNU Library General Public License (see LICENSE.LGPL) 1824201887SPedro Giffuni * - The BSD License (see LICENSE.BSD). 1924201887SPedro Giffuni * 2024201887SPedro Giffuni * Note that the only valid version of the LGPL license as far as this 2124201887SPedro Giffuni * project is concerned is the original GNU Library General Public License 2224201887SPedro Giffuni * Version 2, dated June 1991. 2324201887SPedro Giffuni * 2424201887SPedro Giffuni * While not mandated by the BSD license, any patches you make to the 2524201887SPedro Giffuni * iODBC source code may be contributed back into the iODBC project 2624201887SPedro Giffuni * at your discretion. Contributions will benefit the Open Source and 2724201887SPedro Giffuni * Data Access community as a whole. Submissions may be made at: 2824201887SPedro Giffuni * 2924201887SPedro Giffuni * http://www.iodbc.org 3024201887SPedro Giffuni * 3124201887SPedro Giffuni * 3224201887SPedro Giffuni * GNU Library Generic Public License Version 2 3324201887SPedro Giffuni * ============================================ 3424201887SPedro Giffuni * This library is free software; you can redistribute it and/or 3524201887SPedro Giffuni * modify it under the terms of the GNU Library General Public 3624201887SPedro Giffuni * License as published by the Free Software Foundation; only 3724201887SPedro Giffuni * Version 2 of the License dated June 1991. 3824201887SPedro Giffuni * 3924201887SPedro Giffuni * This library is distributed in the hope that it will be useful, 4024201887SPedro Giffuni * but WITHOUT ANY WARRANTY; without even the implied warranty of 4124201887SPedro Giffuni * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 4224201887SPedro Giffuni * Library General Public License for more details. 4324201887SPedro Giffuni * 4424201887SPedro Giffuni * You should have received a copy of the GNU Library General Public 4524201887SPedro Giffuni * License along with this library; if not, write to the Free 4624201887SPedro Giffuni * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 4724201887SPedro Giffuni * 4824201887SPedro Giffuni * 4924201887SPedro Giffuni * The BSD License 5024201887SPedro Giffuni * =============== 5124201887SPedro Giffuni * Redistribution and use in source and binary forms, with or without 5224201887SPedro Giffuni * modification, are permitted provided that the following conditions 5324201887SPedro Giffuni * are met: 5424201887SPedro Giffuni * 5524201887SPedro Giffuni * 1. Redistributions of source code must retain the above copyright 5624201887SPedro Giffuni * notice, this list of conditions and the following disclaimer. 5724201887SPedro Giffuni * 2. Redistributions in binary form must reproduce the above copyright 5824201887SPedro Giffuni * notice, this list of conditions and the following disclaimer in 5924201887SPedro Giffuni * the documentation and/or other materials provided with the 6024201887SPedro Giffuni * distribution. 6124201887SPedro Giffuni * 3. Neither the name of OpenLink Software Inc. nor the names of its 6224201887SPedro Giffuni * contributors may be used to endorse or promote products derived 6324201887SPedro Giffuni * from this software without specific prior written permission. 6424201887SPedro Giffuni * 6524201887SPedro Giffuni * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 6624201887SPedro Giffuni * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 6724201887SPedro Giffuni * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 6824201887SPedro Giffuni * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL OPENLINK OR 6924201887SPedro Giffuni * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 7024201887SPedro Giffuni * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 7124201887SPedro Giffuni * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 7224201887SPedro Giffuni * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 7324201887SPedro Giffuni * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 7424201887SPedro Giffuni * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 7524201887SPedro Giffuni * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 7624201887SPedro Giffuni */ 7724201887SPedro Giffuni 7824201887SPedro Giffuni #ifndef _IODBCUNIX_H 7924201887SPedro Giffuni #define _IODBCUNIX_H 8024201887SPedro Giffuni 8124201887SPedro Giffuni /* 8224201887SPedro Giffuni * Standard header files 8324201887SPedro Giffuni */ 8424201887SPedro Giffuni #include <stdlib.h> 8524201887SPedro Giffuni #include <unistd.h> 8624201887SPedro Giffuni 8724201887SPedro Giffuni #if defined(__WCHAR_TYPE__) && !defined(MACOSX102) 8824201887SPedro Giffuni #include <wchar.h> 8924201887SPedro Giffuni #endif 9024201887SPedro Giffuni 9124201887SPedro Giffuni 9224201887SPedro Giffuni /* 9324201887SPedro Giffuni * Windows-style declarations 9424201887SPedro Giffuni */ 9524201887SPedro Giffuni #define NEAR 9624201887SPedro Giffuni #define FAR 9724201887SPedro Giffuni #define EXPORT 9824201887SPedro Giffuni #define PASCAL 9924201887SPedro Giffuni #define VOID void 10024201887SPedro Giffuni #define CALLBACK 101*3535586aSOliver-Rainer Wittmann #if !( defined(OS2) || defined(WNT) ) 10224201887SPedro Giffuni #define _cdecl 10324201887SPedro Giffuni #define __stdcall 1046e18eccdSPedro Giffuni #endif 10524201887SPedro Giffuni 10624201887SPedro Giffuni 10724201887SPedro Giffuni /* 10824201887SPedro Giffuni * Boolean support 10924201887SPedro Giffuni */ 11024201887SPedro Giffuni #ifndef TRUE 11124201887SPedro Giffuni #define TRUE 1 11224201887SPedro Giffuni #endif 11324201887SPedro Giffuni #ifndef FALSE 11424201887SPedro Giffuni #define FALSE 0 11524201887SPedro Giffuni #endif 11624201887SPedro Giffuni 11724201887SPedro Giffuni 11824201887SPedro Giffuni #ifdef __cplusplus 11924201887SPedro Giffuni extern "C" { 12024201887SPedro Giffuni #endif 12124201887SPedro Giffuni 12224201887SPedro Giffuni 12324201887SPedro Giffuni /* 12424201887SPedro Giffuni * Windows-style typedefs 12524201887SPedro Giffuni */ 12624201887SPedro Giffuni #if defined (OBSOLETE_WINDOWS_TYPES) 12724201887SPedro Giffuni typedef unsigned char BYTE; 12824201887SPedro Giffuni #endif 12924201887SPedro Giffuni typedef unsigned short WORD; 13024201887SPedro Giffuni typedef unsigned int DWORD; 13124201887SPedro Giffuni typedef char * LPSTR; 13224201887SPedro Giffuni typedef const char * LPCSTR; 13324201887SPedro Giffuni typedef wchar_t * LPWSTR; 13424201887SPedro Giffuni typedef const wchar_t * LPCWSTR; 13524201887SPedro Giffuni typedef DWORD * LPDWORD; 13624201887SPedro Giffuni 13724201887SPedro Giffuni #if !defined(BOOL) && !defined(_OBJC_OBJC_H_) 13824201887SPedro Giffuni typedef int BOOL; 13924201887SPedro Giffuni #endif 14024201887SPedro Giffuni 14124201887SPedro Giffuni 14224201887SPedro Giffuni /* 14324201887SPedro Giffuni * Determine sizeof(long) in case it is not determined by configure/config.h 14424201887SPedro Giffuni */ 14524201887SPedro Giffuni #ifndef SIZEOF_LONG 14624201887SPedro Giffuni #if defined (_LP64) || \ 14724201887SPedro Giffuni defined (__LP64__) || \ 14824201887SPedro Giffuni defined (__64BIT__) || \ 14924201887SPedro Giffuni defined (__alpha) || \ 15024201887SPedro Giffuni defined (__sparcv9) || \ 15124201887SPedro Giffuni defined (__arch64__) 15224201887SPedro Giffuni #define SIZEOF_LONG 8 /* 64 bit operating systems */ 15324201887SPedro Giffuni #else 15424201887SPedro Giffuni #define SIZEOF_LONG 4 /* 32 bit operating systems */ 15524201887SPedro Giffuni #endif 15624201887SPedro Giffuni #endif /* SIZEOF_LONG */ 15724201887SPedro Giffuni 15824201887SPedro Giffuni #ifdef __cplusplus 15924201887SPedro Giffuni } 16024201887SPedro Giffuni #endif 16124201887SPedro Giffuni 16224201887SPedro Giffuni #endif /* _IODBCUNIX_H */ 163