Mail Archives: djgpp-workers/1999/02/14/12:30:10
On Sun, 14 Feb 1999 Kbwms AT aol DOT com wrote:
> Good point. The difficulties are determining 1) where the fault lies,
> and 2) how to fix the fault. How does one fix a bug that seemingly has
> no observable beginning?
But this problem *does* have a beginning: you look at the header where
the error message points (osfcn.h) and see that it only includes socket.h
if a certain symbol is defined to non-zero. Then you fgrep the entire
tree of the header files and look for a definition of that symbol.
That's how you find the _G_config.h file. This file is obviously a
system-dependent configuration file, and in this case it erroneosly
defines a symbol to be non-zero, which is a clear sign of a bug in the
C++ libraries.
> > No header, either C++ or otherwise, should include sys/socket.h in
> > DJGPP, since sys/socket.h doesn't exist in DJGPP.
>
> Hmmm. Perhaps we ought to toss in a #ifdef __GNUG__ or some such in
> strategic locations to ward off socket.h monsters.
No, __GNUG__ is defined by the GNU C++ compiler on every platform, not
only in DJGPP. Most of the other platforms *do* have socket.h.
- Raw text -