[Top][All Lists]

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

Re: Reconciliation of libsnprintfv vs. autogen

From: Bruce Korb
Subject: Re: Reconciliation of libsnprintfv vs. autogen
Date: Mon, 26 Feb 2007 08:21:15 -0800

On 2/25/07, Daniel Jacobowitz <address@hidden> wrote:
Thanks.  Unfortunately you've backed two things I've done over the
last several days.

        * snprintfv/custom.c: #include (conditionally) runetype.h
        before wchar.h
        * snprintfv/format.c: ditto

That's handled in compat.h (and we still don't know where it comes
from :-).

Then it should be completely removed from custom.c and format.c
also.  That's probably a better solution.  Someday, eventually,
we'll have precompiled headers and collecting all the includes into
one header will become a win....

        * snprintfv/mem.h (SNV_SCOPE): required for windows

That's from standalone libsnprintfv DLL support, which we're
obsoleting as we fold it into gnulib.  It doesn't work quite right
anyway, since none of the snprintfv interface functions are marked as
dllexport.  Marking some functions disables auto-export of all
functions and you end up with a library that doesn't offer snv_printf.

OK.  I've just had folks who use windows say, "you need to do this"
and I don't want to break their builds.  I don't really know how it all
works on windows.  I don't do tham.  :)

> #3 This code *IS* broken and must be fixed.  I left the comment in:
> > @@ -224,7 +228,7 @@ call_argtype_function (struct printf_inf
> >      }
> >
> >  /* FIXME!!! && or || ???? */
> > -  if (!pinfo->dollar && !IS_MODIFIER (spec))
> > +  if (!pinfo->dollar || !IS_MODIFIER (spec))
> >      pinfo->argindex += n;
> >
> >    return n;
> This is a really obtuse and nasty bug.  Without it you wind
> up with the wrong index and seg faulting in an incomprehensible
> way.  The fix is required.

I don't get it.  Is it fixed now or are both options wrong?  Can't
have it both ways.

I left it fixed, but left the FIXME comment in so Paolo (?) can go back
at his leisure and figure it out.  I think Gary may remember it too.
I do not remember exactly what you had to do to trigger the
problem and I had to spend a couple of hours single stepping
through all that code to finally see how it stumbled.  It's been a
couple of years now.  Anyway, "||" is the correct operator.

 #define PRINTF_ERROR(pi, str) \
-        printf_error(pi, __FILE__, __LINE__, SNV_ASSERT_FMT, str);
+        printf_error(pi, __FILE__, __LINE__, SNV_ASSERT_FCN, str);

That's not defined anywhere.

It is a function name.  It is supposed to get defined to
__FUNCTION__ for GCC and empty for anything else.
It is a configurable.  (Shouldn't it be __FILE__ for anything else?)

../../libsnprintfv/snprintfv/printf.c: In function
../../libsnprintfv/snprintfv/printf.c:386: error: 'SNV_ASSERT_FCN'
undeclared (first use in this function)

Something is broken in the configury.
- Bruce

reply via email to

[Prev in Thread] Current Thread [Next in Thread]