[Dovecot] [PATCH 0/10] NTLM patchset submission

Geo Carncross geocar at internetconnection.net
Wed Jul 28 01:51:16 EEST 2004


On Tue, 2004-07-27 at 17:36, Timo Sirainen wrote:
> You use "char var[0]" in end of some structures. I've tried to avoid 
> them so far everywhere since C89 doesn't support it. But I guess it's 
> common enough feature that it could be allowed the way C99 supports it, 
> var[].

var[1] is safe and then malloc-1. Still C89-ok.

> +	int len = strlen(passwd);
> +	ucs2le_t wpwd[len + 1];
> 
> Another C99ism.. Are there enough C99 compilers that it'd be good idea 
> to require it? gcc of course works, but how about others?

No. gcc on debian woody (stable) requires --std=c99 to do it.
Use alloca() if it's available (more widely so than C99) instead.




More information about the dovecot mailing list