1 ?RCS: $Id: alignbytes.U,v 3.0.1.2 1994/10/29 16:02:28 ram Exp $
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 3.0.
11 ?RCS: $Log: alignbytes.U,v $
12 ?RCS: Revision 3.0.1.2 1994/10/29 16:02:28 ram
13 ?RCS: patch36: added ?F: line for metalint file checking
15 ?RCS: Revision 3.0.1.1 1994/05/06 14:25:20 ram
16 ?RCS: patch23: avoid ALIGNBYTES, since it conflicts on NetBSD
18 ?RCS: Revision 3.0 1993/08/18 12:05:23 ram
19 ?RCS: Baseline for dist 3.0 netwide release.
21 ?MAKE:alignbytes: Myread Compile cat rm_try usecrosscompile multiarch run \
22 d_longdbl uselongdouble test
23 ?MAKE: -pick add $@ %<
25 ?S: This variable holds the number of bytes required to align a
26 ?S: double-- or a long double when applicable. Usual values are
27 ?S: 2, 4 and 8. The default is eight, for safety.
29 ?X: This used to be called ALIGNBYTES, but that conflicts with
30 ?X: <machines/param.h> in NetBSD.
31 ?C:MEM_ALIGNBYTES (ALIGNBYTES):
32 ?C: This symbol contains the number of bytes required to align a
33 ?C: double, or a long double when applicable. Usual values are 2,
34 ?C: 4 and 8. The default is eight, for safety.
36 ?H:?%<:#if defined(USE_CROSS_COMPILE) || defined(MULTIARCH)
37 ?H:?%<:# define MEM_ALIGNBYTES 8
39 ?H:?%<:#define MEM_ALIGNBYTES $alignbytes
43 : check for alignment requirements
45 case "$usecrosscompile$multiarch" in
48 You seem to be either cross-compiling or doing a multiarchitecture build,
49 skipping the memory alignment check.
58 '') echo "Checking alignment constraints..." >&4
59 if $test "X$uselongdouble" = Xdefine -a "X$d_longdbl" = Xdefine; then
61 typedef long double NV;
76 printf("%d\n", (int)((char *)&try_algn.bar - (char *)&try_algn.foo));
81 if eval $compile_ok; then
85 echo "(I can't seem to compile the test program...)"
91 rp="Doubles must be aligned on a how-many-byte boundary?"