Your message dated Mon, 4 Jan 2021 15:59:20 +0100
with message-id 
<CAJ2a_Df+kN3Hjw8o64VyiJhG=Znu7co=e9tpl1cumhbaxh_...@mail.gmail.com>
and subject line Re: dovecot should use less AC_RUN_IFELSE
has caused the Debian Bug report #885855,
regarding dovecot should use less AC_RUN_IFELSE
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
885855: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=885855
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: dovecot
Version: 1:2.2.33.2-1
Severity: wishlist
Tags: upstream patch
User: [email protected]
Usertags: rebootstrap

For cross building dovecot one has to set a significant pile of autoconf
cache variables to make all those AC_RUN_IFELSE checks work. For some of
those checks, there is no good alternative to providing the results.
However for determining signedness of standard types, AC_RUN_IFELSE is
not necessary. The signedness is a compile time constant and thus can be
determined using compile tests. The attached patch implements that for
two signedness tests and thus reduces the number of cache variables a
cross builder has to supply. Please consider applying it.

Helmut
Index: dovecot-2.2.33.2/configure.ac
===================================================================
--- dovecot-2.2.33.2.orig/configure.ac
+++ dovecot-2.2.33.2/configure.ac
@@ -843,12 +843,12 @@
 dnl * it's more likely vulnerable to buffer overflows. Anyway, C99 specifies
 dnl * that it's unsigned and only some old systems define it as signed.
 AC_CACHE_CHECK([whether size_t is signed],i_cv_signed_size_t,[
-  AC_RUN_IFELSE([AC_LANG_SOURCE([[
+  AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
     #include <sys/types.h>
     #include <stdlib.h>
     int main() {
-      /* return 0 if we're signed */
-      exit((size_t)(int)-1 <= 0 ? 0 : 1);
+      char error_if_unsigned[(size_t)(int)-1 <= 0 ? 1 : -1];
+      return 0;
     }
   ]])],[
     i_cv_signed_size_t=yes
@@ -1000,12 +1000,12 @@
 AC_DEFINE_UNQUOTED(TIME_T_MAX_BITS, $i_cv_gmtime_max_time_t, [max. time_t bits gmtime() can handle])
 
 AC_CACHE_CHECK([whether time_t is signed],i_cv_signed_time_t,[
-  AC_RUN_IFELSE([AC_LANG_SOURCE([[
+  AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
     #include <sys/types.h>
     #include <stdlib.h>
     int main() {
-      /* return 0 if we're signed */
-      exit((time_t)(int)-1 <= 0 ? 0 : 1);
+      char error_if_unsigned[(time_t)(int)-1 <= 0 ? 1 : -1];
+      return 0;
     }
   ]])],[
     i_cv_signed_time_t=yes

--- End Message ---
--- Begin Message ---
Version: 1:2.3.11.3+dfsg1-2

There are no AC_RUN_IFELSE statements left in the configure.ac files.

--- End Message ---

Reply via email to