Hi John, Very nice work you did !
On Sun, 2008-02-24 at 09:23 +0000, john wrote: > I'm now trying to tie up a few loose ends, and one thing I couldn't sort > out was an error when trying to build the socket extensions for Ruby - one > the functions that they use is h_errno; the code compiles cleanly, but > when it comes to linking the final binary it falls over with an undefined > reference to "__h_errno_location". I can't find this symbol anywhere. Well, when you say "sockets" and "Windows" then you need to think winsock. Combine this with the fact that "errno" is a posix thing which Windows API doesn't support, and here we are. That said, I'm sure we can get through this. Usually when people use sockets/winsock, the better thing to do is to replace all use of errno by the winsock equivalent WSAGetLastError(). An example of how to do such things is in the tools/errno directory of our SVN : Pedro built a small errno emulation library there. It also contains a function static char *strwinerror (char* buf, DWORD error) which you can use as sample code to write something similar to the gai_strerror function that you miss. One more point : in our sources, there's also a gai_strerror function. That's in the newlib part of our source tree; in the linux subdirectory. This code doesn't get installed for CE; we probably need to fix netdb.h so it doesn't publish this function. From your blog, it looks like ruby comes with some of the same files (e.g. getaddrinfo.c is in src/newlib/newlib/libc/sys/linux/net/getaddrinfo.c in our tree). Danny -- Danny Backx ; danny.backx - at - scarlet.be ; http://danny.backx.info ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Cegcc-devel mailing list Cegcc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cegcc-devel