Refactor headers
[wimlib] / src / ntfs-3g_capture.c
similarity index 96%
rename from src/ntfs-capture.c
rename to src/ntfs-3g_capture.c
index 5c46504..256e249 100644 (file)
@@ -1,8 +1,8 @@
 /*
- * ntfs-capture.c
+ * ntfs-3g_capture.c
  *
- * Capture a WIM image from a NTFS volume.  We capture everything we can,
- * including security data and alternate data streams.
+ * Capture a WIM image directly from a NTFS volume using libntfs-3g.  We capture
+ * everything we can, including security data and alternate data streams.
  */
 
 /*
  */
 
 
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
 
-#include <ntfs-3g/endians.h>
-#include <ntfs-3g/types.h>
+#ifdef WITH_NTFS_3G
 
-#include "buffer_io.h"
-#include "dentry.h"
-#include "lookup_table.h"
-#include "security.h"
-#include "wimlib_internal.h"
+#ifdef HAVE_ALLOCA_H
+#  include <alloca.h>
+
+#endif
+#include <errno.h>
+#include <stdlib.h>
+#include <time.h> /* NTFS-3g headers are missing <time.h> include */
+#include <unistd.h>
 
-#include <ntfs-3g/layout.h>
-#include <ntfs-3g/acls.h>
 #include <ntfs-3g/attrib.h>
+#include <ntfs-3g/endians.h>
+#include <ntfs-3g/layout.h>
 #include <ntfs-3g/misc.h>
 #include <ntfs-3g/reparse.h>
 #include <ntfs-3g/security.h> /* ntfs-3g/security.h before ntfs-3g/xattrs.h */
-#include <ntfs-3g/xattrs.h>
+#include <ntfs-3g/types.h>
 #include <ntfs-3g/volume.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
+#include <ntfs-3g/xattrs.h>
 
-#ifdef HAVE_ALLOCA_H
-#include <alloca.h>
-#endif
+#include <ntfs-3g/acls.h> /* This should be included last as it requires
+                            definitions from above not included by itself */
+
+#include "wimlib/buffer_io.h"
+#include "wimlib/capture.h"
+#include "wimlib/dentry.h"
+#include "wimlib/encoding.h"
+#include "wimlib/error.h"
+#include "wimlib/lookup_table.h"
+#include "wimlib/ntfs_3g.h"
+#include "wimlib/paths.h"
+#include "wimlib/security.h"
 
 static inline ntfschar *
 attr_record_name(ATTR_RECORD *ar)
@@ -777,3 +788,4 @@ out:
        }
        return ret;
 }
+#endif /* WITH_NTFS_3G */