What's wrong with [the Word importer part of] the FreeBSD build


Subject: What's wrong with [the Word importer part of] the FreeBSD build
From: James Montgomerie (jamie@montgomerie.net)
Date: Tue Jun 06 2000 - 18:27:32 CDT


I think I've figured out what's wrong in the FreeBSD
build, (to do with the error I've attached below, from
Tinderbox).

wv declares it's own getopt() routine, and it seems to
conflict with the BSD one. This wasn't a problem
before, because there were no points at which we used
the old one. It now /does/ matter, because glib.h (part
of the 'system' on the BSD machine) includes getopt.h
from within the importer part of the abi tree, but gets
wv's getopt.h instead of the system wide one. This
re-declaration conflicts with then declaration of
getopt() seemingly in unistd.h, also included in by
something in the abi tree, and the build fails.

We should be able to fix it by moving (renaming) the
getopt.h in the wv directory to be getopt-wv.h and
changing getopt.c (and also the mysterious getopt1.c) to
reference it appropriately. We don't actually use wv's
getopt() (it's used by wvHtml and wvConvert) so we
should have no further problems.

That should (I hope) be a simple change for someone with
CVS access to make.

Jamie.

---

In file included from /var/tmp/sterwill/work/tbscripts/FreeBSD_3.4-STABLE_clobber/abi/../wv/config.h:68, from /var/tmp/sterwill/work/tbscripts/FreeBSD_3.4-STABLE_clobber/abi/../wv/wv.h:18, from ie_imp_MsWord_97.h:26, from ie_imp.cpp:31: /var/tmp/sterwill/work/tbscripts/FreeBSD_3.4-STABLE_clobber/abi/../wv/getopt.h:108: declaration of C function `int getopt()' conflicts with /usr/include/unistd.h:111: previous declaration `int getopt(int, char *const *, const char *)' here In file included from /usr/local/include/glib12/glib.h:66, from /var/tmp/sterwill/work/tbscripts/FreeBSD_3.4-STABLE_clobber/abi/../wv/libole2/ms-ole.h:13, from /var/tmp/sterwill/work/tbscripts/FreeBSD_3.4-STABLE_clobber/abi/../wv/wv.h:20, from ie_imp_MsWord_97.h:26, from ie_imp.cpp:31:

----------------------------------------------------- This mail sent through IMP: http://web.horde.org/imp/



This archive was generated by hypermail 2b25 : Tue Jun 06 2000 - 18:27:31 CDT