File: align.h

package info (click to toggle)
linux86 0.16.21-2
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,072 kB
  • sloc: ansic: 66,757; asm: 6,154; makefile: 1,374; sh: 703
file content (23 lines) | stat: -rw-r--r-- 410 bytes parent folder | download | duplicates (24)
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