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 | |
parent | 205cc1ef461d0c6996dc3757e52e229b5053274b (diff) |
- (stevesk) [defines.h] hp-ux 11 has ancillary data style fd passing, but
is missing CMSG_LEN() and CMSG_SPACE() macros.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | defines.h | 22 |
2 files changed, 24 insertions, 2 deletions
@@ -5,6 +5,8 @@ | |||
5 | - (stevesk) [monitor_fdpass.c] support for access rights style file | 5 | - (stevesk) [monitor_fdpass.c] support for access rights style file |
6 | descriptor passing | 6 | descriptor passing |
7 | - (stevesk) [auth2.c] merge cleanup/sync | 7 | - (stevesk) [auth2.c] merge cleanup/sync |
8 | - (stevesk) [defines.h] hp-ux 11 has ancillary data style fd passing, but | ||
9 | is missing CMSG_LEN() and CMSG_SPACE() macros. | ||
8 | 10 | ||
9 | 20020321 | 11 | 20020321 |
10 | - (bal) OpenBSD CVS Sync | 12 | - (bal) OpenBSD CVS Sync |
@@ -7999,4 +8001,4 @@ | |||
7999 | - Wrote replacements for strlcpy and mkdtemp | 8001 | - Wrote replacements for strlcpy and mkdtemp |
8000 | - Released 1.0pre1 | 8002 | - Released 1.0pre1 |
8001 | 8003 | ||
8002 | $Id: ChangeLog,v 1.1971 2002/03/22 20:43:05 stevesk Exp $ | 8004 | $Id: ChangeLog,v 1.1972 2002/03/22 20:53:32 stevesk Exp $ |
@@ -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 */ |