]> wimlib.net Git - wimlib/blob - include/wimlib/win32.h
v1.14.4
[wimlib] / include / wimlib / win32.h
1 /*
2  * win32.h - Windows-specific declarations needed by non-Windows-specific files.
3  */
4
5 #ifndef _WIMLIB_WIN32_H
6 #define _WIMLIB_WIN32_H
7
8 #ifdef _WIN32
9
10 #include "wimlib/types.h"
11
12 struct blob_descriptor;
13 struct consume_chunk_callback;
14 struct windows_file;
15
16 struct windows_file *
17 clone_windows_file(const struct windows_file *file);
18
19 void
20 free_windows_file(struct windows_file *file);
21
22 int
23 cmp_windows_files(const struct windows_file *file1,
24                   const struct windows_file *file2);
25
26 int
27 read_windows_file_prefix(const struct blob_descriptor *blob, u64 size,
28                          const struct consume_chunk_callback *cb,
29                          bool recover_data);
30
31 int
32 win32_global_init(int init_flags);
33
34 void
35 win32_global_cleanup(void);
36
37 int
38 fsync(int fd);
39
40 tchar *
41 realpath(const tchar *path, tchar *resolved_path);
42
43 int
44 win32_rename_replacement(const tchar *oldpath, const tchar *newpath);
45
46 int
47 win32_truncate_replacement(const tchar *path, off_t size);
48
49 int
50 win32_strerror_r_replacement(int errnum, tchar *buf, size_t buflen);
51
52 FILE *
53 win32_open_logfile(const wchar_t *path);
54
55 ssize_t
56 win32_read(int fd, void *buf, size_t count);
57
58 ssize_t
59 win32_write(int fd, const void *buf, size_t count);
60
61 ssize_t
62 win32_pread(int fd, void *buf, size_t count, off_t offset);
63
64 ssize_t
65 win32_pwrite(int fd, const void *buf, size_t count, off_t offset);
66
67 #endif /* _WIN32 */
68
69 #endif /* _WIMLIB_WIN32_H */