diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-01-26 14:17:49 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-01-26 14:17:49 -0800 |
commit | d1640a17861fd94cbf19c59b4f3d0f0a3f6633fe (patch) | |
tree | 871bebf288bc17d9091b5533aaadc9f81dea124d /configure | |
parent | da9fbb49983a000dee12918fad9a2c8bbcdf2448 (diff) | |
download | txr-d1640a17861fd94cbf19c59b4f3d0f0a3f6633fe.tar.gz txr-d1640a17861fd94cbf19c59b4f3d0f0a3f6633fe.tar.bz2 txr-d1640a17861fd94cbf19c59b4f3d0f0a3f6633fe.zip |
configure: problems with 128 bit integer detection.
* configure: we can't assume that we can just edit "int" to
"uint" in forming the superulong_t type. Let's consolidate
the detection of the signed and unsigned superlong. Only
if both are available, then emit material into config.h,
along with a single constant: HAVE_SUPERLONG_T.
* mpi/mpi-types.h: Don't refer to removed HAVE_USUPERLONG_T.
Change superulong_t to usuperlong_t.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -1100,19 +1100,16 @@ fi if [ -n "$superlong" ] ; then printf '"%s"\n' "$superlong" - printf "#define HAVE_SUPERLONG_T 1\n" >> config.h - printf "typedef $superlong superlong_t;\n" >> config.h - printf "typedef $(echo $superlong | sed -e s/int/uint/) superulong_t;\n" >> config.h else printf "none\n" fi printf "Checking what C type we have for u. integers wider than \"long long\" ... " -usuperlong= +superulong= if [ -z "$broken128" ] ; then - for try_type in uint128 uint128_t __uint128 __uint128_t ; do + for try_type in uint128 uint128_t __uint128 __uint128_t 'unsigned int128'; do cat > conftest.c <<! #include "config.h" int main(void) @@ -1124,20 +1121,24 @@ int main(void) longlong_t a, b; ! if conftest_o ; then - usuperlong=$try_type + superulong=$try_type break fi done fi -if [ -n "$usuperlong" ] ; then - printf '"%s"\n' "$usuperlong" - printf "#define HAVE_USUPERLONG_T 1\n" >> config.h - printf "typedef $usuperlong usuperlong_t;\n" >> config.h +if [ -n "$superulong" ] ; then + printf '"%s"\n' "$superulong" else printf "none\n" fi +if [ -n "$superlong" -a -n "$superulong" ] ; then + printf "#define HAVE_SUPERLONG_T 1\n" >> config.h + printf "typedef $superlong superlong_t;\n" >> config.h + printf "typedef $superulong superulong_t;\n" >> config.h +fi + printf "Checking what C integer type can hold a pointer ... " read_syms() |