This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Check the alignment of long doubles if they are to be used;
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 22 Feb 2000 05:14:35 +0000 (05:14 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 22 Feb 2000 05:14:35 +0000 (05:14 +0000)
regen Configure.

p4raw-id: //depot/metaconfig@5189

U/compline/alignbytes.U

index b621a88..e8e328c 100644 (file)
 ?RCS: Revision 3.0  1993/08/18  12:05:23  ram
 ?RCS: Baseline for dist 3.0 netwide release.
 ?RCS:
-?MAKE:alignbytes: Myread Compile cat rm crosscompile multiarch
+?MAKE:alignbytes: Myread Compile cat rm crosscompile multiarch \
+       d_longdbl uselongdouble longdblsize
 ?MAKE: -pick add $@ %<
 ?S:alignbytes:
 ?S:    This variable holds the number of bytes required to align a
-?S:    double. Usual values are 2, 4 and 8.
+?S:    double-- or a long double when applicable. Usual values are
+?S:    2, 4 and 8.  The default is eight, for safety.
 ?S:.
 ?X: This used to be called ALIGNBYTES, but that conflicts with
 ?X: <machines/param.h> in NetBSD.
 ?C:MEM_ALIGNBYTES (ALIGNBYTES):
 ?C:    This symbol contains the number of bytes required to align a
-?C:    double. Usual values are 2, 4 and 8. The default is eight,
-?C:    for safety.
+?C:    double, or a long double when applicable. Usual values are 2,
+?C:    4 and 8. The default is eight, for safety.
 ?C:.
 ?H:?%<:#if defined(CROSSCOMPILE) || defined(MULTIARCH)
 ?H:?%<:#  define MEM_ALIGNBYTES 8
@@ -54,11 +56,20 @@ EOM
 *)
        case "$alignbytes" in
        '') echo "Checking alignment constraints..." >&4
-               $cat >try.c <<'EOCP'
+               if $test "X$uselongdouble" = Xdefine -a "X$d_longdbl" = Xdefine; then
+                       $cat >try.c <<'EOCP'
+typedef long double NV;
+EOCP
+               else
+                       $cat >try.c <<'EOCP'
+typedef double NV;
+EOCP
+               fi
+               $cat >>try.c <<'EOCP'
 #include <stdio.h>
 struct foobar {
        char foo;
-       double bar;
+       NV bar;
 } try_algn;
 int main()
 {