1/* : : generated from /home/gisburn/ksh93/ast_ksh_20100309/build_sparc_64bit/src/lib/libast/features/align.c by iffe version 2009-12-04 : : */
2#ifndef _def_align_ast
3#define _def_align_ast	1
4#define _sys_types	1	/* #include <sys/types.h> ok */
5typedef unsigned long ALIGN_INTEGRAL;
6
7#define ALIGN_CHUNK		8192
8#define ALIGN_INTEGRAL		long
9#define ALIGN_INTEGER(x)	((ALIGN_INTEGRAL)(x))
10#define ALIGN_POINTER(x)	((char*)(x))
11#define ALIGN_ROUND(x,y)	ALIGN_POINTER(ALIGN_INTEGER((x)+(y)-1)&~((y)-1))
12
13#define ALIGN_BOUND		ALIGN_BOUND2
14#define ALIGN_ALIGN(x)		ALIGN_ALIGN2(x)
15#define ALIGN_TRUNC(x)		ALIGN_TRUNC2(x)
16
17#define ALIGN_BIT1		0x1
18#define ALIGN_BOUND1		ALIGN_BOUND2
19#define ALIGN_ALIGN1(x)		ALIGN_ALIGN2(x)
20#define ALIGN_TRUNC1(x)		ALIGN_TRUNC2(x)
21#define ALIGN_CLRBIT1(x)	ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffffffffffe)
22#define ALIGN_SETBIT1(x)	ALIGN_POINTER(ALIGN_INTEGER(x)|0x1)
23#define ALIGN_TSTBIT1(x)	ALIGN_POINTER(ALIGN_INTEGER(x)&0x1)
24
25#define ALIGN_BIT2		0x2
26#define ALIGN_BOUND2		16
27#define ALIGN_ALIGN2(x)		ALIGN_TRUNC2((x)+15)
28#define ALIGN_TRUNC2(x)		ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffffffffff0)
29#define ALIGN_CLRBIT2(x)	ALIGN_POINTER(ALIGN_INTEGER(x)&0xfffffffffffffffd)
30#define ALIGN_SETBIT2(x)	ALIGN_POINTER(ALIGN_INTEGER(x)|0x2)
31#define ALIGN_TSTBIT2(x)	ALIGN_POINTER(ALIGN_INTEGER(x)&0x2)
32
33#endif
34