From e027c9ea3ceae7f81c8d1a3ea00a4f80b80046d1 Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Tue, 17 Sep 2024 16:00:13 -0500 Subject: [PATCH] fortran_charlen_t should be size_t, not int, with Clang on MacOS. --- wsjtx_config.h.in | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/wsjtx_config.h.in b/wsjtx_config.h.in index 592d9b6b7..81ecac7d4 100644 --- a/wsjtx_config.h.in +++ b/wsjtx_config.h.in @@ -59,14 +59,19 @@ extern "C" { /* typedef for consistent gfortran ABI for charlen type hidden arguments */ #if __GNUC__ > 7 -#ifdef __cplusplus -#include + #ifdef __cplusplus + #include + #else + #include + #endif + typedef size_t fortran_charlen_t; #else -#include -#endif - typedef size_t fortran_charlen_t; -#else - typedef int fortran_charlen_t; + #if defined(__clang__) + #include + typedef size_t fortran_charlen_t; + #else + typedef int fortran_charlen_t; + #endif #endif #ifdef __cplusplus