[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: perror: fix license problems
From: |
Paolo Bonzini |
Subject: |
Re: perror: fix license problems |
Date: |
Fri, 24 Oct 2008 17:46:37 +0200 |
User-agent: |
Thunderbird 2.0.0.17 (Macintosh/20080914) |
> strerror.c appears to need intprops only for its
> definition of the INT_STRLEN_BOUND macro, used here:
>
> {
> char *result = strerror (n);
>
> if (result == NULL || result[0] == '\0')
> {
> static char const fmt[] = "Unknown error (%d)";
> static char mesg[sizeof fmt + INT_STRLEN_BOUND (n)];
> sprintf (mesg, fmt, n);
>
> Just remove the inclusion of intprops.h
> and instead define INT_STRLEN_BOUND to whatever constant
> e.g., INT_STRLEN_BOUND(int64_t) evaluates to.
Yeah, sizeof fmt + 20 should be enough...
Paolo