From 3ad496e4a6e1424e1a122ee280cdf4e0f2f24683 Mon Sep 17 00:00:00 2001
From: Kaz Kylheku <kaz@kylheku.com>
Date: Tue, 20 Apr 2021 04:52:49 -0700
Subject: configure: remove LIT_ALIGN.

LIT_ALIGN was introduced before there was SIZEOF_WCHAR_T.
The latter was introduced on suspicion that they might not
be the same. Since LIT_ALIGN is tied to SIZEOF_WCHAR_T
again there is no need for it to exist.

* configure (lit_align): Variable removed. Documentation
of lit-align argument removed. Alignment of wide literals test
removed. Not generating LIT_ALIGN in config.h any more.

* lib.h (LIT_ALIGN): Occurrences replaced with SIZEOF_WCHAR_T.
---
 configure | 37 -------------------------------------
 1 file changed, 37 deletions(-)

(limited to 'configure')

diff --git a/configure b/configure
index 6b104cf1..75872b7d 100755
--- a/configure
+++ b/configure
@@ -182,7 +182,6 @@ platform_ldflags=
 platform_ldlibs=
 txr_dbg_opts=--gc-debug
 valgrind=
-lit_align=
 extra_debugging=
 debug_support=y
 gen_gc=y
@@ -411,15 +410,6 @@ intptr [$intptr]
   value can be converted to it. If this is blank, the configure script
   will try to auto detect it.
 
-lit-align [$lit_align]
-
-  Specifies alignment for wide string literals.  This is guessed
-  from the size of the wchar_t type. If your wchar_t type is two byte wide, but
-  wide literals are aligned to four bytes, then you should specify this.  This
-  will eliminate some kludges in the program. There is no easy way to check
-  for this withut generating and running a C program, which is unfriendly
-  for cross-compiling!
-
 inline [$inline]
 
   Specifies the syntax for defining an inline function, in such
@@ -1482,33 +1472,6 @@ then
   printf "typedef superulong_t double_uintptr_t;\n" >> config.h
 fi
 
-#
-# Alignment of wchar_t
-#
-# What we really want to know is the alignment of wide string literals
-# like L"wide literal".
-#
-# We make pessimistic assumption that the size of the wchar_t type is this
-# alignment.
-#
-# There is no easy way to get the information without running a compiled
-# program.
-#
-
-printf "Conservatively guessing the alignment of wide literals ... "
-
-if [ -z "$lit_align" ] ; then
-  if [ $SIZEOF_WCHAR_T -eq 0 ] ; then
-    printf "failed\n"
-    exit 1
-  fi
-
-  lit_align=$SIZEOF_WCHAR_T
-fi
-
-printf "%d\n" "$lit_align"
-printf "#define LIT_ALIGN %d\n" "$lit_align" >> config.h
-
 #
 # Endianness.
 #
-- 
cgit v1.2.3