Refactor headers
[wimlib] / src / ntfs-3g_apply.c
similarity index 96%
rename from src/ntfs-apply.c
rename to src/ntfs-3g_apply.c
index 0297e72..0ec4702 100644 (file)
@@ -1,9 +1,9 @@
 /*
- * ntfs-apply.c
+ * ntfs-3g_apply.c
  *
- * Apply a WIM image to a NTFS volume.  Restore as much information as possible,
- * including security data, file attributes, DOS names, and alternate data
- * streams.
+ * Apply a WIM image directly to a NTFS volume using libntfs-3g.  Restore as
+ * much information as possible, including security data, file attributes, DOS
+ * names, and alternate data streams.
  */
 
 /*
  * along with wimlib; if not, see http://www.gnu.org/licenses/.
  */
 
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
 
-#include "config.h"
+#ifdef WITH_NTFS_3G
 
-#include <ntfs-3g/endians.h>
-#include <ntfs-3g/types.h>
-
-#include "wimlib_internal.h"
-#include "buffer_io.h"
-#include "dentry.h"
-#include "lookup_table.h"
+#include <locale.h>
+#include <string.h>
+#include <time.h> /* NTFS-3g headers are missing <time.h> include */
 
 #include <ntfs-3g/attrib.h>
-#include <ntfs-3g/security.h> /* security.h before xattrs.h */
+#include <ntfs-3g/endians.h>
 #include <ntfs-3g/reparse.h>
+#include <ntfs-3g/security.h>
+#include <ntfs-3g/types.h>
 #include <ntfs-3g/xattrs.h>
-#include <string.h>
-#include <locale.h>
+
+#include "wimlib/apply.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/metadata.h"
+#include "wimlib/ntfs_3g.h"
+#include "wimlib/reparse.h"
+#include "wimlib/security.h"
 
 struct ntfs_attr_extract_ctx {
        u64 offset;
@@ -672,7 +682,9 @@ apply_dentry_timestamps_ntfs(struct wim_dentry *dentry, void *arg)
 }
 
 void
-libntfs3g_global_init()
+libntfs3g_global_init(void)
 {
        ntfs_set_char_encoding(setlocale(LC_ALL, ""));
 }
+
+#endif /* WITH_NTFS_3G */