[Dovecot] configure error on HP-UX: C99 compatible vsnprintf() call

Woonsan Ko woon_san at yahoo.com
Fri Jun 13 10:54:01 EEST 2008


Hi Timo,

Please see comments below.

--- On Fri, 6/13/08, Timo Sirainen <tss at iki.fi> wrote:

> From: Timo Sirainen <tss at iki.fi>
> Subject: Re: [Dovecot] configure error on HP-UX: C99 compatible vsnprintf() call
> To: woon_san at yahoo.com
> Cc: "Dovecot Mailing List" <dovecot at dovecot.org>
> Date: Friday, June 13, 2008, 4:33 PM
> On Fri, 2008-06-13 at 00:12 -0700, Woonsan Ko wrote:
> > Hi Timo,
> > 
> > Thank you very much for quick response.
> > I have just tested with your new package, but they
> print other errors during `make':
> > 
> > 1. `make' after `configure'
> > 
> > Error 239: "str-find.c", line 17 # A
> struct/union shall not contain a member
> >     with incomplete type.
> >             int goodtab[];
> >                 ^^^^^^^
> 
> This is valid C99 code. I don't think I want to change
> it just to
> support one rarely used compiler. You could change it to
> [1] and it
> should work just as well (same for lib-imap/imap-match.c).

I agree. I think we can compile with `aCC -AC99' instead of `cc' for HP-UX.
Thank you for the information anyway.

> 
> > 2. `make' after `configure CC=/opt/aCC/bin/aCC
> -AC99'
> > 
> > Error 20: "mempool-alloconly.c", line 83 #
> '<number>' expected before '.'.
> >             MEMBER(v)
> &static_alloconly_pool_vfuncs,
> >             ^^^^^^
> 
> MEMBER() macro is defined in src/macros.h:
> 
> /* C99-style struct member definitions */
> #if (defined(__STDC__) && __STDC_VERSION__ >=
> 199901L) || __GNUC__ > 2
> #  define MEMBER(name) .name =
> #else
> #  define MEMBER(name)
> #endif
> 
> So apparently HP-UX lies that it supports C99 even though
> it doesn't
> actually? I could change that #ifdef, but I don't know
> what would be a
> good check for HP-UX.

The man page is saying that they support C99 "partially".
Anyway, I think we can check for HP-UX by _HPUX_SOURCE.
(See http://docs.hp.com/en/B9106-90012/stdsyms.5.html)
I think "#ifdef _HPUX_SOURCE" can work for us.
Thank you very much!

Regards,

Woonsan


      


More information about the dovecot mailing list