Description |
We do some silly zoology checks, with rules like: "if the kernel is not Linux, Windows, NetBSD or Solaris, assume there is no fdatasync()" (Windows doesn't have it either, but is handled differently). This is hardly ever right.
For example, this just broke on Debian kfreebsd and on Hurd, as gcc-4.7 (the new default) detects linkage conflicts. It used to work before because old compilers would arbitrarily use either the C version from <unistd.h> or our C++-decorated stub from "syscalls.h", and both were present during link.
Debian's kfreebsd (an official supported architecture) has FreeBSD kernel with GNU userland, so obviously kernel checks are incorrect. Hurd (which might possibly become a "technology preview") is not on the list of platforms that have fdatasync() as well.
All this could be fixed by a compile check.
Not sure how to implement it in our makefile, though -- and it needs to be fixed in 0.10, too. |