/* for Windows */
flags |= O_BINARY;
#endif
+ /* some systems can't handle a double / */
+ if (pathname[0] == '/' && pathname[1] == '/') pathname++;
+
return open(pathname, flags, mode);
}
{
if (dry_run) return NULL;
if (read_only) {errno = EROFS; return NULL;}
+
+ /* TODO: Replace this with a good builtin mkstemp, perhaps
+ * from OpenBSD. Some glibc versions are buggy. */
return mktemp(template);
}