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