Subversion Repositories Programming Utils

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 rm5248 1
#ifndef PLATFORM_SWITCHER_H
2
#define PLATFORM_SWITCHER_H
3
 
4
/**
5
 *  This header is used to output correct macros for use in the code depending on if we are compiling for
6
 *  Linux/UNIX or Windows
7
 */
8
 
9
        #ifdef _WIN32
10
                //this is windows
11
                #define WINDOWS
12
                #ifdef _M_IX86
13
                        #define PLATFORM "x86"
14
                #endif /* _M_IX86 */
15
        #endif /* _WIN32 */
16
 
17
        #ifdef __unix
18
                #if defined( __i586 ) || defined( __i486 ) || defined( __i386 )
19
                        #define PLATFORM "x86"
20
                #endif /* x86 unix tests*/
21
        #endif /* __unix */
22
 
23
        #ifndef PLATFORM
24
                #define PLATFORM "Unknown"
25
        #endif /* PLATFORM */
26
 
27
#endif /* PLATFORM_SWITCHER_H */