+int xxopen(tfc_yesno noerr, const char *pathname, int flags)
+{
+ int r;
+
+ if ((flags & O_WRONLY || flags & O_RDWR)) {
+ if (read_only == YES) flags = O_RDONLY;
+ else flags |= write_flags;
+ }
+
+ flags |= O_LARGEFILE;
+ r = open(pathname, flags, 0666);
+ if (noerr == NO && r == -1) xerror(NO, NO, YES, "%s", pathname);
+ return r;
+}
+
+int xopen(const char *pathname, int flags)
+{
+ return xxopen(NO, pathname, flags);
+}
+