Mercurial > hg > jgplsrc
comparison js.h @ 0:e0bbaa717f41 draft default tip
lol J
author | Jordi Gutiérrez Hermoso <jordigh@octave.org> |
---|---|
date | Mon, 25 Nov 2013 11:56:30 -0500 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:e0bbaa717f41 |
---|---|
1 /* Copyright 1990-2011, Jsoftware Inc. All rights reserved. */ | |
2 /* License in license.txt. */ | |
3 /* */ | |
4 /* SYS_ and friends */ | |
5 | |
6 #ifndef SYS /* only include once (dtoa.c) */ | |
7 | |
8 /* Inclusion of a system herein does not necessarily mean that the source */ | |
9 /* compiles or works under that system. */ | |
10 | |
11 #define SYS_AMIGA 1L /* DICE */ | |
12 #define SYS_ARCHIMEDES 2L | |
13 #define SYS_ATARIST 4L /* GCC */ | |
14 #define SYS_ATT3B1 8L /* System V C */ | |
15 #define SYS_DEC5500 16L /* GCC */ | |
16 #define SYS_IBMRS6000 32L /* AIX XL C */ | |
17 #define SYS_MACINTOSH 64L /* Think C */ | |
18 #define SYS_MIPS 128L /* GCC */ | |
19 #define SYS_NEXT 256L /* GCC */ | |
20 #define SYS_OS2 512L | |
21 #define SYS_PC 1024L /* Turbo C */ | |
22 #define SYS_PCWIN 2048L /* Watcom C 386 */ | |
23 #define SYS_PC386 4096L /* Watcom C 386 */ | |
24 #define SYS_SGI 8192L /* GCC */ | |
25 #define SYS_SUN3 16384L /* GCC */ | |
26 #define SYS_SUN4 32768L /* GCC */ | |
27 #define SYS_VAX 65536L /* GCC */ | |
28 #define SYS_HPUX 131072L /* C89 */ | |
29 #define SYS_LINUX 262144L /* GCC */ | |
30 #define SYS_FREEBSD 524288L /* x86 only */ | |
31 #define SYS_NETBSD 1048576L /* GCC */ | |
32 #define SYS_SUNSOL2 2097152L /* GCC */ | |
33 #define SYS_MACOSX 4194304L /* GCC (CC) */ | |
34 | |
35 #define SY_64 0 /* 64-bit systems */ | |
36 | |
37 #define SY_WIN32 0 /* any windows intel version */ | |
38 #define SY_WINCE 0 /* any windows ce versions */ | |
39 #define SY_LINUX 0 /* any linux intel version */ | |
40 #define SY_MAC 0 /* any macosx intel or powerpc version */ | |
41 #define SY_MACPPC 0 /* macosx powerpc */ | |
42 | |
43 #define SY_GETTOD 0 /* gettimeofday on unix */ | |
44 | |
45 #define SYS_DOS (SYS_PC + SYS_PC386 + SYS_PCWIN) | |
46 | |
47 #define SYS_UNIX (SYS_ATT3B1 + SYS_DEC5500 + SYS_IBMRS6000 + \ | |
48 SYS_MIPS + SYS_NEXT + SYS_SGI + SYS_SUN3 + \ | |
49 SYS_SUN4 + SYS_VAX + SYS_LINUX + SYS_MACOSX + \ | |
50 SYS_FREEBSD + SYS_NETBSD + SYS_SUNSOL2 + SYS_HPUX) | |
51 | |
52 #define SYS_ANSILIB (SYS_AMIGA + SYS_ARCHIMEDES + SYS_DOS + \ | |
53 SYS_MACINTOSH + SYS_OS2 + SYS_UNIX) | |
54 | |
55 #define SYS_SESM (SYS_ARCHIMEDES + SYS_DOS + SYS_MACINTOSH + \ | |
56 SYS_OS2 + SYS_UNIX) | |
57 | |
58 #define SYS_LILENDIAN (SYS_ARCHIMEDES + SYS_DEC5500 + SYS_DOS + \ | |
59 SYS_OS2 + SYS_LINUX + SYS_FREEBSD + \ | |
60 SYS_NETBSD) | |
61 | |
62 #if defined(__FreeBSD__) | |
63 #define SYS SYS_FREEBSD | |
64 #endif | |
65 | |
66 #if defined(__NetBSD__) | |
67 #define SYS SYS_NETBSD | |
68 #endif | |
69 | |
70 #if defined(sparc) && ! defined(__svr4__) | |
71 #define SYS SYS_SUN4 | |
72 #endif | |
73 | |
74 #if defined(sparc) && defined(__svr4__) | |
75 #define SYS SYS_SUNSOL2 | |
76 #endif | |
77 | |
78 #if defined(__sgi__) | |
79 #define SYS SYS_SGI | |
80 #endif | |
81 | |
82 #if defined (_AIX) | |
83 #define SYS SYS_IBMRS6000 | |
84 #endif | |
85 | |
86 #ifdef __linux__ | |
87 #define SYS SYS_LINUX | |
88 #undef SY_LINUX | |
89 #define SY_LINUX 1 | |
90 #endif | |
91 | |
92 #if defined _PA_RISC1_1 | |
93 #define SYS SYS_HPUX | |
94 #endif | |
95 | |
96 #ifdef __MACH__ | |
97 #ifdef __ppc__ | |
98 #ifdef __GNUC__ | |
99 #define SYS SYS_MACOSX // powerpc | |
100 #undef SY_MAC | |
101 #define SY_MAC 1 | |
102 #undef SY_MACPPC | |
103 #def SY_MACPPC 1 | |
104 #endif | |
105 #endif | |
106 #endif | |
107 | |
108 #ifdef __MACH__ | |
109 #ifndef __ppc__ | |
110 #ifdef __GNUC__ | |
111 #define SYS SYS_MACOSX // intel | |
112 #undef SY_MAC | |
113 #define SY_MAC 1 | |
114 #undef SYS_LILENDIAN | |
115 #define SYS_LILENDIAN SYS_MACOSX | |
116 | |
117 #endif | |
118 #endif | |
119 #endif | |
120 | |
121 | |
122 #ifdef _WIN32 | |
123 #define SYS SYS_PCWIN | |
124 #undef SY_WIN32 | |
125 #define SY_WIN32 1 | |
126 #endif | |
127 | |
128 #if SYS & SYS_UNIX | |
129 #undef SY_GETTOD | |
130 #define SY_GETTOD 1 | |
131 #endif | |
132 | |
133 #ifdef UNDER_CE | |
134 #undef SY_WINCE | |
135 #define SY_WINCE 1 | |
136 #endif | |
137 | |
138 #define SY_ALIGN (!(SY_WIN32 || SYS&SYS_LINUX) || SY_WINCE) | |
139 /* SY_ALIGN should be 1 for compilers requiring strict alignment */ | |
140 /* e.g. if (I*)av is not allowed for arbitrary av of type C* */ | |
141 | |
142 /* Windows CE target autoconfiguration: */ | |
143 #if SY_WINCE | |
144 #ifdef SH3 | |
145 #define SY_WINCE_SH 1 | |
146 #else | |
147 #define SY_WINCE_SH 0 | |
148 #endif | |
149 #ifdef MIPS | |
150 #define SY_WINCE_MIPS 1 | |
151 #else | |
152 #define SY_WINCE_MIPS 0 | |
153 #endif | |
154 #ifdef ARM | |
155 #define SY_WINCE_ARM 1 | |
156 #else | |
157 #define SY_WINCE_ARM 0 | |
158 #endif | |
159 #endif | |
160 | |
161 /* _WIN64 defined by VC++ and _UNIX64 defined in makefile */ | |
162 #if defined(_WIN64) || defined(_UNIX64) | |
163 #undef SY_64 | |
164 #define SY_64 1 | |
165 #endif | |
166 | |
167 #ifndef SYS /* must be defined */ | |
168 error: "SYS must be defined" | |
169 #endif | |
170 | |
171 #if 1!=SY_WIN32+SY_LINUX+SY_MAC | |
172 error: "one and only one of SY_WIN32, SY_LINUX, SY_MAC must be 1" | |
173 #endif | |
174 | |
175 #endif /* only include once */ | |
176 |