]> wimlib.net Git - wimlib/blobdiff - src/reparse.c
security.c: Rewrite some code
[wimlib] / src / reparse.c
index 133603976f1bfc53d59e6b0e5bc0682f7ca49984..766736d473dc6955ef0a00372dbc2f46f6bf378a 100644 (file)
@@ -1,7 +1,5 @@
 /*
- * reparse.c
- *
- * Handle reparse data.
+ * reparse.c - Handle reparse data.
  */
 
 /*
  * along with wimlib; if not, see http://www.gnu.org/licenses/.
  */
 
-#include "dentry.h"
-#include "buffer_io.h"
-#include "lookup_table.h"
-#include "sha1.h"
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
+#include "wimlib/assert.h"
+#include "wimlib/buffer_io.h"
+#include "wimlib/dentry.h"
+#include "wimlib/encoding.h"
+#include "wimlib/error.h"
+#include "wimlib/lookup_table.h"
+#include "wimlib/reparse.h"
+#include "wimlib/resource.h"
+
+#ifdef __WIN32__
+#  include "wimlib/win32.h" /* for win32_get_file_and_vol_ids() */
+#endif
+
+#ifdef HAVE_ALLOCA_H
+#  include <alloca.h>
+#endif
 #include <errno.h>
+#include <stdlib.h>
 
 static const utf16lechar volume_junction_prefix[11] = {
        cpu_to_le16('\\'),
@@ -315,10 +330,6 @@ out_have_link:
        return ret;
 }
 
-#ifdef HAVE_ALLOCA_H
-#  include <alloca.h>
-#endif
-
 int
 wim_inode_set_symlink(struct wim_inode *inode,
                      const char *target,
@@ -447,7 +458,6 @@ unix_get_ino_and_dev(const char *path, u64 *ino_ret, u64 *dev_ret)
 #endif /* !defined(__WIN32__) */
 
 #ifdef __WIN32__
-#  include "win32.h"
 #  define RP_PATH_SEPARATOR L'\\'
 #  define is_rp_path_separator(c) ((c) == L'\\' || (c) == L'/')
 #  define os_get_ino_and_dev win32_get_file_and_vol_ids