1 /* @(#)align.h 1.11 13/07/23 Copyright 1995-2013 J. Schilling */
3 * Platform dependent definitions for aligning data.
5 * Copyright (c) 1995-2013 J. Schilling
8 * The contents of this file are subject to the terms of the
9 * Common Development and Distribution License, Version 1.0 only
10 * (the "License"). You may not use this file except in compliance
13 * See the file CDDL.Schily.txt in this distribution for details.
14 * A copy of the CDDL is also available via the Internet at
15 * http://www.opensource.org/licenses/cddl1.txt
17 * When distributing Covered Code, include this CDDL HEADER in each
18 * file and include the License file CDDL.Schily.txt from this distribution.
22 * The automatically created included file defines the following macros:
24 * saligned(a) One parameter aligned for a "short int"
25 * s2aligned(a, b) Both parameters aligned for a "short int"
26 * ialigned(a) One parameter aligned for a "int"
27 * i2aligned(a, b) Both parameters aligned for a "int"
28 * laligned(a) One parameter aligned for a "long"
29 * l2aligned(a, b) Both parameters aligned for a "long"
30 * llaligned(a) One parameter aligned for a "long long"
31 * ll2aligned(a, b) Both parameters aligned for a "long long"
32 * faligned(a) One parameter aligned for a "float"
33 * f2aligned(a, b) Both parameters aligned for a "float"
34 * daligned(a) One parameter aligned for a "double"
35 * d2aligned(a, b) Both parameters aligned for a "double"
36 * paligned(a) One parameter aligned for a "pointer"
37 * p2aligned(a, b) Both parameters aligned for a "pointe"
39 * salign(x) Align for a "short int"
40 * ialign(x) Align for a "int"
41 * lalign(x) Align for a "long"
42 * llalign(x) Align for a "long long"
43 * falign(x) Align for a "float"
44 * dalign(x) Align for a "double"
45 * palign(x) Align for a "pointer"
47 #ifndef _SCHILY_ALIGN_H
48 #define _SCHILY_ALIGN_H
50 #ifndef _SCHILY_MCONFIG_H
51 #include <schily/mconfig.h>
54 #ifndef _SCHILY_UTYPES_H
55 #include <schily/utypes.h>
58 #ifdef SCHILY_BUILD /* #defined by Schily makefile system */
60 * Include $(SRCROOT)/incs/$(OARCH)/align.h via
61 * -I$(SRCROOT)/incs/$(OARCH)/
64 #else /* !SCHILY_BUILD */
66 * The stuff for static compilation. Include files from a previous
67 * dynamic autoconfiguration.
69 #ifdef __SUNOS5_SPARC_CC32
70 #include <schily/sparc-sunos5-cc/align.h>
71 #define __JS_ARCH_ALIGN_INCL
73 #ifdef __SUNOS5_SPARC_CC64
74 #include <schily/sparc-sunos5-cc64/align.h>
75 #define __JS_ARCH_ALIGN_INCL
77 #ifdef __SUNOS5_SPARC_GCC32
78 #include <schily/sparc-sunos5-gcc/align.h>
79 #define __JS_ARCH_ALIGN_INCL
81 #ifdef __SUNOS5_SPARC_GCC64
82 #include <schily/sparc-sunos5-gcc64/align.h>
83 #define __JS_ARCH_ALIGN_INCL
85 #ifdef __SUNOS5_X86_CC32
86 #include <schily/i386-sunos5-cc/align.h>
87 #define __JS_ARCH_ALIGN_INCL
89 #ifdef __SUNOS5_X86_CC64
90 #include <schily/i386-sunos5-cc64/align.h>
91 #define __JS_ARCH_ALIGN_INCL
93 #ifdef __SUNOS5_X86_GCC32
94 #include <schily/i386-sunos5-gcc/align.h>
95 #define __JS_ARCH_ALIGN_INCL
97 #ifdef __SUNOS5_X86_GCC64
98 #include <schily/i386-sunos5-gcc64/align.h>
99 #define __JS_ARCH_ALIGN_INCL
102 #ifdef __HPUX_HPPA_CC32
103 #include <schily/hppa-hp-ux-cc/align.h>
104 #define __JS_ARCH_CONF_INCL
106 #ifdef __HPUX_HPPA_CC64
107 #include <schily/hppa-hp-ux-cc64/align.h>
108 #define __JS_ARCH_CONF_INCL
110 #ifdef __HPUX_HPPA_GCC32
111 #include <schily/hppa-hp-ux-gcc/align.h>
112 #define __JS_ARCH_CONF_INCL
114 #ifdef __HPUX_HPPA_GCC64
115 #include <schily/hppa-hp-ux-gcc64/align.h>
116 #define __JS_ARCH_CONF_INCL
119 #ifdef __LINUX_ARMV6L_GCC32
120 #include <schily/armv6l-linux-gcc/align.h>
121 #define __JS_ARCH_CONF_INCL
123 #ifdef __LINUX_ARMV5L_GCC32
124 #include <schily/armv6l-linux-gcc/align.h>
125 #define __JS_ARCH_CONF_INCL
127 #ifdef __LINUX_ARMV5TEJL_GCC32
128 #include <schily/armv5tejl-linux-gcc/align.h>
129 #define __JS_ARCH_CONF_INCL
131 #ifdef __LINUX_I386_GCC32
132 #include <schily/i686-linux-gcc/align.h>
133 #define __JS_ARCH_CONF_INCL
135 #ifdef __LINUX_amd64_GCC64
136 #include <schily/x86_64-linux-gcc/align.h>
137 #define __JS_ARCH_CONF_INCL
140 #ifdef __MSWIN_X86_CL32
141 #include <schily/i686-cygwin32_nt-cl/align.h>
142 #define __JS_ARCH_ALIGN_INCL
145 #ifdef __CYGWIN_X86_GCC
146 #include <schily/i686-cygwin32_nt-gcc/align.h>
147 #define __JS_ARCH_ALIGN_INCL
150 #ifndef __JS_ARCH_ALIGN_INCL
152 * #error will not work for all compilers (e.g. sunos4)
153 * The following line will abort compilation on all compilers
154 * if none of the above is defined. And that's what we want.
156 Error unconfigured architecture
158 #include <schily/err_arch.h> /* Avoid "unknown directive" with K&R */
161 #endif /* SCHILY_BUILD */
167 * Fake in order to keep the silly hdrchk(1) quiet.
173 #endif /* _SCHILY_ALIGN_H */