Consider this patch: int lyx::mkdir(string const & pathname, unsigned long int mode) { // FIXME: why don't we have mode_t in lyx::mkdir prototype ?? +#ifdef _WIN32 + return ::mkdir(pathname.c_str()); +#else return ::mkdir(pathname.c_str(), mode_t(mode)); +#endif }
I guess that configure should generate something like this for a macro MKDIR_HAS_TWO_ARGUMENTS #include <sys/stat.h> #include <sys/types.h> int main() { int const success = mkdir("foo", 0777); return 0; } Is there an autotool-standard way to do this? -- Angus