Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add win32/compiler/borland.h for specific borland compiler config.
[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 /* GGG compilers */
30
31 #if defined(__GNUC__)
32 #if defined(__GNUC_PATCHLEVEL__)
33 #define __GNUC_VERSION__ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
34 #else
35 #define __GNUC_VERSION__ (__GNUC__ * 10000 + __GNUC_MINOR__ * 100)
36 #endif
37
38 #define _XBT_COMPILER_NAME      "GCC"
39         #define _XBT_COMPILER_VENDOR    "GNU"
40 #define _XBT_GCC_COMPILER       2
41 /* version macro : __GNUC_VERSION__ */
42 /* version format : VVRRPP (VV = Version, RR = Revision, PP = Patch) */
43 #define _XBT_COMPILER_VERSION           __GNUC_VERSION__
44 #define _XBT_COMPILER_VERSION_FORMAT    "VVRRPP (VV = Version, RR = Revision, PP = Patch)"
45
46         #undef _XBT_COMPILER_RESOLVED
47         #define _XBT_COMPILER_RESOLVED 1
48 #endif
49
50
51
52
53 /* Returns the compiler name. */
54 #define _xbt_get_compiler_name()                _XBT_COMPILER_NAME
55
56 /* Returns the compiler vendor. */
57 #define _xbt_get_compiler_vendor()              _XBT_COMPILER_VENDOR
58
59 /* Returns 1 if the compiler is resolved (0 in the other case). */
60 #define _xbt_is_compiler_resolved()             _XBT_COMPILER_RESOLVED
61
62 /* Returns the compiler version. */
63 #define _xbt_get_compiler_version()              _XBT_STRINGIZE(_XBT_COMPILER_VERSION)
64
65 /* Returns the compiler version format. */
66 #define _xbt_get_compiler_version_format()      _XBT_COMPILER_VERSION_FORMAT
67
68
69
70 #endif /* #ifndef __XBT_SELECT_FEATURES_COMPILER_H__ */