Logo AND Algorithmique Numérique Distribuée

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