Multiple changes for better *BSD compatibility, including:
authorDerrik Pates <demon@now.ai>
Fri, 24 Jun 2011 13:36:53 +0000 (07:36 -0600)
committerDerrik Pates <demon@now.ai>
Fri, 24 Jun 2011 13:36:53 +0000 (07:36 -0600)
commit0c5b7a0ebd205c613eb1f80ee0a79e4843294071
tree6d493715a4a2987cb7fac7dae55db812ea194dea
parent3bdd22cf0cf94b4feb0646a45f64bc8c7abfc792
Multiple changes for better *BSD compatibility, including:

- For OS X/Darwin, use alternate function argument lists that add an
  extra parameter for the setxattr() and getxattr() call wrappers. This
  eliminates some compile-time warnings, and makes sure the call stack
  isn't getting unbalanced when those calls are made.
- For OS X/Darwin, force the use of -lfuse_ino64 on OS X 10.6 (Snow
  Leopard); FUSE filesystems won't work at all otherwise due to changes
  in the inode structure definition, and the pkgconfig files don't check
  for this.
- For OS X/Darwin, don't set the PERL_DL_NONLAZY=1 environment variable
  during "make test"; MacFuse builds their libfuse with a reference to
  _iconv, but doesn't link in -liconv at build time, and due to
  differences in their dynamic linker, linking -liconv into our library
  doesn't get that symbol into its namespace, so tests fail completely
  on OS X due to the unsatisfied link symbol when RTLD_NOW is passed to
  dlopen().
- Enabled alternate mknod handling for NetBSD and OS X/Darwin in
  addition to FreeBSD in the example code.
- Synchronized all changes (except enabling threading) from
  examples/loopback_t.pl to examples/loopback.pl.
- Reenabled threading use for OS X/Darwin in tests; testing on my
  MacBook running OS X 10.6.7 always passes with it enabled (though
  does not with threading disabled, which probably needs some
  diagnosing).
- In the mknod() test, use a different major number shift value (24
  instead of 8) for OS X/Darwin.
- In the statfs() test, use sys/syscall.ph instead of syscall.ph (works
  on Linux and all *BSDs, though NetBSD and OS X/Darwin perls don't h2ph
  the system headers at install time).
- In the statfs() test, altered the Linux pack mask for the statfs()
  syscall, added masks for FreeBSD and OS X/Darwin, and added statvfs1()
  call semantics for NetBSD, so this test will work on all supported
  platforms (though the FreeBSD pack mask may not work on non-64bit
  FreeBSDs, need to test that).
- In the statfs() test, ignore f_namelen field for NetBSD and
  OS X/Darwin. OS X/Darwin doesn't even have such a field, and NetBSD
  seems to not handle it right for PUFFS filesystems.
- In the symlink() test, use 'cp -R' on NetBSD instead of 'cp -a', since
  NetBSD's 'cp' doesn't know the '-a' option.
Fuse.xs
Makefile.PL
examples/loopback.pl
examples/loopback_t.pl
test/helper.pm
test/mknod.t
test/statfs.t
test/symlink.t