Wheefun I/O Library
0.0.5
Useful I/O Primitives.
include
wfio
host.h
Go to the documentation of this file.
1
/* WFIO - the Wheefun IO Library
2
Copyright (C) 2018 Phillip Kilgore
3
4
This program is free software: you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation, either version 3 of the License, or
7
(at your option) any later version.
8
9
This program 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
12
GNU General Public License for more details.
13
14
You should have received a copy of the GNU General Public License
15
along with this program. If not, see <https://www.gnu.org/licenses/>.
16
17
Additionally, you should have recieved a copy of the GNU Classpath
18
exception, which amends the license to generally permit linking against
19
the software provided herein.
20
*/
21
30
#ifndef WFIO_HOST_H
31
#define WFIO_HOST_H
32
33
#include <wfcnfo/compiler.h>
34
#include <wfcnfo/os.h>
35
36
/* Predeclaration for Doxygen */
37
38
#ifdef WFIO_DOXYGEN
39
#define WFIO_OS_UNIX
40
#define WFIO_OS_DOS
41
#define WFIO_OS_WIN16
42
#define WFIO_OS_WIN32
43
#define WFIO_OS_WIN64
44
#define WFIO_OS_WINDOWS
45
#define WFIO_OS_BEOS
46
#define WFIO_OS_HAIKU
47
48
#define WFIO_COMPILER_GCC
49
#define WFIO_COMPILER_MSVC
50
#define WFIO_COMPILER_DJGPP
51
52
#define WFIO_ARCH_8086
53
#define WFIO_ARCH_I286
54
#define WFIO_ARCH_I386
55
#define WFIO_ARCH_I486
56
#define WFIO_ARCH_I586
57
#define WFIO_ARCH_I686
58
#define WFIO_ARCH_AMD64
59
60
#define WFIO_ARCH_IA16
61
#define WFIO_ARCH_IA32
62
63
#define WFIO_ENDIAN_DEFINED
64
65
#endif
66
67
/* Do OS Detection */
68
88
#ifdef WFCNFO_OS_UNIX
89
#define WFIO_OS_UNIX
90
#endif
91
100
#ifdef WFCNFO_OS_DOS
101
#define WFIO_OS_DOS
102
#endif
103
111
#ifdef WFCNFO_OS_WIN16
112
#define WFIO_OS_WIN16
113
#endif
114
122
#ifdef WFCNFO_OS_WIN32
123
#define WFIO_OS_WIN32
124
#endif
125
133
#ifdef WFCNFO_OS_WIN64
134
#define WFIO_OS_WIN64
135
#endif
136
144
#if defined(WFIO_OS_WIN16) | defined(WFIO_OS_WIN32) | defined (WFIO_OS_WIN64)
145
#define WFIO_OS_WINDOWS
146
#endif
147
155
#ifdef WFCNFO_OS_BEOS
156
#define WFIO_OS_BEOS
157
#endif
158
165
#ifdef WFCNFO_OS_HAIKU
166
#define WFIO_OS_HAIKU
167
#endif
168
169
/* Do Compiler Detection */
170
179
#ifdef WFCNFO_COMPILER_GCC
180
#define WFIO_COMPILER_GCC
181
#endif
182
190
#ifdef WFCNFO_COMPILER_MSVC
191
#define WFIO_COMPILER_MSVC
192
#endif
193
201
#ifdef WFCNFO_COMPILER_DJGPP
202
#define WFIO_COMPILER_DJGPP
203
#endif
204
205
/* Do extended Architecture Detection */
206
214
#ifdef WFCNFO_ARCH_8086
215
#define WFIO_ARCH_8086
216
#endif
217
225
#ifdef WFCNFO_ARCH_I286
226
#define WFIO_ARCH_I286
227
#endif
228
236
#ifdef WFCNFO_ARCH_I386
237
#define WFIO_ARCH_I386
238
#endif
239
247
#ifdef WFCNFO_ARCH_I486
248
#define WFIO_ARCH_I486
249
#endif
250
258
#ifdef WFCNFO_ARCH_I586
259
#define WFIO_ARCH_I586
260
#endif
261
270
#ifdef WFCNFO_ARCH_I286
271
#define WFIO_ARCH_I286
272
#endif
273
278
#ifdef WFCNFO_ARCH_X86
279
#define WFIO_ARCH_X86
280
#endif
281
289
#ifdef WFCNFO_ARCH_IA16
290
#define WFIO_ARCH_IA16
291
#endif
292
300
#ifdef WFCNFO_ARCH_IA32
301
#define WFIO_ARCH_IA32
302
#endif
303
311
#ifdef WFCNFO_ARCH_AMD64
312
#define WFIO_ARCH_AMD64
313
#endif
314
315
316
/* Keywords */
317
346
/* DLL management should only be */
347
#ifdef WFIO_LINK_STATIC
348
/* Todo: update WFCNFO to include a static export keyword */
349
#define WFIO_EXPORT
350
#define WFIO_IMPORT
351
#else
352
#define WFIO_EXPORT WFCNFO_KW_DLLEXPORT
353
#define WFIO_IMPORT WFCNFO_KW_DLLIMPORT
354
#endif
355
376
/* Create a default definition for inline */
377
#define WFIO_INLINE WFCNFO_KW_CINLINE
378
394
#ifdef WFIO_BUILD_LIBRARY_
395
#define WFIO_DLL WFIO_EXPORT
396
#else
397
#define WFIO_DLL WFIO_IMPORT
398
#endif
399
400
#ifdef WFIO_BUILD_CXX_LIBRARY_
401
#define WFIO_CXX_DLL WFIO_EXPORT
402
#else
403
#define WFIO_CXX_DLL WFIO_IMPORT
404
#endif
405
419
#define WFIO_FASTCALL WFCNFO_KW_FASTCALL
420
425
#define WFIO_DLL_FASTCALL WFIO_DLL WFIO_FASTCALL
426
447
#define WFIO_ALWAYS_INLINE WFCNFO_ALWAYS_INLINE
448
453
#define WFIO_THREAD_LOCAL WFCNFO_KW_THREADLOCAL
454
465
#ifdef WFIO_DOXYGEN
466
#define WFIO_MAYBE_INLINE
467
#endif
468
477
#define WFIO_C_BEGIN WFCNFO_C_BEGIN
478
485
#define WFIO_C_END WFCNFO_C_END
486
487
#endif
Generated by
1.8.13