delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/02/14/12:30:10

Date: Sun, 14 Feb 1999 19:28:39 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Kbwms AT aol DOT com
cc: djgpp-workers AT delorie DOT com
Subject: Re: socket.h
In-Reply-To: <f55af92.36c6ea6b@aol.com>
Message-ID: <Pine.SUN.3.91.990214192413.8710H-100000@is>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019