[wplug] Very strange problem

Dave Neuer mr_fred_smoothie at yahoo.com
Fri Aug 2 22:15:55 EDT 2002


Aha.

Following Rafael's hint, I tried cpp (the c
pre-processor, which actually executes the #<whatever>
directives), and lo-and-behold (on my system):

sh-2.05a$ cpp -v
Reading specs from
/usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/specs
gcc version 2.95.3 20010315 (release)
<snip>
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
/usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/../../../../i686-pc-linux-gnu/include
/usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/include
/usr/include
End of search list.
<snip>

So, if you run 'cpp -v', you may get a clue as to why
the first try (#include <netinet/ip.h>) didn't work.
Most likely, you have a messed up version of it in one
of the other default include directories.

The "#include <...> starts here" section is about half
way through the output.

The only other caveat to running 'cpp -v' is that it
calls wait4(-1, ...) to wait for its children to exit,
but has no children, so it'll hang until you kill it
(Ctrl-C).

Dave

--- Dave Neuer <mr_fred_smoothie at yahoo.com> wrote:
> #include <netinet/ip.h> is the canonical form,
> unless
> your system has some wacky idea about the standard
> include path.
> 
> Which, I'm not sure how to determine; gcc
> -print-search-dirs will show you where is looks for
> libraries, but not header files (on unix it's
> traditionally been /usr/include, but there's
> probably
> a way to specify it when building gcc; if that's
> messed up, then it makes sense that you'd have
> problems).
> 
> Dave
> 
> --- Hagbard Celine <hceline at softhome.net> wrote:
> > I tried `#include "/usr/include/netinet/ip.h"',
> > and...
> > 
> > Son of a Cocker Spaniel, if it didn't work!!
> > 
> > Okay, I suppose the next question is:  Where do
> the
> > angle brackets get expanded
> > to the include path?  Perhaps something went bufu
> in
> > the specification of the
> > include path?
> > 
> > Hagbard
> > > 
> > > you could always try specifying an abslute path
> to
> > ip.h
> > > 
> > > sounds to me like maybe there's another
> > netinet/ip.h path on your sys that's being used? 
> > not likely, but it sure sounds like it--and the
> one
> > it's using doesn't have those things def'd.  could
> > be why renaming it to something unique--while
> still
> > in the same relative path spec--results in proper
> > inclusion.  might be something to try.
> > > 
> > > #include </usr/include/netinet/ip.h
> > > _______________________________________________
> > > wplug mailing list
> > > wplug at wplug.org
> > > http://www.wplug.org/mailman/listinfo/wplug
> > > 
> > 
> > _______________________________________________
> > wplug mailing list
> > wplug at wplug.org
> > http://www.wplug.org/mailman/listinfo/wplug
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com



More information about the wplug mailing list