Re: [exim] Exim 4.87 RC7 uploaded

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Jeremy Harris
Data:  
Para: exim-users
Assunto: Re: [exim] Exim 4.87 RC7 uploaded
On 02/04/16 11:03, Heiko Schlittermann wrote:
> Heiko Schlittermann <hs@???> (Sa 02 Apr 2016 11:02:01
> CEST):
>> Yes, but the Symbol __STDC_VERSION doesn't seem to have the right
>> value in SRC/buildconfig.c (where I took the code for my short
>> test from).
>
> It's set for clang, or if we use gcc -std=c99 (or some other
> possible values). clang and gcc understand that option, but I'm not
> sure about other compilers.
>
> Currently I've no idea how to solve it.


We were handling long long, and long, -sized (s)size_t but
not plain int-sized. Easy fix, and gets me a make to complete
on 14.04 LTS 32-bit where it did not before.

74d8288d7a8f pushed, and also the patch attached here.

Mike, thank you for finding this.
- --
Cheers,
Jeremy
diff --git a/src/src/buildconfig.c b/src/src/buildconfig.c
index 4c1a72d..27e7314 100644
--- a/src/src/buildconfig.c
+++ b/src/src/buildconfig.c
@@ -105,8 +105,10 @@ time_t test_time_t = 0;
size_t test_size_t = 0;
ssize_t test_ssize_t = 0;
unsigned long test_ulong_t = 0L;
+unsigned int test_uint_t = 0;
#endif
long test_long_t = 0;
+int test_int_t = 0;
FILE *base;
FILE *new;
int last_initial = 'A';
@@ -190,12 +192,17 @@ fprintf(new, "#define SSIZE_T_FMT \"%%zd\"\n");
#else
if (sizeof(test_size_t) > sizeof (test_ulong_t))
fprintf(new, "#define SIZE_T_FMT \"%%llu\"\n");
-else
+else if (sizeof(test_size_t) > sizeof (test_uint_t))
fprintf(new, "#define SIZE_T_FMT \"%%lu\"\n");
+else
+ fprintf(new, "#define SIZE_T_FMT \"%%u\"\n");
+
if (sizeof(test_ssize_t) > sizeof(test_long_t))
fprintf(new, "#define SSIZE_T_FMT \"%%lld\"\n");
-else
+else if (sizeof(test_ssize_t) > sizeof(test_int_t))
fprintf(new, "#define SSIZE_T_FMT \"%%ld\"\n");
+else
+ fprintf(new, "#define SSIZE_T_FMT \"%%d\"\n");
#endif

/* Now search the makefile for certain settings */