1 #ifndef H_LinuxCommon
2 #define H_LinuxCommon
3 
4 #include <sys/types.h>
5 
6 /* Common typedefs for Linux */
7 
8 typedef unsigned char *			StringPtr;
9 typedef unsigned char			Boolean;
10 typedef char *				Ptr;
11 
12 typedef unsigned char			UInt8;
13 typedef UInt8*				PUInt8;
14 typedef signed char			SInt8;
15 typedef unsigned short			UInt16;
16 typedef signed short			SInt16;
17 typedef u_int32_t			UInt32;
18 typedef int32_t				SInt32;
19 //typedef unsigned long			UInt32;
20 //typedef signed long			SInt32;
21 typedef __S64_TYPE			SInt64;
22 typedef __U64_TYPE			UInt64;
23 typedef __S64_TYPE			int64_t;
24 typedef __U64_TYPE			uint64_t;
25 
26 //typedef unsigned long	ULONG;
27 //typedef void*			LPVOID;
28 //typedef	long			HRESULT;
29 //typedef	int32_t			HRESULT;
30 
31 typedef SInt16				OSErr;
32 
33 typedef unsigned long			FourCharCode;
34 typedef FourCharCode			OSType;
35 
36 typedef void IUnknown;
37 
38 #define FAILED(Status)		((HRESULT)(Status) < 0)
39 
40 /* dummy definitions - TODO: define these ... or not? */
41 
42 typedef int	FSSpec;
43 typedef int	CFURLRef;
44 typedef int	CFBundleRef;
45 typedef void*				Handle;   // needed by Python driver
46 
47 /* re-define MAC-only memory API to POSIX-compliant */
48 #define NewPtr		malloc	/* MAC */
49 #define DisposePtr	free	/* MAC */
50 
51 /* re-define WinDoze-only memory API to POSIX-compliant */
52 /* currently not used because we are using #ifdef __MAC__ */
53 
54 // #define CoTaskMemAlloc		malloc
55 // #define CoTaskMemFree		free
56 // #define CoTaskMemRealloc	realloc
57 
58 
59 #endif /* H_LinuxCommon */
60 
61