[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.

--Multipart_Thu__19_Feb_2004_23:41:00_+0100_08333770
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Hello,

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
ftpparse.c.

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++.

Regards,
- Willem

--Multipart_Thu__19_Feb_2004_23:41:00_+0100_08333770
Content-Type: text/x-c++src;
 name="installmgr-stripped.cpp"
Content-Disposition: attachment;
 filename="installmgr-stripped.cpp"
Content-Transfer-Encoding: base64

LyoKICogVGhpcyBpcyBpbnN0YWxsbWdyLmNwcAogKi8KIAovLwovLyBpbnN0YWxsbWdyLmggLT4g
c3didWYuaAovLwojaW5jbHVkZSA8c3RkbGliLmg+CgovLwovLyBpbnN0YWxsbWdyLmgKLy8KbmFt
ZXNwYWNlIHN3b3JkIHsgICAgICAgLy9TV09SRF9OQU1FU1BBQ0VfU1RBUlQKCmV4dGVybiAiQyIg
ewojaW5jbHVkZSA8dGltZS5oPgkvLyBmdHBwYXJzZS5oCn0KCn0gLy8gU1dPUkRfTkFNRVNQQUNF
X0VORAoKLy8KLy8gZmlsZW1nci5oCi8vCiNpbmNsdWRlIDxzeXMvc3RhdC5oPgoK

--Multipart_Thu__19_Feb_2004_23:41:00_+0100_08333770--