blob: 52b1e8970b54889258c2240056947fdcb942a12e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
/* align.h - memory alignment requirements for linker */
/* Copyright (C) 1994 Bruce Evans */
#ifndef S_ALIGNMENT
# define align(x)
#else
#if defined(__STDC__) && defined(_POSIX_SOURCE)
# define align(x) ((x)=(void *) \
(((ssize_t)(x) + (S_ALIGNMENT-1)) & ~(S_ALIGNMENT-1)))
#else
# define align(x) ((x)=(void *) \
((char *)(x) + ((S_ALIGNMENT-(char)(x)) & (S_ALIGNMENT-1))))
#endif
#endif
|