FreeBASIC  0.91.0
fb_config.h
Go to the documentation of this file.
1 #ifndef __FB_CONFIG_H__
2 #define __FB_CONFIG_H__
3 
4 #if defined HOST_XBOX
5 #elif defined __DJGPP__
6  #define HOST_DOS
7  #define HOST_DJGPP
8 #elif defined __MINGW32__ /* MinGW, MinGW-w64, TDM-GCC */
9  #define HOST_MINGW
10  #define HOST_WIN32
11  /* We prefer using non-oldnames functions, see also win32/fb_win32.h */
12  #define NO_OLDNAMES
13  #define _NO_OLDNAMES
14  /* Tell windows.h to omit many headers we don't need */
15  #define WIN32_LEAN_AND_MEAN
16 #elif defined __CYGWIN__
17  #define HOST_CYGWIN
18  #define HOST_WIN32
19  #define WIN32_LEAN_AND_MEAN
20 #elif defined __linux__
21  #define HOST_LINUX
22  #define HOST_UNIX
23 #elif defined __FreeBSD__
24  #define HOST_FREEBSD
25  #define HOST_UNIX
26 #elif defined __NetBSD__
27  #define HOST_NETBSD
28  #define HOST_UNIX
29 #elif defined __OpenBSD__
30  #define HOST_OPENBSD
31  #define HOST_UNIX
32 #elif defined __APPLE__
33  #define HOST_DARWIN
34  #define HOST_UNIX
35 #elif (defined sun || defined __sun) && defined __SVR4
36  #define HOST_SOLARIS
37  #define HOST_UNIX
38 #else
39  #error "Couldn't identify target system!"
40 #endif
41 
42 #ifdef HOST_UNIX
43  /* Map off_t/fopen/fseeko/etc. to their 64bit versions */
44  #define _FILE_OFFSET_BITS 64
45 #endif
46 
47 #if defined __i386__
48  #define HOST_X86
49 #elif defined __x86_64__
50  #define HOST_X86_64
51  #define HOST_64BIT
52 #elif defined __sparc__
53  #ifdef __LP64__
54  #define HOST_64BIT
55  #endif
56 #elif defined __ppc64__
57  #define HOST_64BIT
58 #endif
59 
60 #ifdef HOST_MINGW
61  /* work around gcc bug 52991 */
62  /* Since MinGW gcc 4.7, structs default to "ms_struct" instead of
63  "gcc_struct" as on Linux, and it seems like "packed" is broken in
64  combination with "ms_struct", so it's necessary to specify
65  "gcc_struct" explicitly. "gcc_struct" isn't recognized on all gcc
66  targets though, so we can't use it *all* the time. Thus we use it
67  only for MinGW (both 32bit and 64bit). */
68  #define FBPACKED __attribute__((gcc_struct, packed))
69 #else
70  #define FBPACKED __attribute__((packed))
71 #endif
72 
73 #endif