#define ZERO_ARRAY(array) memset(array, 0, sizeof(array))
/* Used for buffering FILE IO in a few places */
-#define BUFFER_SIZE 4096
+#define BUFFER_SIZE 32768
static inline void FORMAT(printf, 1, 2)
dummy_tprintf(const tchar *format, ...)
# define ERROR(format, ...) wimlib_error(T(format), ## __VA_ARGS__)
# define ERROR_WITH_ERRNO(format, ...) wimlib_error_with_errno(T(format), ## __VA_ARGS__)
# define WARNING(format, ...) wimlib_warning(T(format), ## __VA_ARGS__)
-# define WARNING_WITH_ERRNO(format, ...) wimlib_warning(T(format), ## __VA_ARGS__)
+# define WARNING_WITH_ERRNO(format, ...) wimlib_warning_with_errno(T(format), ## __VA_ARGS__)
#else /* ENABLE_ERROR_MESSAGES */
# define ERROR(format, ...) dummy_tprintf(T(format), ## __VA_ARGS__)
# define ERROR_WITH_ERRNO(format, ...) dummy_tprintf(T(format), ## __VA_ARGS__)
return n * 0x9e37fffffffc0001ULL;
}
+typedef int filedes_t;
+
+extern size_t
+full_read(filedes_t fd, void *buf, size_t n);
+
+extern size_t
+full_write(filedes_t fd, const void *buf, size_t n);
+
+extern size_t
+full_pread(filedes_t fd, void *buf, size_t nbyte, off_t offset);
+
+extern size_t
+full_pwrite(filedes_t fd, const void *buf, size_t count, off_t offset);
+
+#ifdef __WIN32__
+struct iovec {
+ void *iov_base;
+ size_t iov_len;
+};
+#else
+struct iovec;
+#endif
+
+
+extern size_t
+full_writev(int fd, struct iovec *iov, int iovcnt);
+
+extern off_t
+filedes_offset(filedes_t fd);
+
+#define INVALID_FILEDES (-1)
+
#endif /* _WIMLIB_UTIL_H */