1.1 --- a/librazor/razor-internal.h Sat Feb 11 23:50:26 2012 +0000
1.2 +++ b/librazor/razor-internal.h Mon Feb 20 19:30:23 2012 +0000
1.3 @@ -123,6 +123,7 @@
1.4 struct array details_string_pool;
1.5 struct razor_mapped_file *mapped_files;
1.6 int lock_fd, ref_count;
1.7 + enum razor_set_flags flags;
1.8 };
1.9
1.10 struct import_entry {
1.11 @@ -214,7 +215,9 @@
1.12 int razor_remove(const char *path);
1.13 int razor_write(int fd, const void *data, size_t size);
1.14
1.15 -void *razor_file_get_contents(const char *filename, size_t *length);
1.16 +void *
1.17 +razor_file_get_contents(const char *filename, size_t *length, int private,
1.18 + struct razor_error **error);
1.19 int razor_file_free_contents(void *addr, size_t length);
1.20
1.21
1.22 @@ -251,13 +254,17 @@
1.23
1.24 #ifdef MSWIN_API
1.25 struct razor_error *razor_error_new_mswin(const wchar_t *path, DWORD error);
1.26 -#endif
1.27 +struct razor_error *razor_error_new_str2(const wchar_t *path, const char *str);
1.28
1.29 -#if HAVE_WINDOWS_KTM
1.30 -struct razor_error *razor_error_new_str(const wchar_t *path, const char *str);
1.31 -#else
1.32 -struct razor_error *razor_error_new_str(const char *path, const char *str);
1.33 -#endif
1.34 +#define razor_set_error_mswin(error, path, err) \
1.35 + if (error) \
1.36 + *(error) = razor_error_new_mswin(path, err); \
1.37 + else
1.38 +#define razor_set_error2(error, path, str) \
1.39 + if (error) \
1.40 + *(error) = razor_error_new_str2(path, str); \
1.41 + else
1.42 +#endif /* MSWIN_API */
1.43
1.44 /* Atomic functions */
1.45