[BACK]Return to socket.h CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / sys

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/sys/sys/socket.h between version 1.112 and 1.113

version 1.112, 2015/01/20 01:02:25 version 1.113, 2015/01/20 01:10:16
Line 528  struct cmsghdr {
Line 528  struct cmsghdr {
   
 /* given pointer to struct cmsghdr, return pointer to data */  /* given pointer to struct cmsghdr, return pointer to data */
 #define CMSG_DATA(cmsg) \  #define CMSG_DATA(cmsg) \
         ((u_char *)(void *)(cmsg) + __CMSG_ALIGN(sizeof(struct cmsghdr)))      ((void *)((u_char *)(void *)(cmsg) + \
       __CMSG_ALIGN(sizeof(struct cmsghdr))))
 #define CCMSG_DATA(cmsg) \  #define CCMSG_DATA(cmsg) \
         ((const u_char *)(const void *)(cmsg) + \      ((const void *)((const u_char *)(const void *)(cmsg) + \
         __CMSG_ALIGN(sizeof(struct cmsghdr)))      __CMSG_ALIGN(sizeof(struct cmsghdr))))
   
 /*  /*
  * Alignment requirement for CMSG struct manipulation.   * Alignment requirement for CMSG struct manipulation.
Line 549  struct cmsghdr {
Line 550  struct cmsghdr {
   
 /* given pointer to struct cmsghdr, return pointer to next cmsghdr */  /* given pointer to struct cmsghdr, return pointer to next cmsghdr */
 #define CMSG_NXTHDR(mhdr, cmsg) \  #define CMSG_NXTHDR(mhdr, cmsg) \
         (((char *)(cmsg) + __CMSG_ALIGN((cmsg)->cmsg_len) + \          (((char *)(void *)(cmsg) + __CMSG_ALIGN((cmsg)->cmsg_len) + \
                             __CMSG_ALIGN(sizeof(struct cmsghdr)) > \                              __CMSG_ALIGN(sizeof(struct cmsghdr)) > \
             (((char *)(mhdr)->msg_control) + (mhdr)->msg_controllen)) ? \              (((char *)(void *)(mhdr)->msg_control) + (mhdr)->msg_controllen)) ?\
             (struct cmsghdr *)0 : \              (struct cmsghdr *)0 : \
             (struct cmsghdr *)(void *)((char *)(cmsg) + \              (struct cmsghdr *)(void *)((char *)(void *)(cmsg) + \
                 __CMSG_ALIGN((cmsg)->cmsg_len)))                  __CMSG_ALIGN((cmsg)->cmsg_len)))
   
 /*  /*
Line 562  struct cmsghdr {
Line 563  struct cmsghdr {
  */   */
 #define CMSG_FIRSTHDR(mhdr) \  #define CMSG_FIRSTHDR(mhdr) \
         ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \          ((mhdr)->msg_controllen >= sizeof(struct cmsghdr) ? \
          (struct cmsghdr *)(mhdr)->msg_control : \           (struct cmsghdr *)(void *)(mhdr)->msg_control : \
          (struct cmsghdr *)0)           (struct cmsghdr *)0)
   
 #define CMSG_SPACE(l)   (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(l))  #define CMSG_SPACE(l)   (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(l))

Legend:
Removed from v.1.112  
changed lines
  Added in v.1.113

CVSweb <webmaster@jp.NetBSD.org>