]> wimlib.net Git - wimlib/blob - include/wimlib/win32.h
f0f99cc7cf2bc2680c1a5cdf2f86bd3a5dc789f9
[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 read_blob_callbacks;
14 struct windows_file;
15
16 extern struct windows_file *
17 clone_windows_file(const struct windows_file *file);
18
19 extern void
20 free_windows_file(struct windows_file *file);
21
22 extern int
23 cmp_windows_files(const struct windows_file *file1,
24                   const struct windows_file *file2);
25
26 extern int
27 read_windows_file_prefix(const struct blob_descriptor *blob, u64 size,
28                          const struct read_blob_callbacks *cbs);
29
30 extern int
31 win32_global_init(int init_flags);
32
33 extern void
34 win32_global_cleanup(void);
35
36 extern int
37 fsync(int fd);
38
39 extern tchar *
40 realpath(const tchar *path, tchar *resolved_path);
41
42 extern int
43 win32_rename_replacement(const tchar *oldpath, const tchar *newpath);
44
45 extern int
46 win32_truncate_replacement(const tchar *path, off_t size);
47
48 extern int
49 win32_strerror_r_replacement(int errnum, tchar *buf, size_t buflen);
50
51 extern FILE *
52 win32_open_logfile(const wchar_t *path);
53
54 extern ssize_t
55 win32_read(int fd, void *buf, size_t count);
56
57 extern ssize_t
58 win32_write(int fd, const void *buf, size_t count);
59
60 extern ssize_t
61 win32_pread(int fd, void *buf, size_t count, off_t offset);
62
63 extern ssize_t
64 win32_pwrite(int fd, const void *buf, size_t count, off_t offset);
65
66 #endif /* __WIN32__ */
67
68 #endif /* _WIMLIB_WIN32_H */