summaryrefslogtreecommitdiff
path: root/defines.h
diff options
context:
space:
mode:
Diffstat (limited to 'defines.h')
-rw-r--r--defines.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/defines.h b/defines.h
index e4e413638..a25cae102 100644
--- a/defines.h
+++ b/defines.h
@@ -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 */