From d13b9f20d1dc3613cf850eeb9b5627a0cdec5c4e Mon Sep 17 00:00:00 2001 From: Cheng Shao Date: Wed, 3 Nov 2021 13:43:46 +0000 Subject: 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. --- libraries/base/aclocal.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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], -- cgit v1.2.1