Well, I got as far as I could. Some errors were just gcc being a bitch about #define newlines (\). I removed these newlines and left others where they were, and the code passed through without problem.
But then, iconv came haunting me again:
utils.c: In function `AnsiToUTF8':
utils.c:627: syntax error before `converter'
utils.c:628: `converter' undeclared (first use in this function)
utils.c:628: (Each undeclared identifier is reported only once
utils.c:628: for each function it appears in.)
*** Error code 1
Line 627 in utils.c starts here:
iconv_t converter = iconv_open ("UTF-8", "");
err = iconv (converter, &inp, &insize, &outp, &outsize);
iconv_close (converter);
setlocale (LC_CTYPE, old_locale);
Oh well... the HP TestDrive servers seem to be down at the moment (I pray to God it's not some stupid script kiddie putting an end to this great resource), but later I'll try to compile there. They have FreeBSD 5.4 and NetBSD 2.0, so then I'll be able to find out if the fault is on SF's deprecated BSD installations.
Thanks for all your help.
Regards;
Roberto.