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