]> wimlib.net Git - wimlib/blob - include/wimlib/win32.h
write.c: Build up chunk offsets array in little-endian format
[wimlib] / include / wimlib / win32.h
1 #ifndef _WIMLIB_WIN32_H
2 #define _WIMLIB_WIN32_H
3
4 #ifdef __WIN32__
5
6 #include "wimlib/callback.h"
7 #include "wimlib/types.h"
8 #include <direct.h>
9 #include <windef.h>
10
11 struct wim_lookup_table_entry;
12 struct iovec;
13
14 extern int
15 read_win32_file_prefix(const struct wim_lookup_table_entry *lte,
16                        u64 size,
17                        consume_data_callback_t cb,
18                        void *ctx_or_buf,
19                        int _ignored_flags);
20
21 extern int
22 read_win32_encrypted_file_prefix(const struct wim_lookup_table_entry *lte,
23                                  u64 size,
24                                  consume_data_callback_t cb,
25                                  void *ctx_or_buf,
26                                  int _ignored_flags);
27
28
29 extern void
30 win32_global_init(void);
31
32 extern void
33 win32_global_cleanup(void);
34
35 #define FNM_PATHNAME 0x1
36 #define FNM_NOESCAPE 0x2
37 #define FNM_NOMATCH 1
38 extern int
39 fnmatch(const tchar *pattern, const tchar *string, int flags);
40
41 extern int
42 fsync(int fd);
43
44 extern unsigned
45 win32_get_number_of_processors(void);
46
47 extern tchar *
48 realpath(const tchar *path, tchar *resolved_path);
49
50 typedef enum {
51         CODESET
52 } nl_item;
53
54 extern int
55 win32_rename_replacement(const tchar *oldpath, const tchar *newpath);
56
57 extern int
58 win32_truncate_replacement(const tchar *path, off_t size);
59
60 extern int
61 win32_strerror_r_replacement(int errnum, tchar *buf, size_t buflen);
62
63 extern int
64 win32_get_file_and_vol_ids(const wchar_t *path, u64 *ino_ret, u64 *dev_ret);
65
66
67 extern ssize_t
68 pread(int fd, void *buf, size_t count, off_t offset);
69
70 extern ssize_t
71 pwrite(int fd, const void *buf, size_t count, off_t offset);
72
73 extern ssize_t
74 writev(int fd, const struct iovec *iov, int iovcnt);
75
76 #endif /* __WIN32__ */
77
78 #endif /* _WIMLIB_WIN32_H */