This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: porting problem triggered by gcc include search order
Hi,
2012/2/16 marco atzeri <marco.atzeri@gmail.com>:
> rename local signal.h is effective.
>
> I guess that -I. is influencing the inclusion order with unexpected
> results.
thanks.
and I checked gcc include order on my linux env.
renaming works fine but it's awkward to me.
after more investigation, I realized that:
* on cygwin env
1. src/rt/slave.c is coded to #include <poll.h>
2. gcc picks /usr/include/poll.h
3. /usr/include/poll.h is coded to #include <sys/poll.h>
4. gcc picks /usr/include/sys/poll.h
5. /usr/include/sys/poll.h is coded to #include <signal.h>
6. gcc picks src/rt/signal.h, not /usr/include/signal.h b/c -I.
* on linux box
1. src/rt/slave.c is coded to #include <poll.h>
2. gcc picks /usr/include/poll.h
3. /usr/include/poll.h is coded to #include <sys/poll.h>
4. gcc picks /usr/include/sys/poll.h
5. /usr/include/sys/poll.h is not coded to #include <signal.h>
6. gcc doesn'y picks src/rt/signal.h, b/c there is no #include
<signal.h> even if w/ -I.
and I got one of google result:
http://www.mingw.org/wiki/IncludePathHOWTO
maybe, this can be fixed in nvc itself and not so cygwin-related.
sorry for noise.
Peace,
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple