Ok but in this case would it be possible that I define a coredllex.dll that would implement this errno ? In this case could I just remove the #include_next <errno.h> from existing errno.h and provides implementation ?
So my sample code should compile with something like that : ./arm-mingw32ce-gcc testerrno.c -L/opt/cegcc/arm-wince-cegcc/lib -lcoredllex On Wed, 9 Jul 2008 09:53:42 +0200 (CEST), Vincent Torri <[EMAIL PROTECTED]> wrote: > > Hey, > >> I would like to understand how errno is handled with cegcc and more >> precisely with mingw32ce. > > see: > > http://cegcc.sourceforge.net/docs/using.html > > (at the bottom: "Apparently broken include files") > > regards > > Vincent Torri > >> I know that on ce platforms errno doesn't exist but if I need to build a >> third party library using the native OS libc and using errno how can I > do? >> I always have the option to comment all the errno occurences in the code >> but is there another option ? >> >> Another thing I don't understand is that in >> /opt/mingw32ce/arm-mingw32ce/include there is a errno.h so in which case >> this define is used ? >> For instance let's take this simple code : >> >> int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR > lpCmdLine, >> int nCmdShow) >> { >> int i = 22; >> } >> >> when compiling it with mingw32ce : ./arm-mingw32ce-gcc testerrno.c >> I get an error from compiler testerrno.c:4: error: expected ')' before >> 'hInstance' >> >> That's normal because windows stuff is unknow so when I add the good >> defines it works fine: >> >> >> // Adding missing include >> #include <windows.h> >> >> int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR > lpCmdLine, >> int nCmdShow) >> { >> int i = 22; >> } >> >> >> >> So now if I add a test with errno like this : >> >> // Adding missing include >> #include <windows.h> >> #include <errno.h> >> >> int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR > lpCmdLine, >> int nCmdShow) >> { >> int i = 22; >> >> errno = 0; >> } >> >> >> $ ./arm-mingw32ce-gcc testerrno.c >> In file included from testerrno.c:2: >> > /opt/mingw32ce/lib/gcc/arm-mingw32ce/4.1.0/../../../../arm-mingw32ce/include/errno.h:12:25: >> error: no include path in which to search for errno.h >> testerrno.c: In function 'WinMain': >> testerrno.c:8: error: 'errno' undeclared (first use in this function) >> testerrno.c:8: error: (Each undeclared identifier is reported only once >> testerrno.c:8: error: for each function it appears in.) >> >> >>> From what I understand compiler cannot even find the include errno.h > BUT >> errno.h exists in the same folder as windows.h >> (/opt/mingw32ce/arm-mingw32ce/include). >> So why it can find windows.h and not errno.h ???? >> >> >> >> >> >> >> >> >> > ------------------------------------------------------------------------- >> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! >> Studies have shown that voting for your favorite open source project, >> along with a healthy diet, reduces your potential for chronic lameness >> and boredom. Vote Now at http://www.sourceforge.net/community/cca08 >> _______________________________________________ >> Cegcc-devel mailing list >> Cegcc-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/cegcc-devel >> >> ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 _______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel