DTC Patch for Cygwin
Matt Tyrlik
tyrlik at us.ibm.com
Sat Sep 22 05:42:04 EST 2007
>Scott Wood <scottwood at freescale.com> wrote on 09/21/2007 02:46:39 PM:
> On Fri, Sep 21, 2007 at 11:26:04AM -0400, Matt Tyrlik wrote:
> >
> > Changes required to compile DTC under Cygwin
> >
> > ===================================================================
> > --- dtc-org.orig/tests/supernode_atdepth_offset.c
> > +++ dtc-org/tests/supernode_atdepth_offset.c
> > @@ -63,8 +63,11 @@ int path_prefix(const char *path, int de
> > return 1;
> >
> > p = path;
> > - for (i = 0; i < depth; i++)
> > - p = strchrnul(p+1, '/');
> > + for (i = 0; i < depth; i++) {
> > + p = strchr(p+1, '/');
> > + if (!p)
> > + p = path + strlen(path);
> > + }
> >
> > return p - path;
> > }
>
> Maybe we should define strchrnul under #ifndef GLIBC, similar to
> strndupa?
Since this is used only in one place David Gibson suggested that the
change should be done in code.
>
> > Index: dtc-org/tests/testutils.c
> > ===================================================================
> > --- dtc-org.orig/tests/testutils.c
> > +++ dtc-org/tests/testutils.c
> > @@ -52,10 +52,9 @@ static void sigint_handler(int signum, s
> > void test_init(int argc, char *argv[])
> > {
> > int err;
> > - struct sigaction sa_int = {
> > - .sa_sigaction = sigint_handler,
> > - };
> > + struct sigaction sa_int;
> >
> > + sa_int.sa_sigaction = sigint_handler,
> > test_name = argv[0];
>
> What version of GCC does cygwin use? That doesn't seem like something
> that should break due to OS differences.
>
> -Scott
Currently 3.4.4. The compiler can't handle unnamed union in an
initializer.
Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20070921/b75f9b0c/attachment.htm>
More information about the Linuxppc-dev
mailing list