Check for SYS/GL during library init. Reason is that
[AROS.git] / rom / partition / arosmacros.h
blob030ff51e08b9dbd07c90ec85c61e80eabd647b40
1 #ifndef AROSMACROS_H
2 #define AROSMACROS_H
4 #ifdef __AMIGAOS__
5 # define A1 a1
6 # define A2 a2
7 # define D1 d1
8 /* lib macros */
9 # define AROS_LH1(r, n, arg1, bt, bn, bo, bnb) \
10 r ASM SAVEDS bnb##_##n(arg1, AROS_LHA(bt, bn, a6))
11 # define AROS_LH2(r, n, arg1, arg2, bt, bn, bo, bnb) \
12 r ASM SAVEDS bnb##_##n(arg1, arg2, AROS_LHA(bt, bn, a6))
13 # define AROS_LHA(t,n,r) REGPARAM(r,t,n)
14 # define AROS_LIBFUNC_INIT
15 # define AROS_LIBFUNC_EXIT
16 /* endian macros */
17 # define AROS_BE2LONG(x) x
18 # define AROS_LONG2BE(x) x
19 # define AROS_WORD2BE(x) x
20 # define AROS_WORD2LE(w) ((((w) >> 8) & 0x00FF) | (((w) & 0x00FF) << 8))
21 # define AROS_LONG2LE(l) \
22 ( \
23 ((((unsigned long)(l)) >> 24) & 0x000000FFUL) | \
24 ((((unsigned long)(l)) >> 8) & 0x0000FF00UL) | \
25 ((((unsigned long)(l)) << 8) & 0x00FF0000UL) | \
26 ((((unsigned long)(l)) << 24) & 0xFF000000UL) \
28 # define AROS_LE2WORD(w) AROS_WORD2LE(w)
29 # define AROS_LE2LONG(l) AROS_LONG2LE(l)
30 #else
31 # include <aros/macros.h>
32 #endif
34 #endif /* AROSMACROS_H */