[wplug] Very strange problem

Rafael E. Herrera raffo at neuronet.pitt.edu
Sat Aug 3 16:49:49 EDT 2002


Hagbard Celine wrote:
>>>If the path is `/usr/include/netinet/ip.h', and I do a `#include <netinet/ip.h>'
>>>to get at it (i.e. the standard stuff), the missing defines I know about are
>>
>>The path is just '/usr/include'. If you use:
>>
>>#include <netinet/ip.h>
>>
>>the C pre-processor will try to find the file 
>>`/usr/include/netinet/ip.h'. Then,
>>
>>#include <netinet/ip.h>
>>#include <ip.h>
>>
>>could be two different files, so it's up to you to determine what and 
>>how you need to include.
> 
> Seems there's another condition...
> 
> I had a `netinet' directory at the same level as traceroute.c.  It contained
> some headers that came along with traceroute-4.4BSD, including `ip.h'.  On a
> whim, I named it out of the way, whereupon, my errors changed.  From this, I
> conclude that the C preprossesor first tries to include `./netinet/ip.h'!
> 
> I'm not sure why this is, given the `#include "foo.h"' form...
> 
> I'm still using gcc-2.95.3, in case you are wondering.

Look at your compile lines, if it contains '-I.', then the preprocessor 
will look for headers in the current working directory, also.

-- 
      Rafael




More information about the wplug mailing list