cmsg.h

00001 #ifndef BGLIBS__NET__CMSG__H__
00002 #define BGLIBS__NET__CMSG__H__
00003 
00004 #ifdef SOLARIS
00005 #define _XOPEN_SOURCE 500
00006 #endif
00007 
00008 #include <sys/socket.h>
00009 
00010 #ifndef MSG_NOSIGNAL
00011 #define MSG_NOSIGNAL 0
00012 #endif
00013 
00014 #ifndef CMSG_ALIGN
00015 #define CMSG_ALIGN(len) (((len) + sizeof (size_t) - 1) \
00016                          & (size_t) ~(sizeof (size_t) - 1))
00017 #endif
00018 
00019 #ifndef CMSG_SPACE
00020 #define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len))
00021 #endif
00022 
00023 #ifndef CMSG_LEN
00024 #define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
00025 #endif
00026 
00027 #endif

Generated on Thu Feb 19 11:11:50 2009 for bglibs by  doxygen 1.5.4