On Mon, 2011-11-28 at 12:33 -0500, Ted Ts'o wrote:
> On Sun, Nov 27, 2011 at 10:27:48PM -0500, Ted Ts'o wrote:
> > > Additionally, the call to msync() is made conditional on HAVE_MSYNC
> > > instead of MS_SYNC by a test in configure.in for that function. On
> > > GNU/Hurd msync() is only a stub, so with this test a potential run-time
> > > error is avoided.
> 
> Wait a second --- do you mean that msync() doesn't exist, but it
> exists but is a no-op?

MC_SYNC is defined in /usr/include/i386-gnu/bits/mman.h on GNU/Hurd, so
the test for that succeeds.

> If it's the latter ("is only a stub"), then adding a check for
> HAVE_MSYNC won't help, because configure will check for the stub, find
> it, and come to the wrong conclusion.

Checking for HAVE_MSYNC helps because configure finds the stub and
decides it is not usable, see below.

.../eglibc-2.13/sysdeps/mach/msync.c:

/* Some Mach variants have vm_msync and some don't.  Those that have it
   define the VM_SYNC_* bits when we include <mach/mach_types.h>.  */

#ifndef VM_SYNC_SYNCHRONOUS
# include <misc/msync.c>
#else
...
#endif

.../eglibc-2.13/misc/msync.c
int
msync (__ptr_t addr, size_t len, int flags)
{
  __set_errno (ENOSYS);
  return -1;
}

stub_warning (msync)
#include <stub-tag.h>





-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to