g_open is a macro that evaluates to ::open on linux(and mac) so this
is only a change for windows.
#include <cassert>
#include <cstdio>
+#include <glib.h>
+#include <glib/gstdio.h>
+
#ifdef __APPLE__
#include <mach/mach_time.h>
#endif
{
/* we must have a lock on the FileManager's mutex */
- _fd = ::open (_path.c_str(), _writeable ? (O_RDWR | O_CREAT) : O_RDONLY, _mode);
+ _fd = ::g_open (_path.c_str(), _writeable ? (O_RDWR | O_CREAT) : O_RDONLY, _mode);
return (_fd == -1);
}