]> wimlib.net Git - wimlib/commitdiff
Header and ifdef fixes
authorEric Biggers <ebiggers3@gmail.com>
Thu, 22 Nov 2012 02:29:35 +0000 (20:29 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Thu, 22 Nov 2012 02:29:35 +0000 (20:29 -0600)
programs/imagex.c
src/modify.c
src/wimlib.h
src/wimlib_internal.h
src/write.c

index 61a93fbef260e509120f702d36b3f70b1472f156..2547b0789d3efc3aa3e355470934516426bb9e73 100644 (file)
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
-#include "wimlib.h"
 #include "config.h"
+
+#include "wimlib.h"
+
+#include <errno.h>
 #include <getopt.h>
-#include <stdlib.h>
-#include <stdarg.h>
 #include <glob.h>
-#include <string.h>
-#include <errno.h>
+#include <inttypes.h>
 #include <libgen.h>
 #include <limits.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
 #include <sys/stat.h>
 #include <unistd.h>
-#include <inttypes.h>
 
 #define ARRAY_LEN(array) (sizeof(array) / sizeof(array[0]))
 
 #define for_opt(c, opts) while ((c = getopt_long_only(argc, (char**)argv, "", \
                                opts, NULL)) != -1)
 
-
 enum imagex_op_type {
        APPEND,
        APPLY,
@@ -610,7 +611,6 @@ static int imagex_apply(int argc, const char **argv)
                        goto out;
        }
 
-#ifdef WITH_NTFS_3G
        struct stat stbuf;
 
        ret = stat(target, &stbuf);
@@ -627,7 +627,6 @@ static int imagex_apply(int argc, const char **argv)
                        goto out;
                }
        }
-#endif
 
        ret = wimlib_extract_image(w, image, target, extract_flags,
                                   additional_swms, num_additional_swms,
@@ -733,7 +732,6 @@ static int imagex_capture_or_append(int argc, const char **argv)
        if (ret != 0)
                goto out;
 
-#ifdef WITH_NTFS_3G
        struct stat stbuf;
 
        ret = stat(source, &stbuf);
@@ -750,7 +748,7 @@ static int imagex_capture_or_append(int argc, const char **argv)
                        goto out;
                }
        }
-#endif
+
        ret = wimlib_add_image(w, source, name, config_str, config_len,
                               add_image_flags, imagex_progress_func);
 
index 3403eb323720a9fda7e10306bdeee27834eabf81..ee6edb17f2e66e81a861f6aabcc67e4f5854e692 100644 (file)
@@ -983,8 +983,8 @@ WIMLIBAPI int wimlib_add_image(WIMStruct *w, const char *source,
                capture_tree = build_dentry_tree_ntfs;
                extra_arg = &w->ntfs_vol;
 #else
-               ERROR("wimlib was compiled without support for NTFS-3g, so");
-               ERROR("we cannot capture a WIM image directly from a NTFS volume");
+               ERROR("wimlib was compiled without support for NTFS-3g, so\n"
+                     "        cannot capture a WIM image directly from a NTFS volume!");
                return WIMLIB_ERR_UNSUPPORTED;
 #endif
        } else {
index 1957f6bad090bd7fbbd81bb39f3c9409ab3b9ae4..6033576be6489d96823e9757c150dede40958a9f 100644 (file)
@@ -530,6 +530,7 @@ union wimlib_progress_info {
 typedef int (*wimlib_progress_func_t)(enum wimlib_progress_msg msg_type,
                                      const union wimlib_progress_info *info);
 
+
 /*****************************
  * WIMLIB_ADD_IMAGE_FLAG_*   *
  *****************************/
index b0a0aa29e5e9ab8d7790f24a8209c8478160b312..ac35c4fc5e00ba0b19601e0a84126a600481a8c6 100644 (file)
@@ -31,6 +31,8 @@
 #include "util.h"
 #include "list.h"
 
+#include "wimlib.h"
+
 #ifdef WITH_FUSE
 #include <pthread.h>
 #endif
@@ -39,8 +41,6 @@ struct stat;
 struct dentry;
 struct inode;
 
-#include "wimlib.h"
-
 #define WIM_MAGIC_LEN  8
 #define WIM_GID_LEN    16
 #define WIM_UNUSED_LEN 60
@@ -259,7 +259,7 @@ struct image_metadata {
 #define WIMLIB_RESOURCE_FLAG_RECOMPRESS                0x4
 
 /* The opaque structure exposed to the wimlib API. */
-typedef struct WIMStruct {
+struct WIMStruct {
 
        /* A pointer to the file indicated by @filename, opened for reading. */
        FILE *fp;
@@ -310,7 +310,7 @@ typedef struct WIMStruct {
 
        /* %true iff any images have been deleted from this WIM. */
        bool deletion_occurred;
-} WIMStruct;
+};
 
 
 /* Inline utility functions for WIMStructs. */
index a08bc8503a6c5a57f908ab7f535787205fe3fded..b143f16d7dc4de001a0e3e2b2cd01b248ffcd593 100644 (file)
 #ifdef ENABLE_MULTITHREADED_COMPRESSION
 #include <semaphore.h>
 #include <pthread.h>
-#include <errno.h>
 #endif
 
+#include <errno.h>
+
 #ifdef WITH_NTFS_3G
 #include <time.h>
 #include <ntfs-3g/attrib.h>