4.4BSD snapshot (revision 8.1); add 1993 to copyright
[unix-history] / usr / src / bin / sh / machdep.h
CommitLineData
c7a755e7 1/*-
d1b73048
KB
2 * Copyright (c) 1991, 1993
3 * The Regents of the University of California. All rights reserved.
c7a755e7
KB
4 *
5 * This code is derived from software contributed to Berkeley by
6 * Kenneth Almquist.
7 *
8 * %sccs.include.redist.c%
9 *
d1b73048 10 * @(#)machdep.h 8.1 (Berkeley) %G%
c7a755e7
KB
11 */
12
13/*
14 * Most machines require the value returned from malloc to be aligned
15 * in some way. The following macro will get this right on many machines.
16 */
17
18#ifndef ALIGN
19union align {
20 int i;
21 char *cp;
22};
23
24#define ALIGN(nbytes) ((nbytes) + sizeof(union align) - 1 &~ (sizeof(union align) - 1))
25#endif