On 20/08/13 20:48, Chip Salzenberg wrote:
Well, I was going to get to asserts soon enough... but no. I meant e.g. NN_CMSG_FIRSTHDR, NN_CMSG_DATA, etc. The sort of thing that would have been a normal function except for efficiency concerns.
I see.Well, the ancillary data macros are there only for POSIX compliance. In reality, the only field returned in ancillary data is SP-level message header, so I guess the macros could be hugely simplified.
As for macro vs. function discussion, I've checked how the macros are implemented in Linux and done it in similar way. I guess the motivation was to make it as efficient as possible.
Martin