bglibs: cmsg.h Source File

- Main Page
- Modules
- Data Structures
- Files
- Directories
- Related Pages
- Examples

# cmsg.h

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