acl  3.5.3.0
acl_define_unix.h
浏览该文件的文档.
1 #ifndef ACL_DEFINE_UNIX_INCLUDE_H
2 #define ACL_DEFINE_UNIX_INCLUDE_H
3 
4 #include "acl_define_linux.h"
5 #include "acl_define_sunx86.h"
6 #include "acl_define_bsd.h"
7 #include "acl_define_macosx.h"
8 
9 /* __FreeBSD_version version is major+minor */
10 
11 #if __FreeBSD_version >= 200000
12 # define HAS_DUPLEX_PIPE
13 #endif
14 
15 #ifdef __FreeBSD_kernel__
16 # define HAS_DUPLEX_PIPE
17 # define HAS_ISSETUGID
18 #endif
19 
20 #ifdef ACL_UNIX
21 /*
22 # include <errno.h>
23 */
24 
25 # ifndef PATH_SEP_C
26 # define PATH_SEP_C '/'
27 # endif
28 # ifndef PATH_SEP_S
29 # define PATH_SEP_S "/"
30 # endif
31 
32 /*
33 # include <pthread.h>
34 */
35 # define ACL_HAS_PTHREAD
36 
37 #endif /* ACL_UNIX */
38 
39 #ifdef ACL_UNIX
40 
41 # include <assert.h>
42 # include <sys/types.h>
43 # include <net/if.h>
44 # ifndef _GNU_SOURCE
45 # define _GNU_SOURCE
46 # include <netdb.h>
47 # undef _GNU_SOURCE
48 # endif
49 # ifndef acl_assert
50 # define acl_assert assert
51 # endif
52 
53 # define ACL_API
54 
55 # define ACL_ETIMEDOUT ETIMEDOUT
56 # define ACL_ENOMEM ENOMEM
57 # define ACL_EINVAL EINVAL
58 
59 # define ACL_ECONNREFUSED ECONNREFUSED
60 # define ACL_ECONNRESET ECONNRESET
61 # define ACL_EHOSTDOWN EHOSTDOWN
62 # define ACL_EHOSTUNREACH EHOSTUNREACH
63 # define ACL_EINTR EINTR
64 # define ACL_EAGAIN EAGAIN
65 # define ACL_ENETDOWN ENETDOWN
66 # define ACL_ENETUNREACH ENETUNREACH
67 # define ACL_ENOTCONN ENOTCONN
68 # define ACL_EISCONN EISCONN
69 # define ACL_EWOULDBLOCK EWOULDBLOCK
70 # define ACL_ENOBUFS ENOBUFS
71 # define ACL_ECONNABORTED ECONNABORTED
72 # define ACL_EINPROGRESS EINPROGRESS
73 # define ACL_EMFILE EMFILE
74 
75 # define ACL_SOCKET int
76 # define ACL_FILEFD int
77 # define ACL_SOCKET_INVALID (int) -1
78 # define ACL_FILE_HANDLE int
79 # define ACL_FILE_INVALID (int) -1
80 # define ACL_DLL_HANDLE void*
81 # define ACL_DLL_FARPROC void*
82 
83 # define acl_int64 long long int
84 # define acl_uint64 unsigned long long int
85 # define ACL_FMT_I64D "%lld"
86 # define ACL_FMT_I64U "%llu"
87 
88 # define ACL_PATH_BSHELL "/bin/sh"
89 
90 #endif /* ACL_UNIX */
91 
92 #endif