diff options
author | Cheng Shao <cheng.shao@tweag.io> | 2021-11-03 13:43:46 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-12-15 16:33:54 -0500 |
commit | d13b9f20d1dc3613cf850eeb9b5627a0cdec5c4e (patch) | |
tree | b8bbdb6c1c05145b12b8c245ee5f89ac09494662 | |
parent | f5a0b408c7e4ef71221eea3ea80ea250fbb28e18 (diff) | |
download | haskell-d13b9f20d1dc3613cf850eeb9b5627a0cdec5c4e.tar.gz |
base: use `CUIntPtr` instead of `Ptr ()` as the autoconf detected Haskell type for C pointers
When autoconf detects a C pointer type, we used to specify `Ptr ()` as
the Haskell type. This doesn't work in some cases, e.g. in `wasi-libc`,
`clockid_t` is a pointer type, but we expected `CClockId` to be an
integral type, and `Ptr ()` lacks various integral type instances.
-rw-r--r-- | libraries/base/aclocal.m4 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/base/aclocal.m4 b/libraries/base/aclocal.m4 index 573c635ea2..190e2b496f 100644 --- a/libraries/base/aclocal.m4 +++ b/libraries/base/aclocal.m4 @@ -154,7 +154,7 @@ AC_DEFUN([FPTOOLS_CHECK_HTYPE_ELSE],[ if test "$HTYPE_IS_POINTER" = yes then - AC_CV_NAME="Ptr ()" + AC_CV_NAME="CUIntPtr" else FP_COMPUTE_INT([HTYPE_IS_FLOAT],[sizeof($1) == sizeof(float)], [FPTOOLS_HTYPE_INCLUDES], |