[sword-devel] FreeBSD, installmgr & namespace

Willem van Engen sword-devel@crosswire.org
Thu, 19 Feb 2004 23:41:00 +0100

This is a multi-part message in MIME format.

Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit


I've been trying to get sword-1.5.7 to compile on FreeBSD, but I just
can't get it done. When compiling installmgr.cpp, it says:

  In file included from /usr/include/sys/stat.h:50,
                   from ../include/filemgr.h:25,
                   from ../src/mgr/installmgr.cpp:16:
  /usr/include/sys/time.h:156: field `tc_nanotime' has incomplete type

and the same message about st_[amc]timespec in sys/stat.h. After having
given up on it several times, I finally have an idea what it's cause is.
See attachment for a stripped file that shows the problem. time.h is
included (from ftpparse.h) inside the sword namespace. When sys/time.h
is included later on outside the sword namespace, things like time_t are
not known there, but the #define's that do their magic inside the header
files are still defined and think it's already done.

I can get around it by replacing time_t by long and including time.h in

I see a comment before the ftpparse #include directive in installmgr.h:
// move this include to cpp once struct ftpparse isn't exposed anymore
It should be solved when this is done. I might take some time to look
into it, but I'm not overly familiar with the plusses in c++.

- Willem

Content-Type: text/x-c++src;
Content-Disposition: attachment;
Content-Transfer-Encoding: base64