suggested fix (non-snprintf-having machines)
Lincoln DeCoursey
decourl at cs.sunyit.edu
Thu Feb 5 08:32:30 UTC 2004
Gentlemen,
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
`__format__'
attribute
gmake[1]: *** [setproctitle.o] Error 1
gmake[1]: 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:
#if NEED_DECLARATION_SNPRINTF
extern int snprintf(char *, size_t, const char *, ...)
__attribute__((__format__(3, 4)));
#endif
I changed this to:
#if NEED_DECLARATION_SNPRINTF
extern int snprintf(char *str, size_t size, const char *format, ...);
#endif
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.
http://www.abisource.com/mailinglists/abiword-dev/01/November/0192.html
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.
Lincoln DeCoursey
Student
SUNY Institute of Technology
Utica, NY
More information about the inn-bugs
mailing list