diff -r 6112bcc5d1cf -r 2e896ad9754b librazor/razor-internal.h --- a/librazor/razor-internal.h Sat Feb 11 23:50:26 2012 +0000 +++ b/librazor/razor-internal.h Fri Feb 17 18:35:10 2012 +0000 @@ -123,6 +123,7 @@ struct array details_string_pool; struct razor_mapped_file *mapped_files; int lock_fd, ref_count; + enum razor_set_flags flags; }; struct import_entry { @@ -214,7 +215,9 @@ int razor_remove(const char *path); int razor_write(int fd, const void *data, size_t size); -void *razor_file_get_contents(const char *filename, size_t *length); +void * +razor_file_get_contents(const char *filename, size_t *length, int private, + struct razor_error **error); int razor_file_free_contents(void *addr, size_t length); @@ -251,13 +254,17 @@ #ifdef MSWIN_API struct razor_error *razor_error_new_mswin(const wchar_t *path, DWORD error); -#endif +struct razor_error *razor_error_new_str2(const wchar_t *path, const char *str); -#if HAVE_WINDOWS_KTM -struct razor_error *razor_error_new_str(const wchar_t *path, const char *str); -#else -struct razor_error *razor_error_new_str(const char *path, const char *str); -#endif +#define razor_set_error_mswin(error, path, err) \ + if (error) \ + *(error) = razor_error_new_mswin(path, err); \ + else +#define razor_set_error2(error, path, str) \ + if (error) \ + *(error) = razor_error_new_str2(path, str); \ + else +#endif /* MSWIN_API */ /* Atomic functions */