Skip to content

Commit

Permalink
- (stevesk) [defines.h] hp-ux 11 has ancillary data style fd passing…
Browse files Browse the repository at this point in the history
…, but

   is missing CMSG_LEN() and CMSG_SPACE() macros.
  • Loading branch information
Kevin Steves committed Mar 22, 2002
1 parent 205cc1e commit 219bef1
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
- (stevesk) [monitor_fdpass.c] support for access rights style file
descriptor passing
- (stevesk) [auth2.c] merge cleanup/sync
- (stevesk) [defines.h] hp-ux 11 has ancillary data style fd passing, but
is missing CMSG_LEN() and CMSG_SPACE() macros.

20020321
- (bal) OpenBSD CVS Sync
Expand Down Expand Up @@ -7999,4 +8001,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1

$Id: ChangeLog,v 1.1971 2002/03/22 20:43:05 stevesk Exp $
$Id: ChangeLog,v 1.1972 2002/03/22 20:53:32 stevesk Exp $
22 changes: 21 additions & 1 deletion defines.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef _DEFINES_H
#define _DEFINES_H

/* $Id: defines.h,v 1.82 2002/03/22 18:19:54 stevesk Exp $ */
/* $Id: defines.h,v 1.83 2002/03/22 20:53:32 stevesk Exp $ */

/* Necessary headers */

Expand Down Expand Up @@ -440,6 +440,26 @@ struct winsize {
# define howmany(x,y) (((x)+((y)-1))/(y))
#endif

#ifndef ALIGNBYTES
#define ALIGNBYTES (sizeof(int) - 1)
#endif
#ifndef ALIGN
#define ALIGN(p) (((u_int)(p) + ALIGNBYTES) &~ ALIGNBYTES)
#endif
#ifndef __CMSG_ALIGN
#define __CMSG_ALIGN(len) ALIGN(len)
#endif

/* Length of the contents of a control message of length len */
#ifndef CMSG_LEN
#define CMSG_LEN(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
#endif

/* Length of the space taken up by a padded control message of length len */
#ifndef CMSG_SPACE
#define CMSG_SPACE(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(len))
#endif

/* Function replacement / compatibility hacks */

/* In older versions of libpam, pam_strerror takes a single argument */
Expand Down

0 comments on commit 219bef1

Please sign in to comment.