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

/* Copyright (C) 1992 Bruce Evans */

#ifndef S_ALIGNMENT
# define align(x) (x)
#else
# if defined(__STDC__) && defined(_POSIX_SOURCE)
#  define align(x) (((ssize_t) (x) + (S_ALIGNMENT-1)) & ~(S_ALIGNMENT-1))
# else
#  define align(x) ((char *) (x) + (- (char) (x) & (S_ALIGNMENT-1)))
# endif
#endif

extern uoffset_T alignmask;	/* general alignment mask */