-
Notifications
You must be signed in to change notification settings - Fork 0
/
compilers.h
120 lines (90 loc) · 1.38 KB
/
compilers.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#ifndef COMPILERS_H
#define COMPILERS_H
/*
* Compilers compatibility
* -----------------------
*
* Version 1.1
*
* Currently supported compilers:
* - SAS/C (68k)
* - GCC (PPC. 68k is not supported yet)
*
* $Id: compilers.h,v 1.1 2002/11/08 03:57:58 zapek Exp $
*/
/*
* Please use ONLY the following defines in your code:
*
* ASM
* SAVEDS
* __far (exception.. libjpeg forces us to do so)
* __chip (exception as well)
* STDARGS
* __reg(__a0, LONG blah)
*
*/
/*
* GCC
*/
#ifdef __GNUC__
/* PPC (MorphOS) */
#ifdef __MORPHOS__
#ifndef ASM
#define ASM
#endif
#ifndef __far
#define __far
#endif
#ifndef SAVEDS
#define SAVEDS
#endif
#ifndef STDARGS
#define STDARGS
#endif
#ifndef __chip
#define __chip
#endif
#ifndef __reg
#define __reg(x,y) y
#endif
#else /* !__MORPHOS__ */
/* 68k */
#ifndef ASM
#define ASM
#endif
#ifndef __far
#define __far
#endif
#ifndef SAVEDS
#define SAVEDS
#endif
#ifndef STDARGS
#define STDARGS
#endif
#ifndef __chip
#define __chip
#endif
#ifndef __reg
#define __reg(x,y) y __asm__(#x)
#endif
#endif /* !__MORPHOS__ */
#endif /* __GNUC__ */
/*
* SAS/C
*/
#ifdef __SASC
#ifndef ASM
#define ASM __asm
#endif
/* __far is already built in */
#ifndef SAVEDS
#define SAVEDS __saveds
#endif
#ifndef STDARGS
#define STDARGS __stdargs
#endif
#ifndef __reg
#define __reg(x,y) register __ ## x y
#endif
#endif /* __SASC */
#endif /* COMPILERS_H */