mrtd and duplicate header file loads

bill stoddart w.j.stoddart@googlemail.com
Sun Dec 5 13:58:00 GMT 2010


Problem. When compiling using gcc and the -mrtd switch, two versions of any
included header library file may be loaded, and this generally results
in type errors.

This error was reported in a more specific form by Angel Robert Lynas
back in 2007,
though he only refers to time.h.

Here is an example program, called c1.c say


#include <signal.h>

main() { }


When compiled with gcc -mrtd c1.c the start of the error reports is

In file included from /usr/include/signal.h:5,
                 from c1.c:1:
/usr/include/sys/signal.h:171: error: conflicting types for 'sigwaitinfo'
/usr/include/cygwin/signal.h:265: error: previous declaration of
'sigwaitinfo' was here


So it looks like /usr/include/sys/signal.h has been erroneoulsy
included as well as
/usr/include/cygwin/signal.h

The problem, though present since approx 2007,  is absent from earlier
versions of Cygwin,
 e.g. 1.5.18, July 2005.

Kind Regards

   Bill Stoddart  w dot j dot stoddart at gmail dot com

PS to give some context, this problem has blocked us from porting a
virtual machine research project to
Cygwin, whioch we would still very much like to do. We will take the
__STDCALL route if it cannot be
fixed, but we do love the -mrtd switch.

--
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



More information about the Cygwin mailing list