Fix POST with streams to use chunked encoding, add http-put word
[factor/jcg.git] / vm / platform.h
blob21336e88bb334247baac661822152311db9a63cb
1 #if defined(__arm__)
2 #define FACTOR_ARM
3 #elif defined(__amd64__) || defined(__x86_64__)
4 #define FACTOR_AMD64
5 #elif defined(i386) || defined(__i386) || defined(__i386__) || defined(WIN32)
6 #define FACTOR_X86
7 #elif defined(__POWERPC__) || defined(__ppc__) || defined(_ARCH_PPC)
8 #define FACTOR_PPC
9 #else
10 #error "Unsupported architecture"
11 #endif
13 #if defined(WINDOWS)
14 #if defined(WINCE)
15 #include "os-windows-ce.h"
16 #else
17 #include "os-windows-nt.h"
18 #endif
20 #include "os-windows.h"
21 #if defined(FACTOR_AMD64)
22 #include "os-windows-nt.64.h"
23 #elif defined(FACTOR_X86)
24 #include "os-windows-nt.32.h"
25 #endif
26 #else
27 #include "os-unix.h"
29 #ifdef __APPLE__
30 #include "os-macosx.h"
31 #include "mach_signal.h"
33 #ifdef FACTOR_X86
34 #include "os-macosx-x86.32.h"
35 #elif defined(FACTOR_PPC)
36 #include "os-macosx-ppc.h"
37 #elif defined(FACTOR_AMD64)
38 #include "os-macosx-x86.64.h"
39 #else
40 #error "Unsupported Mac OS X flavor"
41 #endif
42 #else
43 #include "os-genunix.h"
45 #ifdef __FreeBSD__
46 #define FACTOR_OS_STRING "freebsd"
47 #include "os-freebsd.h"
49 #if defined(FACTOR_X86)
50 #include "os-freebsd-x86.32.h"
51 #elif defined(FACTOR_AMD64)
52 #include "os-freebsd-x86.64.h"
53 #else
54 #error "Unsupported FreeBSD flavor"
55 #endif
56 #elif defined(__OpenBSD__)
57 #define FACTOR_OS_STRING "openbsd"
59 #if defined(FACTOR_X86)
60 #include "os-openbsd-x86.32.h"
61 #elif defined(FACTOR_AMD64)
62 #include "os-openbsd-x86.64.h"
63 #else
64 #error "Unsupported OpenBSD flavor"
65 #endif
66 #elif defined(__NetBSD__)
67 #define FACTOR_OS_STRING "netbsd"
69 #if defined(FACTOR_X86)
70 #include "os-netbsd-x86.32.h"
71 #elif defined(FACTOR_AMD64)
72 #include "os-netbsd-x86.64.h"
73 #else
74 #error "Unsupported NetBSD flavor"
75 #endif
77 #include "os-netbsd.h"
78 #elif defined(linux)
79 #define FACTOR_OS_STRING "linux"
80 #include "os-linux.h"
82 #if defined(FACTOR_X86)
83 #include "os-linux-x86.32.h"
84 #elif defined(FACTOR_PPC)
85 #include "os-linux-ppc.h"
86 #elif defined(FACTOR_ARM)
87 #include "os-linux-arm.h"
88 #elif defined(FACTOR_AMD64)
89 #include "os-linux-x86.64.h"
90 #else
91 #error "Unsupported Linux flavor"
92 #endif
93 #elif defined(__SVR4) && defined(sun)
94 #define FACTOR_OS_STRING "solaris"
96 #if defined(FACTOR_X86)
97 #include "os-solaris-x86.32.h"
98 #elif defined(FACTOR_AMD64)
99 #incluide "os-solaris-x86.64.h"
100 #else
101 #error "Unsupported Solaris flavor"
102 #endif
104 #else
105 #error "Unsupported OS"
106 #endif
107 #endif
108 #endif
110 #if defined(FACTOR_X86)
111 #include "cpu-x86.32.h"
112 #include "cpu-x86.h"
113 #elif defined(FACTOR_AMD64)
114 #include "cpu-x86.64.h"
115 #include "cpu-x86.h"
116 #elif defined(FACTOR_PPC)
117 #include "cpu-ppc.h"
118 #elif defined(FACTOR_ARM)
119 #include "cpu-arm.h"
120 #else
121 #error "Unsupported CPU"
122 #endif