Porting to OS/2: Case #20 CMSG_ALIGN, CMSG_SPACE and CMSG_LEN macros

OS/2 kLIBC has been missing some control message such as CMSG_ALIGN, CMSG_SPACE and CMSG_LEN macros until 0.6.6.

They should be like this,

1
2
3
4
#define CMSG_ALIGN( len ) _ALIGN( len )
#define CMSG_SPACE( len ) ( CMSG_ALIGN( sizeofstruct cmsghdr )) + \
                            CMSG_ALIGN( len ))
#define CMSG_LEN( len ) ( CMSG_ALIGN( sizeofstruct cmsghdr )) + ( len ))


Here, struct msghdr is in sys/socket.h.

See the following link for a detail.

댓글

이 블로그의 인기 게시물

토렌트: < 왕좌의 게임 > 시즌 1 ~ 시즌 8 완결편 마그넷

토렌트: NGC < 코스모스 > 우리말 더빙 전편(1편~13편) 마그넷

토렌트: < 스타워즈 > Ep.1 ~ Ep.6 마그넷