]>
git.saurik.com Git - wxWidgets.git/blob - src/iodbc/config.h
9 * The iODBC driver manager.
11 * Copyright (C) 1995 by Ke Jin <kejin@empress.com>
13 * This library is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU Library General Public
15 * License as published by the Free Software Foundation; either
16 * version 2 of the License, or (at your option) any later version.
18 * This library 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 GNU
21 * Library General Public License for more details.
23 * You should have received a copy of the GNU Library General Public
24 * License along with this library; if not, write to the Free
25 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30 #if !defined(WINDOWS) && !defined(WIN32_SYSTEM)
35 /* we have these definitions from configure */
36 #if defined(HAVE_DLOPEN)
37 #define DLDAPI_SVR4_DLFCN
38 #elif define(HAVE_SHL_LOAD)
43 #include <sys/types.h>
47 #define MEM_ALLOC(size) (malloc((size_t)(size)))
48 #define MEM_FREE(ptr) {if(ptr) free(ptr);}
50 #define STRCPY(t, s) (strcpy((char*)(t), (char*)(s)))
51 #define STRNCPY(t,s,n) (strncpy((char*)(t), (char*)(s), (size_t)(n)))
52 #define STRCAT(t, s) (strcat((char*)(t), (char*)(s)))
53 #define STRNCAT(t,s,n) (strncat((char*)(t), (char*)(s), (size_t)(n)))
54 #define STREQ(a, b) (strcmp((char*)(a), (char*)(b)) == 0)
55 #define STRLEN(str) ((str)? strlen((char*)(str)):0)
61 typedef signed short SSHOR
;
70 #if defined(WINDOWS) || defined(WIN32_SYSTEM)
75 #define MEM_ALLOC(size) (fmalloc((size_t)(size)))
76 #define MEM_FREE(ptr) ((ptr)? ffree((PTR)(ptr)):0))
77 #define STRCPY(t, s) (fstrcpy((char FAR*)(t), (char FAR*)(s)))
78 #define STRNCPY(t,s,n) (fstrncpy((char FAR*)(t), (char FAR*)(s), (size_t)(n)))
79 #define STRLEN(str) ((str)? fstrlen((char FAR*)(str)):0)
80 #define STREQ(a, b) (fstrcmp((char FAR*)(a), (char FAR*)(b) == 0)
84 #define MEM_ALLOC(size) (farmalloc((unsigned long)(size))
85 #define MEM_FREE(ptr) ((ptr)? farfree((void far*)(ptr)):0)
86 #define STRCPY(t, s) (_fstrcpy((char FAR*)(t), (char FAR*)(s)))
87 #define STRNCPY(t,s,n) (_fstrncpy((char FAR*)(t), (char FAR*)(s), (size_t)(n)))
88 #define STRLEN(str) ((str)? _fstrlen((char FAR*)(str)):0)
89 #define STREQ(a, b) (_fstrcmp((char FAR*)(a), (char FAR*)(b) == 0)
97 #define NULL ((void FAR*)0UL)