// $Id: GNUC_bugs.htm 119 2004-05-16 00:02:24Z ggs_mburo $ // This is a GGS file, licensed under the GPL GNU C compilation

GNU C compilation

Using Windows?

If you are using windows ODK expects _WIN32 to be defined (to get the correct sockets headers). GNU C may not define that automatically for windows executables, so you may need to include it in the compiler command line (is the command -D _WIN32?)

GNU C bugs

Gunnar had some problems with the header files. I think he was using Red Hat Linux on Windows. I will quote from him:

There were two issues; one of which was a function declared as

  foo( int bar, fdset*, fdset* )

(more or less), after removing "bar" it worked.  This looks like a
bug in the headers - after all, they are designed to work with GCC.

The other problem was that u_int wasn't defined for the particular
combination of satisfied #ifdef conditions in the code.  This one
might be possible to overcome by including some other header file
that is known to declare u_int, or possibly by defining certain
symbols (gcc -D_BSD_SOURCE and something more might do the trick).

[Presumably one could just typedef unsigned int u_int; to solve the second problem. - Chris]