[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [leafnode-list] [ANNOUNCE:] leafnode-1.9.12

Cornelius Krasel wrote:
> > Unfortunately I found one more problem: leafnode doesn't compile
> > under OSF/1 because it lacks snprintf(3).
> Well, in that case we have to include an snprintf() in miscutil.c. It
> would be nice to have the BSD sourcecode since it doesn't require the
> GPL. Where can I download the source of a BSDish version of the libc?

Second thought on the problem : why not having in miscutils.c

int snprintf(char *str, size_t n, const char *fmt, ...)
    int rval;
    va_list ap;

    va_start(ap, fmt);
    rval = sprintf(str, fmt, ap);

    return rval;

So platform having snprintf() will use theirs and those who haven't will
use sprintf().

Perhaps there is even a cpp #pragma to warn people of the trick a compile

leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx -- mailing list for leafnode
To unsubscribe, send mail with "unsubscribe" in the subject to the list