Coda File System

Coda for Darwin/MacOS X needs configure patch + kludges for resolver?

From: Stephen J. Turnbull <>
Date: Fri, 06 Aug 2004 18:10:34 +0900
Christer, should I CC posts like this to darwincoda, or should I
assume that everybody on darwincoda is going to be on codalist, too?

If you say "yes", I'll take responsibility for summarizing any posts
in this thread that don't make it to darwincoda.

>>>>> "Christer" == Christer Bernérus <> writes:

    Christer> I have finally managed to set up an open-source project
    Christer> for the development of the Kernel extension, and
    Christer> possibly other software that are specific for the
    Christer> Darwin/Mac OS X platform.

OK, I've successfully built your kernel module, but haven't had the
nerve to actually _load_ it yet.  ;-)  Didn't see anything interesting
in the XCode log windows.

For userspace, I had a bit of wrestling to do with libtool.  There's a
--no-verify (for the platform spec) switch to ltconfig, and Fink's
version of ltconfig (details on request) wants explicit specification
of the platform with it.  I just deleted it by hand from the configure
script, it seems to be autobogosified (not part of

Then configure.  On Mac OS X Panther, <netinet/in.h> does not #include
<sys/types.h>, although all of Coda's callers evidently do.  In
configure, for some reason in.h itself doesn't cause problems, but
then the attempt to find resolv.h, which depends on in.h, chokes when
including in.h.  Eventually this leads to a failure to compile
lib-src/base/coda_getaddrinfo.c.  NB: Probably that file needs
conditioning on HAVE_RESOLV_H, but that's more than I have time for.

This patch gets configure to do the right thing, and I would guess
it's TheRightThang to put in Coda, too.

RCS file: /coda-src/coda/,v
retrieving revision 4.116
diff -u -r4.116
---	14 Jul 2004 20:52:46 -0000	4.116
+++	6 Aug 2004 08:20:43 -0000
@@ -92,6 +92,7 @@
 AC_CHECK_HEADERS(resolv.h, [], [],
+#include <sys/types.h>
 #include <netinet/in.h>

Next, it seems that Panther defaults to BIND 9 in a separate library,
libresolv, but supplies old functions in the main libc.  So configure
decides that no extra library is needed.  I think the right thing to
do is to not use AC_CHECK_FUNCS for res_init(), but instead test it
separately and make sure to include <sys/types.h>, <netinet/in.h>, and
<resolv.h> when trying the link.  But I'm not up to that much autoconf
hacking today.  :-p  I just added a sprinkling of -lresolv to various
link commands (specifically, to the LIBS definitions in the Makefiles
in coda-src/auth2 and coda-src/venus).

    Christer> Developers who wish to contribute are more than welcome.

I wish I had more time, but at least I'll be building and (hopefully)
testing it ....

Institute of Policy and Planning Sciences
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.
Received on 2004-08-06 05:12:39