Hi,
The 9th patch supplies auto-detection of size of various integer and
other types
Regards,
Alain
diff -X ../exclude.txt -urN dash-0.5.12+08-vsnprintf/configure.ac dash-0.5.12+09-type-sizes/configure.ac
--- dash-0.5.12+08-vsnprintf/configure.ac 2024-11-10 17:29:04.521055631 +0000
+++ dash-0.5.12+09-type-sizes/configure.ac 2024-11-10 17:06:37.153028629 +0000
@@ -68,17 +68,30 @@
AC_CHECK_DECLS([isblank],,,[#include <ctype.h>])
AC_DECL_SYS_SIGLIST
+AC_TYPE_PID_T
+AC_TYPE_UID_T
+AC_TYPE_SSIZE_T
+AC_TYPE_UINT32_T
+
+AC_CHECK_TYPE([intmax_t],,AC_DEFINE_UNQUOTED([intmax_t],long,[Define intmax_t type, must also be supported by printf]))
+
+AC_CHECK_TYPE([uintmax_t],,AC_DEFINE_UNQUOTED([uintmax_t],unsigned long,[Define uintmax_t type, must also be supported by printf]))
dnl Check for sizes of types
+AC_SYS_LARGEFILE
AC_CHECK_SIZEOF([intmax_t])
AC_CHECK_SIZEOF([long long int])
+AC_CHECK_SIZEOF([long int])
dnl Select a fallback format string for intmax_t in case we don't find PRIdMAX
if test "x$ac_cv_sizeof_intmax_t" = "x$ac_cv_sizeof_long_long_int"; then
intmax_fstr="lld"
+else if test "x$ac_cv_sizeof_intmax_t" = "x$ac_cv_sizeof_long_int"; then
+ intmax_fstr="ld"
else
intmax_fstr="jd"
fi
+fi
dnl Check for PRIdMAX and define it to a fallback if not found
AC_CHECK_DECL([PRIdMAX],,