Fix indentation and add #endif comment
Clean up volume capabilities

* Set VOL_CAP_FMT_SPARSE_FILES because OSXFUSE already supports sparse files.

* Set VOL_CAP_FMT_CASE_SENSITIVE because there are FUSE file systems that are
  case-sensitive.

* Set VOL_CAP_FMT_HIDDEN_FILES to allow hidden files on FUSE volumes. In case of
  file system not supporting hidden files or if getattr_x/setattr_x are not
  implemented, nothing happens when "chflags [no]hidden" is called on a file.
  There should be no harm in that.

* Add new capability bits introduced in Mac OS X 10.6 and 10.7 (disabled by
  default).
Fix VOL_CAP_FMT_CASE_SENSITIVE

Clear VOL_CAP_FMT_CASE_SENSITIVE if FUSE_CASE_INSENSITIVE flag is set in
FUSE_INIT.
Mark I/O as done before returning from fuse_vnop_strategy
Disable the KQUEUE feature on Mac OS X 10.6 and later

In Mac OS X 10.5 the file system implementation is responsible for posting
kqueue events. Starting with Mac OS X 10.6 VFS took over that job.
mount_osxfusefs: Fix 64-bit issue in option parsing.

Option parsing worked by passing a generic pointer as argument to
type-specific parse functions. However when the target was not a pointer
but a uint32_t variable, the parsing routine would for 64-bit platforms
write 8 bytes to the location anyway. This means that adjacent data
would be overwritten and in the case of big-endian architectures the
value would be lost.

Fixed by changing the types of variables that are passed as pointers to
the generic parsing function into uintptr_t. This means that they are
exactly as large as a pointer and no further problems should arise.
Introduce new "fat" file system bundle

* Because of some differences in OS X, OSXFUSE comes with individual builds of
  the kernel extension osxfusefs.kext for Mac OS X 10.5, 10.6, and 10.7.
  Previously the installer was responsible for installing the correct build of
  the kernel extension (depending on the currently running version of OS X).

  The "fat" file system bundle includes all these individual builds of the
  kernel extension. The builds are located at:

  osxfusefs.fs/Support/10.[5-8]/osxfusefs.kext

  The load_osxfusefs tool automatically pick the kernel extension matching the
  currently running version of OS X.

  This will make installing and repackaging OSXFUSE much easier. There is just
  one file system bundle package for all versions of OS X. In addition to that,
  upgrading OS X won't have ill effects on OSXFUSE.

* Add new Xcode aggregate target "Helpers" consisting of osxfusefs.fs,
  load_osxfusefs, and mount_osxfusefs
Implement ticket reference counting

Instead of explicitly dropping a ticket decrement its reference count. If the
reference count reaches 0 the ticket is dropped automatically.
Fix interrupt plumbing

This patch fixes several race conditions that could cause memory leaks,
unexpected errors after interrupting a file system operation or trigger kernel
panics.
Merge volume capabilities cleanup of branch osxfuse-2.4
Fix select operation of osxfuse device

Function fuse_device_select implemented the poll interface, which is why it did
not work as expected.

Implementing the "select" operation on the /dev/osxfuse[0-9]+ devices allows
waiting for requests sent from the kernel extension to the user space FUSE
daemon in a very efficient manner while handling other events in the same
thread.

Patch by Thomas Nordin (@nordin)
Clean up kludges

* sizeof(struct fuse_selinfo) should be 24 bytes instead of 32 bytes on i386
  (Mac OS X 10.5 through 10.7)

* Replace "#if __LP64__" with "#ifdef __LP64__"
Unify copyrights
Remove unneeded English localization
Rename sysctls api_(major|minor) abi_(major|minor)
Merge branch 'osxfuse-2.4'
Use prefix FUSE_FSTYPENAME_PREFIX to compute FUSE_FSTYPENAME_MAXLEN
Update FUSE kernel interface to version 7.12

* Lowest suported ABI version is 7.8 (FUSE 2.7.3)

* Add macros "fuse_abi_in" and "fuse_abi_out" to translate FUSE messages
  from/to the kernel to the FUSE ABI version used to communicate with the user
  space daemon.

* Rewrite function fuse_body_audit

* New fetures based on user space notifications have not been implemented.

FUSE ABI 7.9

* Add "blksize" field to struct fuse_attr

  This field allows setting the optimal I/O block size on a per-file basis
  instead of setting it for the whole file system. Respect the per-file I/O
  size in fuse_vnop_read, fuse_vnop_write, and fuse_vnop_strategy.

* Add lk_flags in fuse_lk_in
* Add lock_owner field to fuse_setattr_in, fuse_read_in and fuse_write_in

  We use VFS provided file locking instead.

* New fuse_getattr_in input argument of GETATTR

  At the moment field fh is used only in fuse_vnop_create

* Add file flags field to fuse_read_in and fuse_write_in

  FUSE_WRITE_CACHE is set for fuse_vnop_strategy. We could set the flag for
  every write request, because we are always "guessing" the file handle.

FUSE ABI 7.10

* Add nonseekable open flag

  Non-seekable files are not supported on OS X. This flag is ignored.

FUSE API 7.11

* Add IOCTL message

  Linux FUSE IOCTL flags like FUSE_IOCTL_UNRESTRICTED are not supported on
  OS X. Enabling unrestricted mode by default would result in security
  implications. We don't trust the FUSE file system implementation. Therefore
  fall back on restricted mode.

  - Initialize I/O parameters as encoded in cmd.
  - RETRY from server is not allowed.

* Add unsolicited notification support

  Notification support is not implemented.

* Add POLL message and NOTIFY_POLL notification

  In OS X poll(2) is based on Kernel Queues. poll(2) is already suported for
  local file system changes. To create kernel events in user space use function
  fuse_knote_np.

FUSE ABI 7.12

* Add umask flag to input argument of open, mknod and mkdir

  Umask procesing in user space is not supported and would require a new kludge
  to access vfs_context_proc(context)->p_fd->fd_cmask. Therefore umask is set
  to 0.

* Add notification messages for invalidation of inodes and directory entries

  Notifications are not implemented.
Struct data is needed for fuse_abi_(in|out) in fuse_vnop_open
Implement support for unsolicited notifications

Unsolicited notifications have been introduced in ABI 7.11. The following
notifications are supported:

* FUSE_NOTIFY_INVAL_ENTRY

  Purges "entry" from the vnode name cache and invalidates the vnode attributes
  of the parent directory.

* FUSE_NOTIFY_INVAL_INODE

  Invalidates the vnode's attributes and the specified range of the vnode's
  unified buffer cache (UBC).

Note: Notification FUSE_NOTIFY_POLL is not implemented.