i am trying to add fsync and fdatasync to the fs library as i need
them for some work i am doing, and they are pretty standard posix
functions so should prolly be fs.js in the long run anyway. everything
works fine on linux but when ryan tried to build on OSX he was getting
issues with deps/libeio/wscript. The issue seems to be that when
configuring on OSX, the wscript for libeio doesn't pick up the fact
that fdatasync is not available and it then breaks when compiling. i
have tried to change the script so it always marks fdatasync as
unavailable when configuring on OSX. All should work fine then, as
there are define tests in the libeio code to alias fdatasync to fsync
on OSX.
clear as mud?
basically, i just need someone to confirm that when configuring on
OSX, fdatasync shows up correctly as not available using this change
to deps/libeio/wscript:
conf.check_cc(msg="Checking for fdatasync(2)",
define_name="HAVE_FDATASYNC", fragment="""
#include <unistd.h>
int main(void)
{
int fd = 0;
#if __APPLE__
//make the application crash
sdskdfjhskjhsdf();
#endif
fdatasync (fd);
return 0;
}
""")
if you could confirm this, then i'll resubmit a full patch to ryan for
the latest node.js release.
Thanks