Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
define CONTEXT_THREADS to 1
[simgrid.git] / src / win32 / compiler / select_compiler_features.h
1 #ifndef __XBT_SELECT_COMPILER_FEATURES_H__
2 #define __XBT_SELECT_COMPILER_FEATURES_H__
3
4
5 /* select_compiler_features.h - compiler features selection    */
6
7 /* Copyright (c) 2003, 2004 Cherier Malek. All rights reserved.            */
8
9 /* This program is free software; you can redistribute it and/or modify it
10  * under the terms of the license (GNU LGPL) which comes with this package. */
11
12 #define _XBT_COMPILER_RESOLVED         0
13
14
15 /* Borland compilers */
16 #if defined (__BORLANDC__)
17 #define _XBT_COMPILER_NAME      "Borland C/C++"
18         #define _XBT_COMPILER_VENDOR    "Inprise Corporation"
19 #define _XBT_BORLAND_COMPILER   2
20 /* version macro : __BORLANDC__ */
21 /* version format : ?           */
22 #define _XBT_COMPILER_VERSION           __BORLANDC__
23 #define _XBT_COMPILER_VERSION_FORMAT    "?"
24
25         #undef _XBT_COMPILER_RESOLVED
26         #define _XBT_COMPILER_RESOLVED 1
27 #endif
28
29 /* Microsoft Visual C++ compiler */
30 #if defined(_MSC_VER)
31 #define _XBT_VISUALC_COMPILER
32 #endif
33
34
35 /* GGG compilers */
36
37 #if defined(__GNUC__)
38 #if defined(__GNUC_PATCHLEVEL__)
39 #define __GNUC_VERSION__ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
40 #else
41 #define __GNUC_VERSION__ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100)
42 #endif
43
44 #define _XBT_COMPILER_NAME      "GCC"
45         #define _XBT_COMPILER_VENDOR    "GNU"
46 #define _XBT_GCC_COMPILER       2
47 /* version macro : __GNUC_VERSION__ */
48 /* version format : VVRRPP (VV = Version, RR = Revision, PP = Patch) */
49 #define _XBT_COMPILER_VERSION           __GNUC_VERSION__
50 #define _XBT_COMPILER_VERSION_FORMAT    "VVRRPP (VV = Version, RR = Revision, PP = Patch)"
51
52         #undef _XBT_COMPILER_RESOLVED
53         #define _XBT_COMPILER_RESOLVED 1
54 #endif
55
56
57
58
59 /* Returns the compiler name. */
60 #define _xbt_get_compiler_name()                _XBT_COMPILER_NAME
61
62 /* Returns the compiler vendor. */
63 #define _xbt_get_compiler_vendor()              _XBT_COMPILER_VENDOR
64
65 /* Returns 1 if the compiler is resolved (0 in the other case). */
66 #define _xbt_is_compiler_resolved()             _XBT_COMPILER_RESOLVED
67
68 /* Returns the compiler version. */
69 #define _xbt_get_compiler_version()              _XBT_STRINGIZE(_XBT_COMPILER_VERSION)
70
71 /* Returns the compiler version format. */
72 #define _xbt_get_compiler_version_format()      _XBT_COMPILER_VERSION_FORMAT
73
74
75
76 #endif /* #ifndef __XBT_SELECT_FEATURES_COMPILER_H__ */