[exim-dev] Latest releases on FreeBSD4

Góra strony
Delete this message
Reply to this message
Autor: Paul Civati
Data:  
Dla: exim-dev
Temat: [exim-dev] Latest releases on FreeBSD4
I need some suggestions on patching the latest Exim releases on
FreeBSD4 since they don't build:

gcc smtp_in.c
smtp_in.c: In function `smtp_vprintf':
smtp_in.c:403: syntax error before `}'
*** Error code 1

and the relevant lines, 403 being the va_copy():

/* This is split off so that verify.c:respond_printf() can, in effect, call
smtp_printf(), bearing in mind that in C a vararg function can't directly
call another vararg function, only a function which accepts a va_list.

Note also that repeated calls to va_start()/va_end() pairs is claimed to be
non-portable; meanwhile, va_copy() is also non-portable in that it's C99, so
we end up needing OS support to define it for us. */

void
smtp_vprintf(char *format, va_list ap)
{
va_list ap_d;

DEBUG(D_receive)
  {
  uschar *cr, *end;
  va_copy(ap_d, ap);
  (void) string_vformat(big_buffer, big_buffer_size, format, ap_d);
  end = big_buffer + Ustrlen(big_buffer);
  while ((cr = Ustrchr(big_buffer, '\r')) != NULL)   /* lose CRs */
    memmove(cr, cr + 1, (end--) - cr);
  debug_printf("SMTP>> %s", big_buffer);
  }


-Paul-