]> wimlib.net Git - wimlib/blob - src/win32.h
Misc. fixes
[wimlib] / src / win32.h
1 #ifndef _WIMLIB_WIN32_H
2 #define _WIMLIB_WIN32_H
3
4 #include "wimlib_internal.h"
5 #include <direct.h>
6 #include <windef.h>
7
8 extern int
9 win32_build_dentry_tree(struct wim_dentry **root_ret,
10                         const tchar *root_disk_path,
11                         struct wim_lookup_table *lookup_table,
12                         struct wim_inode_table *inode_table,
13                         struct sd_set *sd,
14                         const struct wimlib_capture_config *config,
15                         int add_image_flags,
16                         wimlib_progress_func_t progress_func,
17                         void *extra_arg);
18
19 extern int
20 win32_read_file(const tchar *filename, HANDLE handle,
21                 u64 offset, size_t size, void *buf);
22
23 extern int
24 read_win32_file_prefix(const struct wim_lookup_table_entry *lte,
25                        u64 size,
26                        consume_data_callback_t cb,
27                        void *ctx_or_buf,
28                        int _ignored_flags);
29
30 extern int
31 read_win32_encrypted_file_prefix(const struct wim_lookup_table_entry *lte,
32                                  u64 size,
33                                  consume_data_callback_t cb,
34                                  void *ctx_or_buf,
35                                  int _ignored_flags);
36
37 #define FNM_PATHNAME 0x1
38 #define FNM_NOESCAPE 0x2
39 #define FNM_NOMATCH 1
40 extern int
41 fnmatch(const tchar *pattern, const tchar *string, int flags);
42
43 extern int
44 win32_do_apply_dentry(const tchar *output_path,
45                       size_t output_path_nbytes,
46                       struct wim_dentry *dentry,
47                       struct apply_args *args);
48
49 extern int
50 win32_do_apply_dentry_timestamps(const tchar *output_path,
51                                  size_t output_path_nbytes,
52                                  const struct wim_dentry *dentry,
53                                  const struct apply_args *args);
54
55 extern int
56 fsync(int fd);
57
58 extern unsigned
59 win32_get_number_of_processors();
60
61 extern tchar *
62 realpath(const tchar *path, tchar *resolved_path);
63
64 typedef enum {
65         CODESET
66 } nl_item;
67
68 extern int
69 win32_rename_replacement(const tchar *oldpath, const tchar *newpath);
70
71 extern int
72 win32_truncate_replacement(const tchar *path, off_t size);
73
74 extern void
75 win32_global_init();
76
77 extern void
78 win32_global_cleanup();
79
80 extern int
81 win32_strerror_r_replacement(int errnum, tchar *buf, size_t buflen);
82
83 #endif /* _WIMLIB_WIN32_H */