suggested fix (non-snprintf-having machines)
decourl at cs.sunyit.edu
Thu Feb 5 08:32:30 UTC 2004
I was able to correct a compilation error by replacing some code.
When attempting to build INN 2.4.1 on HP-UX 10.20 using gcc 2.95.2,
I received the following error:
gcc -g -O2 -I../include -c setproctitle.c
In file included from setproctitle.c:16:
../include/clibrary.h:110: wrong number of arguments specified for
gmake: *** [setproctitle.o] Error 1
gmake: Leaving directory `/usr/local/news/temp/inn-2.4.1/lib'
gmake: *** [all-lib] Error 2
Take a look at include/clibrary.h at line 109:
extern int snprintf(char *, size_t, const char *, ...)
I changed this to:
extern int snprintf(char *str, size_t size, const char *format, ...);
Honestly, I have no idea what this code accomplishes, except that
in general I understand the goal of snprintf, and that my operating
system version doesn't seem to have it.
I suspect that in your development effort, you work on more modern
systems, and therefore may not be aware of the build failure which
evidences itself in this situation.
I got the idea for this modification from a gentleman who had hacked
abiword sources to satisfy a snprintf dependancy.
Anyway, this is the first time I have ever attempted to hack "real"
software. So, please forgive me if there is not really a problem
with your code, but rather with my environment. However, since I
enjoyed success with this substitution, I though you might be
interested to know.
SUNY Institute of Technology
More information about the inn-bugs