]> git.saurik.com Git - wxWidgets.git/blame - src/iodbc/config.h
Unicode fixes.
[wxWidgets.git] / src / iodbc / config.h
CommitLineData
cd5bf2a6
RR
1/*
2 *
3 * config.h
4 *
5 * $Id$
6 *
7 * Configuration
8 *
9 * The iODBC driver manager.
10 *
11 * Copyright (C) 1995 by Ke Jin <kejin@empress.com>
12 *
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.
17 *
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.
22 *
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.
26 */
27#ifndef _CONFIG_H
28#define _CONFIG_H
29
30#if !defined(WINDOWS) && !defined(WIN32_SYSTEM)
31#define _UNIX_
32
33#include "wx/setup.h"
34
35#include <stdlib.h>
36#include <sys/types.h>
37#include <string.h>
38#include <stdio.h>
39
40#define MEM_ALLOC(size) (malloc((size_t)(size)))
41#define MEM_FREE(ptr) {if(ptr) free(ptr);}
42
43#define STRCPY(t, s) (strcpy((char*)(t), (char*)(s)))
44#define STRNCPY(t,s,n) (strncpy((char*)(t), (char*)(s), (size_t)(n)))
45#define STRCAT(t, s) (strcat((char*)(t), (char*)(s)))
46#define STRNCAT(t,s,n) (strncat((char*)(t), (char*)(s), (size_t)(n)))
47#define STREQ(a, b) (strcmp((char*)(a), (char*)(b)) == 0)
48#define STRLEN(str) ((str)? strlen((char*)(str)):0)
49
50#define EXPORT
51#define CALLBACK
52#define FAR
53
54typedef signed short SSHOR;
55typedef short WORD;
56typedef long DWORD;
57
58typedef WORD WPARAM;
59typedef DWORD LPARAM;
60typedef int BOOL;
61#endif /* _UNIX_ */
62
63#if defined(WINDOWS) || defined(WIN32_SYSTEM)
64#include <windows.h>
65#include <windowsx.h>
66
67#ifdef _MSVC_
68#define MEM_ALLOC(size) (fmalloc((size_t)(size)))
69#define MEM_FREE(ptr) ((ptr)? ffree((PTR)(ptr)):0))
70#define STRCPY(t, s) (fstrcpy((char FAR*)(t), (char FAR*)(s)))
71#define STRNCPY(t,s,n) (fstrncpy((char FAR*)(t), (char FAR*)(s), (size_t)(n)))
72#define STRLEN(str) ((str)? fstrlen((char FAR*)(str)):0)
73#define STREQ(a, b) (fstrcmp((char FAR*)(a), (char FAR*)(b) == 0)
6d5977df 74#endif
7e616b10 75
cd5bf2a6
RR
76#ifdef _BORLAND_
77#define MEM_ALLOC(size) (farmalloc((unsigned long)(size))
78#define MEM_FREE(ptr) ((ptr)? farfree((void far*)(ptr)):0)
79#define STRCPY(t, s) (_fstrcpy((char FAR*)(t), (char FAR*)(s)))
80#define STRNCPY(t,s,n) (_fstrncpy((char FAR*)(t), (char FAR*)(s), (size_t)(n)))
81#define STRLEN(str) ((str)? _fstrlen((char FAR*)(str)):0)
82#define STREQ(a, b) (_fstrcmp((char FAR*)(a), (char FAR*)(b) == 0)
83#endif
1a6944fd 84
cd5bf2a6 85#endif /* WINDOWS */
1a6944fd 86
cd5bf2a6 87#define SYSERR (-1)
1a6944fd 88
cd5bf2a6
RR
89#ifndef NULL
90#define NULL ((void FAR*)0UL)
91#endif
1a6944fd
RR
92
93#endif