6 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
9 Desc: Analyse the current kind of system and compiler.
16 #ifndef AROS_MACHINE_H
17 # include <aros/machine.h>
20 /**************************************
22 **************************************/
23 /* 1. Analyze system: Specify a definitive define for each system */
24 #if defined(_AMIGA) || defined(AMIGA)
25 # ifndef _AMIGA /* One define for each system */
31 * 2. Analyze compiler for STD C/C++.
33 * We test for the following:
34 * a. extern "C" linkage required for programs.
35 * b. inline, const, volatile, restrict keywords defined in
36 * newer C/C++ standards.
39 #if defined(__cplusplus)
40 # define EXTERN extern "C"
41 # define BEGIN_EXTERN extern "C" {
42 # define END_EXTERN };
44 # define EXTERN extern
49 #if defined(__STDC__) || defined(__cplusplus)
50 #define __const__ const
51 #define __inline__ inline
52 #define __volatile__ volatile
55 * C99 defines a new keyword restrict that can help do optimisation where
56 * pointers are used in programs. We'd like to support optimisation :-)
58 #if defined(__STDC__VERSION__) && __STDC__VERSION__ >= 199901L
59 #define __restrict__ restrict
76 /* 3. Macros for making things more efficient */
77 #if __GNUC__ < 2 || __GNUC__ == 2 && __GNUC_MINOR__ < 5
82 #if __GNUC__ == 2 && __GNUC_MINOR__ >= 5 && __GNUC_MINOR__ < 7
84 #define __noreturn __attribute__((__noreturn__))
85 #define __noeffect __attribute__((__const__))
87 #if __GNUC__ == 2 && __GNUC_MINOR__ >= 7
88 #define __unused __attribute__((__unused__))
89 #define __noreturn __attribute__((__noreturn__))
90 #define __noeffect __attribute__((__const__))
93 /* 4. Makros for debugging and development */
94 #if !defined(TEST) && !defined(DEBUG)
101 /* 5. Sytem-specific files */
103 # include <aros/amiga.h>
106 # include <aros/linux.h>
109 # include <aros/alpha.h>
112 # include <aros/freebsd.h>
115 # include <aros/netbsd.h>
118 # include <aros/cygwin.h>
121 /* 4. Calculated #defines */
122 #if !AROS_STACK_GROWS_DOWNWARDS
123 # define AROS_SLOWSTACKTAGS
124 # define AROS_SLOWSTACKMETHODS
125 #endif /* !AROS_STACK_GROWS_DOWNWARDS */
127 #endif /* AROS_SYSTEM_H */