4 messages in net.sourceforge.lists.courier-usersRe: [courier-users] trouble compiling...
FromSent OnAttachments
PetroMay 14, 2000 11:40 pm 
PetroMay 15, 2000 9:53 pm 
PetroMay 15, 2000 10:49 pm 
PetroMay 16, 2000 12:00 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] trouble compiling Courier on OPENBSD machine.Actions...
From:Petro (pet@bounty.org)
Date:May 15, 2000 10:49:12 pm
List:net.sourceforge.lists.courier-users

On Mon, 15 May 2000, Petro wrote:

This apparently changes things to "Deferred function binding". Is this going to cause a problem?

Yes. RTLD_NOW is the exact opposite of RTLD_LAZY:

flag must be either RTLD_LAZY, meaning resolve undefined symbols as code from the dynamic library is executed, or RTLD_NOW, meaning resolve all undefined symbols before dlopen returns, and fail if this cannot be done.

Hmmm -- this seems to imply that either RTLD_LAZY or RTLD_NOW must be set. Maybe in freebsd simply the absence of RTLD_LAZY is sufficient to force RTLD_NOW behavior. In that case RTLD_NOW can simply be #defined to 0.

#ifndef RTLD_NOW #define RTLD_NOW 0 #endif

But the question is whether this is the right thing to do.

Hmmm... Ok. I put the above in soxwrap.c and restarted the compile.

That compiled just fine, but the build died when compiling courier/libs/comstatfs.c with the error sys/statfs.h no such fie or directory.

With OpenBSD you need to include <sys/param.h> and <sys/mount.h> instead of <sys/statfs.h>.

I changed: #if HAVE_STATFS #include <sys/statfs.h> #define DOIT

To: #if HAVE_STATFS #include <sys/param.h> #include <sys/mount.h> #define DOIT

And it (at least that portion) seems to compile OK.

Is there any way that the compiler can check to see what the OS is so that I could do something like:

#if HAVE_STATFS #if IS_OPENBSD #include <sys/param.h> #include <sys/mount.h> #else #include <sys/statfs.h> #endif #define DOIT #endif

Or am I completely barking up the wrong tree?