]> git.saurik.com Git - wxWidgets.git/blame - src/iodbc/config.h
changed make_int, make_exp .. to wxmake_int..
[wxWidgets.git] / src / iodbc / config.h
CommitLineData
7e616b10
RR
1#ifndef _CONFIG_H
2#define _CONFIG_H
1a6944fd 3
7e616b10
RR
4# if !defined(WINDOWS) && !defined(WIN32_SYSTEM) && !defined(OS2)
5# define _UNIX_
1a6944fd 6
7e616b10
RR
7# include <stdlib.h>
8# include <sys/types.h>
9# include <string.h>
10# include <stdio.h>
1a6944fd 11
7e616b10
RR
12# define MEM_ALLOC(size) (malloc((size_t)(size)))
13# define MEM_FREE(ptr) {if(ptr) free(ptr);}
1a6944fd 14
7e616b10
RR
15# define STRCPY(t, s) (strcpy((char*)(t), (char*)(s)))
16# define STRNCPY(t,s,n) (strncpy((char*)(t), (char*)(s), (size_t)(n)))
17# define STRCAT(t, s) (strcat((char*)(t), (char*)(s)))
18# define STRNCAT(t,s,n) (strncat((char*)(t), (char*)(s), (size_t)(n)))
19# define STREQ(a, b) (strcmp((char*)(a), (char*)(b)) == 0)
20# define STRLEN(str) ((str)? strlen((char*)(str)):0)
1a6944fd 21
7e616b10
RR
22# define EXPORT
23# define CALLBACK
24# define FAR
25
26 typedef signed short SSHOR;
27 typedef short WORD;
28 typedef long DWORD;
29
30 typedef WORD WPARAM;
31 typedef DWORD LPARAM;
6d5977df
KB
32// KB: I don't see where HWND and BOOL could get defined before here,
33// but putting in the #ifndef's solved the compilation problem on Solaris.
34#ifndef HWND
35typedef void* HWND;
36#endif
37#ifndef BOOL
38typedef int BOOL;
39#endif
7e616b10
RR
40
41# endif /* _UNIX_ */
42
43# if defined(WINDOWS) || defined(WIN32_SYSTEM)
44
45# include <windows.h>
46# include <windowsx.h>
47
48# ifdef _MSVC_
49# define MEM_ALLOC(size) (fmalloc((size_t)(size)))
50# define MEM_FREE(ptr) ((ptr)? ffree((PTR)(ptr)):0))
51# define STRCPY(t, s) (fstrcpy((char FAR*)(t), (char FAR*)(s)))
52# define STRNCPY(t,s,n) (fstrncpy((char FAR*)(t), (char FAR*)(s), (size_t)(n)))
53# define STRLEN(str) ((str)? fstrlen((char FAR*)(str)):0)
54# define STREQ(a, b) (fstrcmp((char FAR*)(a), (char FAR*)(b) == 0)
55# endif
56
57# ifdef _BORLAND_
58# define MEM_ALLOC(size) (farmalloc((unsigned long)(size))
59# define MEM_FREE(ptr) ((ptr)? farfree((void far*)(ptr)):0)
60# define STRCPY(t, s) (_fstrcpy((char FAR*)(t), (char FAR*)(s)))
61# define STRNCPY(t,s,n) (_fstrncpy((char FAR*)(t), (char FAR*)(s), (size_t)(n)))
62# define STRLEN(str) ((str)? _fstrlen((char FAR*)(str)):0)
63# define STREQ(a, b) (_fstrcmp((char FAR*)(a), (char FAR*)(b) == 0)
64# endif
65
66# endif /* WINDOWS */
67
68# if defined(OS2)
69
70# include <stdlib.h>
71# include <stdio.h>
72# include <string.h>
73# include <memory.h>
74# define INCL_DOSMODULEMGR /* Module Manager values */
75# define INCL_DOSERRORS /* Error values */
76# include <os2.h>
77
78# ifndef FAR
79# define FAR
80# endif
81
82# define MEM_ALLOC(size) (malloc((size_t)(size)))
83# define MEM_FREE(ptr) (free((ptr)))
84# define STRCPY(t, s) (strcpy((char*)(t), (char*)(s)))
85# define STRNCPY(t,s,n) (strncpy((char*)(t), (char*)(s), (size_t)(n)))
86# define STRCAT(t, s) (strcat((char*)(t), (char*)(s)))
87# define STRNCAT(t,s,n) (strncat((char*)(t), (char*)(s), (size_t)(n)))
88# define STRLEN(str) ((str)? strlen((char*)(str)):0)
89# define STREQ(a, b) (0 == strcmp((char *)(a), (char *)(b)))
90
91 typedef signed short SSHOR;
92 typedef short WORD;
93 typedef long DWORD;
1a6944fd 94
7e616b10
RR
95 typedef WORD WPARAM;
96 typedef DWORD LPARAM;
1a6944fd 97
7e616b10 98# endif /* OS2 */
1a6944fd 99
7e616b10 100# define SYSERR (-1)
1a6944fd 101
7e616b10
RR
102# ifndef NULL
103# define NULL ((void FAR*)0UL)
104# endif
1a6944fd
RR
105
106#endif