Get rid of wimlib/version.h
authorEric Biggers <ebiggers3@gmail.com>
Sun, 14 Dec 2014 04:38:18 +0000 (22:38 -0600)
committerEric Biggers <ebiggers3@gmail.com>
Sun, 14 Dec 2014 04:43:31 +0000 (22:43 -0600)
Makefile.am
include/wimlib/version.h [deleted file]
src/wim.c

index a9846de..edfb187 100644 (file)
@@ -131,7 +131,6 @@ libwim_la_SOURCES =         \
        include/wimlib/unaligned.h      \
        include/wimlib/unix_data.h      \
        include/wimlib/util.h           \
-       include/wimlib/version.h        \
        include/wimlib/wildcard.h       \
        include/wimlib/wim.h            \
        include/wimlib/write.h          \
diff --git a/include/wimlib/version.h b/include/wimlib/version.h
deleted file mode 100644 (file)
index 42deaa6..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef _WIMLIB_VERSION_H
-#define _WIMLIB_VERSION_H
-
-#include "wimlib.h"
-
-#define WIMLIB_MAKEVERSION(major, minor, patch) \
-       ((major << 20) | (minor << 10) | patch)
-
-
-#define WIMLIB_VERSION_CODE \
-               WIMLIB_MAKEVERSION(WIMLIB_MAJOR_VERSION,\
-                                  WIMLIB_MINOR_VERSION,\
-                                  WIMLIB_PATCH_VERSION)
-
-#define WIMLIB_GET_PATCH_VERSION(version) \
-       ((version >> 0) & ((1 << 10) - 1))
-#define WIMLIB_GET_MINOR_VERSION(version) \
-       ((version >> 10) & ((1 << 10) - 1))
-#define WIMLIB_GET_MAJOR_VERSION(version) \
-       ((version >> 20) & ((1 << 10) - 1))
-
-#endif /* _WIMLIB_VERSION_H */
index 51fc1f0..880fa7e 100644 (file)
--- a/src/wim.c
+++ b/src/wim.c
@@ -37,7 +37,6 @@
 #include "wimlib/security.h"
 #include "wimlib/wim.h"
 #include "wimlib/xml.h"
-#include "wimlib/version.h"
 
 #ifdef __WIN32__
 #  include "wimlib/win32.h" /* for realpath() replacement */
@@ -917,7 +916,9 @@ test_locale_ctype_utf8(void)
 WIMLIBAPI u32
 wimlib_get_version(void)
 {
-       return WIMLIB_VERSION_CODE;
+       return (WIMLIB_MAJOR_VERSION << 20) |
+              (WIMLIB_MINOR_VERSION << 10) |
+               WIMLIB_PATCH_VERSION;
 }
 
 static bool lib_initialized = false;