diff options
author | Kevin Steves <stevesk@pobox.com> | 2002-03-22 20:53:32 +0000 |
---|---|---|
committer | Kevin Steves <stevesk@pobox.com> | 2002-03-22 20:53:32 +0000 |
commit | 219bef12c6fcfd0542d261c463eae0124efad93a (patch) | |
tree | 3446c83d7b2c243557447fc6066111b8cdb2fe07 /defines.h | |
parent | 205cc1ef461d0c6996dc3757e52e229b5053274b (diff) |
- (stevesk) [defines.h] hp-ux 11 has ancillary data style fd passing, but
is missing CMSG_LEN() and CMSG_SPACE() macros.
Diffstat (limited to 'defines.h')
-rw-r--r-- | defines.h | 22 |
1 files changed, 21 insertions, 1 deletions
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _DEFINES_H | 1 | #ifndef _DEFINES_H |
2 | #define _DEFINES_H | 2 | #define _DEFINES_H |
3 | 3 | ||
4 | /* $Id: defines.h,v 1.82 2002/03/22 18:19:54 stevesk Exp $ */ | 4 | /* $Id: defines.h,v 1.83 2002/03/22 20:53:32 stevesk Exp $ */ |
5 | 5 | ||
6 | /* Necessary headers */ | 6 | /* Necessary headers */ |
7 | 7 | ||
@@ -440,6 +440,26 @@ struct winsize { | |||
440 | # define howmany(x,y) (((x)+((y)-1))/(y)) | 440 | # define howmany(x,y) (((x)+((y)-1))/(y)) |
441 | #endif | 441 | #endif |
442 | 442 | ||
443 | #ifndef ALIGNBYTES | ||
444 | #define ALIGNBYTES (sizeof(int) - 1) | ||
445 | #endif | ||
446 | #ifndef ALIGN | ||
447 | #define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES) | ||
448 | #endif | ||
449 | #ifndef __CMSG_ALIGN | ||
450 | #define __CMSG_ALIGN(len) ALIGN(len) | ||
451 | #endif | ||
452 | |||
453 | /* Length of the contents of a control message of length len */ | ||
454 | #ifndef CMSG_LEN | ||
455 | #define CMSG_LEN(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + (len)) | ||
456 | #endif | ||
457 | |||
458 | /* Length of the space taken up by a padded control message of length len */ | ||
459 | #ifndef CMSG_SPACE | ||
460 | #define CMSG_SPACE(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(len)) | ||
461 | #endif | ||
462 | |||
443 | /* Function replacement / compatibility hacks */ | 463 | /* Function replacement / compatibility hacks */ |
444 | 464 | ||
445 | /* In older versions of libpam, pam_strerror takes a single argument */ | 465 | /* In older versions of libpam, pam_strerror takes a single argument */ |