1 /*
2 ** Note that Microsoft's own header files won't compile without
3 ** "language extensions" (anonymous structs/unions) turned on.
4 ** And even with that, it still gives a warning in rpcasync.h:
5 **    warning C4115: '_RPC_ASYNC_STATE' : named type definition in parentheses
6 ** It compiles clean in C++.  Oy vey.  So I turned off the warning. --lch
7 */
8 #pragma warning(disable: 4115)
9 #include <windows.h>
10 #pragma warning(default: 4115)
11 #include <direct.h>
12 
13 #define FICL_WANT_PLATFORM (1)
14 
15 #define FICL_PLATFORM_OS             "Win32"
16 #define FICL_PLATFORM_ARCHITECTURE   "x86"
17 
18 #define FICL_PLATFORM_BASIC_TYPES    (1)
19 #define FICL_PLATFORM_ALIGNMENT      (4)
20 #define FICL_PLATFORM_INLINE	     __inline
21 
22 #define FICL_PLATFORM_HAS_2INTEGER   (1)
23 #define FICL_PLATFORM_HAS_FTRUNCATE  (1)
24 
25 #define fstat       _fstat
26 #define stat        _stat
27 #define getcwd      _getcwd
28 #define chdir       _chdir
29 #define fileno      _fileno
30 
31 
32 extern int ftruncate(int fileno, size_t size);
33 
34 typedef char ficlInteger8;
35 typedef unsigned char ficlUnsigned8;
36 typedef short ficlInteger16;
37 typedef unsigned short ficlUnsigned16;
38 typedef long ficlInteger32;
39 typedef unsigned long ficlUnsigned32;
40 typedef __int64 ficlInteger64;
41 typedef unsigned __int64 ficlUnsigned64;
42 
43 typedef ficlInteger32 ficlInteger;
44 typedef ficlUnsigned32 ficlUnsigned;
45 typedef float ficlFloat;
46 
47 typedef ficlInteger64 ficl2Integer;
48 typedef ficlUnsigned64 ficl2Unsigned;
49 
50 
51 #define FICL_MULTICALL_CALLTYPE_FUNCTION        (0)
52 #define FICL_MULTICALL_CALLTYPE_METHOD          (1)
53 #define FICL_MULTICALL_CALLTYPE_VIRTUAL_METHOD	(2)
54 #define FICL_MULTICALL_GET_CALLTYPE(flags)      ((flags) & 0x0f)
55 
56 #define FICL_MULTICALL_RETURNTYPE_VOID          (0)
57 #define FICL_MULTICALL_RETURNTYPE_INTEGER       (16)
58 #define FICL_MULTICALL_RETURNTYPE_CSTRING       (32)
59 #define FICL_MULTICALL_RETURNTYPE_FLOAT         (48)
60 #define FICL_MULTICALL_GET_RETURNTYPE(flags)    ((flags) & 0xf0)
61 
62 #define FICL_MULTICALL_REVERSE_ARGUMENTS        (1<<8)
63 #define FICL_MULTICALL_EXPLICIT_VTABLE          (1<<9) /* the vtable is specified on the stack */
64 
65