FreeTDS API: include/tds_sysdep_public.h Source File

FreeTDS API

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
tds_sysdep_public.h
1 /* FreeTDS - Library of routines accessing Sybase and Microsoft databases
2 * Copyright (C) 1998-2011 Brian Bruns
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
18 */
19
20 #ifndef _tds_sysdep_public_h_
21 #define _tds_sysdep_public_h_
22
23 /*
24 ** This is where platform-specific changes need to be made.
25 */
26 #if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
27 #include <winsock2.h>
28 #include <ws2tcpip.h>
29 #include <windows.h>
30 #define tds_sysdep_int16_type short /* 16-bit int */
31 #define tds_sysdep_int32_type int /* 32-bit int */
32 #define tds_sysdep_int64_type __int64 /* 64-bit int */
33 #define tds_sysdep_real32_type float /* 32-bit real */
34 #define tds_sysdep_real64_type double /* 64-bit real */
35 #if !defined(WIN64) && !defined(_WIN64)
36 #define tds_sysdep_intptr_type int /* 32-bit int */
37 #else
38 #define tds_sysdep_intptr_type __int64 /* 64-bit int */
39 #endif
40 #endif /* defined(WIN32) || defined(_WIN32) || defined(__WIN32__) */
41
42 #ifndef tds_sysdep_int16_type
43 #define tds_sysdep_int16_type short /* 16-bit int */
44 #endif /* !tds_sysdep_int16_type */
45
46 #ifndef tds_sysdep_int32_type
47 #define tds_sysdep_int32_type int /* 32-bit int */
48 #endif /* !tds_sysdep_int32_type */
49
50 #ifndef tds_sysdep_int64_type
51 #define tds_sysdep_int64_type long /* 64-bit int */
52 #endif /* !tds_sysdep_int64_type */
53
54 #ifndef tds_sysdep_real32_type
55 #define tds_sysdep_real32_type float /* 32-bit real */
56 #endif /* !tds_sysdep_real32_type */
57
58 #ifndef tds_sysdep_real64_type
59 #define tds_sysdep_real64_type double /* 64-bit real */
60 #endif /* !tds_sysdep_real64_type */
61
62 #ifndef tds_sysdep_intptr_type
63 #define tds_sysdep_intptr_type long
64 #endif /* !tds_sysdep_intptr_type */
65
66 #if !defined(MSDBLIB) && !defined(SYBDBLIB)
67 #define SYBDBLIB 1
68 #endif
69 #if defined(MSDBLIB) && defined(SYBDBLIB)
70 #error MSDBLIB and SYBDBLIB cannot both be defined
71 #endif
72
73 #endif /* _tds_sysdep_public_h_ */