summaryrefslogtreecommitdiff
path: root/bcc/align.h
blob: 3c8971b93e2c65bded006f35faafe87f024f6ec6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* align.h - memory alignment requirements for bcc */

/* Copyright (C) 1992 Bruce Evans */

#ifndef S_ALIGNMENT
# define align(x) (x)
#else
# ifdef UNPORTABLE_ALIGNMENT
typedef unsigned pointerint_t;
#  define align(x) (((pointerint_t) (x) + (S_ALIGNMENT-1)) & ~(S_ALIGNMENT-1))
# else
#  define align(x) ((char *) (x) + (- (int) (x) & (S_ALIGNMENT-1)))
# endif
#endif

extern uoffset_t alignmask;	/* general alignment mask */