Paolo Bonzini <[EMAIL PROTECTED]> wrote: >> 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...
libvirt is affected, too, in that it will use strerror, yet is LGPLv2+. Any objection to this? >From 2fea9d6efde41eea3af51b45d27b31ed9f376b52 Mon Sep 17 00:00:00 2001 From: Jim Meyering <[EMAIL PROTECTED]> Date: Fri, 24 Oct 2008 18:02:13 +0200 Subject: [PATCH] strerror: don't depend on GPL'd intprops * modules/strerror (Depends-on): Remove intprops. * lib/strerror.c: Don't include "intprops.h". Instead, define INT_STRLEN_BOUND to 20. --- lib/strerror.c | 3 +++ modules/strerror | 1 - 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/lib/strerror.c b/lib/strerror.c index 787575f..1f5e691 100644 --- a/lib/strerror.c +++ b/lib/strerror.c @@ -30,7 +30,10 @@ # endif # endif +/* commented out due to LGPLv2+ vs. GPL copyright incompatibility # include "intprops.h" + */ +# define INT_STRLEN_BOUND(x) 20 # undef strerror # if ! HAVE_DECL_STRERROR diff --git a/modules/strerror b/modules/strerror index b662401..2fa5d88 100644 --- a/modules/strerror +++ b/modules/strerror @@ -7,7 +7,6 @@ m4/strerror.m4 Depends-on: errno -intprops string configure.ac: -- 1.6.0.3.517.g759a