acl  3.5.3.0
acl_transfer_fd.h
浏览该文件的文档.
1 #ifndef ACL_TRANSFER_FD_INCLUDE_H
2 #define ACL_TRANSFER_FD_INCLUDE_H
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 #include "../acl_define.h"
9 
10 #if defined(ACL_UNIX)
11 
12 #include <sys/types.h>
13 #include <sys/socket.h>
14 
15 #ifdef SUNOS5
16 #undef HAVE_MSGHDR_MSG_CONTROL
17 #else
18 #define HAVE_MSGHDR_MSG_CONTROL
19 #endif
20 
21 #ifndef CMSG_LEN
22 #define CMSG_LEN(size) (sizeof(struct cmsghdr) + (size))
23 #endif
24 
25 #ifndef CMSG_SPACE
26 #define CMSG_SPACE(size) (sizeof(struct cmsghdr) + (size))
27 #endif
28 
29 int acl_read_fd(int fd, void *ptr, int nbytes, int *recv_fd);
30 int acl_write_fd(int fd, void *ptr, int nbytes, int send_fd);
31 
32 #endif /* ACL_UNIX */
33 
34 #ifdef __cplusplus
35 }
36 #endif
37 
38 #endif
39