[bug#59993] [PATCH 2/2] tests: Fix implicit function declaration errors

Frederic Berat <[email protected]>
Newsgroups gmane.comp.sysutils.automake.patches
Message-ID <CAObJKZoak0YiPHBG=UUZMjqtK8xv4FDddrynov7w+FeMCawBvw@mail.gmail.com>
I'll separe this one in a dedicated patch and give it a more
detailed/specific explanation.

On Tue, Dec 13, 2022 at 10:02 PM Zack Weinberg <[email protected]> wrote:
>
> On Tue, Dec 13, 2022, at 1:30 AM, Frederic Berat wrote:
> > On Mon, Dec 12, 2022 at 9:19 PM Zack Weinberg <[email protected]> wrote:
> >> > --- a/t/ax/depcomp.sh
> >> > +++ b/t/ax/depcomp.sh
> >> > @@ -243,6 +243,7 @@ cat > sub/subfoo.h <<'END'
> >> >   #include <stdio.h>
> >> >   extern int subfoo (void);
> >> >   END
> >> > +cp sub/subfoo.h sub/subfoo.save
> >> >
> >> >   cat > src/baz.c <<'END'
> >> >   #include "baz.h"
> >> > @@ -399,8 +400,7 @@ do_test ()
> >> >         && rewrite "$srcdir"/sub/subfoo.h echo 'choke me' \
> >> >         && not $MAKE \
> >> >         && delete "$srcdir"/sub/subfoo.h \
> >> > -      && edit "$srcdir"/sub/subfoo.c -e 1d \
> >> > -      && edit "$srcdir"/foo.h -e 2d \
> >> > +      && mv  "$srcdir"/sub/subfoo.save "$srcdir"/sub/subfoo.h \
> >> >         && make_ok \
> >> >         || r='not ok'
> >> >       result_ "$r" "$pfx dependency tracking works"
> >>
> >> These changes don't seem to have anything to do with the patch as
> >> described.  They should be submitted separately.
> >
> > Actually, that is related. The edit removes the "#include subfoo.h"
> > line from foo.h, because the subfoo.h file got overwritten earlier.
> > This subfoo.h is the one that had the function declaration in ("extern
> > int subfoo (void);" specifically).
> > Either you need the original header back, or you need to get the
> > declaration back another way. I felt this way was easier than trying
> > to insert a declaration without breaking the test.
>
> OK, I clearly don't understand what this test is doing, so I'm going to
> defer to someone else to review it.
>
> zw
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.