diff options
-rwxr-xr-x | configure | 37 | ||||
-rw-r--r-- | lib.h | 6 |
2 files changed, 3 insertions, 40 deletions
@@ -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 @@ -1483,33 +1473,6 @@ then 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. # @@ -425,7 +425,7 @@ INLINE type_t type(val obj) typedef struct wli wchli_t; -#if LIT_ALIGN < 4 +#if SIZEOF_WCHAR_T < 4 #define wli_noex(lit) (coerce(const wchli_t *,\ convert(const wchar_t *,\ L"\0" L ## lit L"\0" + 1))) @@ -452,7 +452,7 @@ INLINE val static_str(const wchli_t *str) INLINE wchar_t *litptr(val obj) { -#if LIT_ALIGN < 4 +#if SIZEOF_WCHAR_T < 4 wchar_t *ret = coerce(wchar_t *, (coerce(cnum, obj) & ~TAG_MASK)); return (*ret == 0) ? ret + 1 : ret; #else @@ -479,7 +479,7 @@ INLINE cnum c_n(val num) { return coerce(cnum, num) >> TAG_SHIFT; } -#if LIT_ALIGN < 4 +#if SIZEOF_WCHAR_T < 4 #define lit_noex(strlit) coerce(obj_t *,\ coerce(cnum, L"\0" L ## strlit L"\0" + 1) | \ TAG_LIT) |