diff options
author | Tomas Carnecky <tomas.carnecky@gmail.com> | 2016-04-18 22:11:53 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-04-18 22:12:00 +0200 |
commit | 87114ae13fd1f10dc00a6b4e64898da3e92d0266 (patch) | |
tree | c6468453376c5eb6fab8b62675f0a2830d8dc1fd /configure.ac | |
parent | 10d808c59307c5c0b1cb40a9ce0eb6e3efc068c9 (diff) | |
download | haskell-87114ae13fd1f10dc00a6b4e64898da3e92d0266.tar.gz |
Use stdint types to define SIZEOF and ALIGNMENT of INTx/WORDx
Saves us a CPP #if in MachDeps.h since we now can always rely on a
64-bit type being available.
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie, erikd
Differential Revision: https://phabricator.haskell.org/D2099
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 56 |
1 files changed, 23 insertions, 33 deletions
diff --git a/configure.ac b/configure.ac index c5260ce609..a5ee3bce2a 100644 --- a/configure.ac +++ b/configure.ac @@ -796,47 +796,37 @@ dnl ** do we have long longs? AC_CHECK_TYPES([long long]) dnl ** what are the sizes of various types -AC_CHECK_SIZEOF(char, 1) -AC_CHECK_SIZEOF(double, 8) -AC_CHECK_SIZEOF(float, 4) -AC_CHECK_SIZEOF(int, 4) -AC_CHECK_SIZEOF(long, 4) +FP_CHECK_SIZEOF_AND_ALIGNMENT(char) +FP_CHECK_SIZEOF_AND_ALIGNMENT(double) +FP_CHECK_SIZEOF_AND_ALIGNMENT(float) +FP_CHECK_SIZEOF_AND_ALIGNMENT(int) +FP_CHECK_SIZEOF_AND_ALIGNMENT(long) if test "$ac_cv_type_long_long" = yes; then -AC_CHECK_SIZEOF(long long, 8) +FP_CHECK_SIZEOF_AND_ALIGNMENT(long long) fi -AC_CHECK_SIZEOF(short, 2) -AC_CHECK_SIZEOF(unsigned char, 1) -AC_CHECK_SIZEOF(unsigned int, 4) -AC_CHECK_SIZEOF(unsigned long, 4) +FP_CHECK_SIZEOF_AND_ALIGNMENT(short) +FP_CHECK_SIZEOF_AND_ALIGNMENT(unsigned char) +FP_CHECK_SIZEOF_AND_ALIGNMENT(unsigned int) +FP_CHECK_SIZEOF_AND_ALIGNMENT(unsigned long) if test "$ac_cv_type_long_long" = yes; then -AC_CHECK_SIZEOF(unsigned long long, 8) +FP_CHECK_SIZEOF_AND_ALIGNMENT(unsigned long long) fi -AC_CHECK_SIZEOF(unsigned short, 2) -AC_CHECK_SIZEOF(void *, 4) +FP_CHECK_SIZEOF_AND_ALIGNMENT(unsigned short) +FP_CHECK_SIZEOF_AND_ALIGNMENT(void *) + +FP_CHECK_SIZEOF_AND_ALIGNMENT(int8_t) +FP_CHECK_SIZEOF_AND_ALIGNMENT(uint8_t) +FP_CHECK_SIZEOF_AND_ALIGNMENT(int16_t) +FP_CHECK_SIZEOF_AND_ALIGNMENT(uint16_t) +FP_CHECK_SIZEOF_AND_ALIGNMENT(int32_t) +FP_CHECK_SIZEOF_AND_ALIGNMENT(uint32_t) +FP_CHECK_SIZEOF_AND_ALIGNMENT(int64_t) +FP_CHECK_SIZEOF_AND_ALIGNMENT(uint64_t) + dnl for use in settings.in WordSize=$ac_cv_sizeof_void_p AC_SUBST(WordSize) - -dnl ** what are alignment constraints on various types -FP_CHECK_ALIGNMENT(char) -FP_CHECK_ALIGNMENT(double) -FP_CHECK_ALIGNMENT(float) -FP_CHECK_ALIGNMENT(int) -FP_CHECK_ALIGNMENT(long) -if test "$ac_cv_type_long_long" = yes; then -FP_CHECK_ALIGNMENT(long long) -fi -FP_CHECK_ALIGNMENT(short) -FP_CHECK_ALIGNMENT(unsigned char) -FP_CHECK_ALIGNMENT(unsigned int) -FP_CHECK_ALIGNMENT(unsigned long) -if test "$ac_cv_type_long_long" = yes; then -FP_CHECK_ALIGNMENT(unsigned long long) -fi -FP_CHECK_ALIGNMENT(unsigned short) -FP_CHECK_ALIGNMENT(void *) - FP_CHECK_FUNC([WinExec], [@%:@include <windows.h>], [WinExec("",0)]) |