When long and long long are both the same size as off_t, prefer long for scm_off_t even though it should make no difference, because llvm16 seems to consider them distinct types as arguments in function pointer types. Also it seems cleaner. fixes mailutils with GUILE=on on llvm16 on amd64. Fixes: 94218d3a91189c7afea956e8905d5e5ecf879a2c PR: 260960
14 lines
559 B
C
14 lines
559 B
C
--- libguile/gen-scmconfig.c.orig 2022-10-21 15:39:38 UTC
|
|
+++ libguile/gen-scmconfig.c
|
|
@@ -329,6 +329,10 @@ main (int argc, char *argv[])
|
|
pf ("typedef int scm_t_off;\n");
|
|
pf ("#define SCM_T_OFF_MAX INT_MAX\n");
|
|
pf ("#define SCM_T_OFF_MIN INT_MIN\n");
|
|
+#elif SIZEOF_OFF_T == SIZEOF_LONG_LONG && SIZEOF_OFF_T != SIZEOF_LONG
|
|
+ pf ("typedef long long int scm_t_off;\n");
|
|
+ pf ("#define SCM_T_OFF_MAX LLONG_MAX\n");
|
|
+ pf ("#define SCM_T_OFF_MIN LLONG_MIN\n");
|
|
#else
|
|
pf ("typedef long int scm_t_off;\n");
|
|
pf ("#define SCM_T_OFF_MAX LONG_MAX\n");
|