X-Git-Url: https://wimlib.net/git/?a=blobdiff_plain;f=src%2Fwim.c;h=1c0e6efdf96ae5576b53de16161973010535ffef;hb=53b75051f0e9cde007101eeca37cbe3884e03f18;hp=8422d9e10b3d5b9dec5442317106b84f48930a75;hpb=69f07a55f05919a15ff1ec77b963b48f5f6a5d04;p=wimlib diff --git a/src/wim.c b/src/wim.c index 8422d9e1..1c0e6efd 100644 --- a/src/wim.c +++ b/src/wim.c @@ -24,6 +24,8 @@ #endif #include "wimlib.h" +#include "wimlib/assert.h" +#include "wimlib/bitops.h" #include "wimlib/dentry.h" #include "wimlib/encoding.h" #include "wimlib/file_io.h" @@ -36,7 +38,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 */ @@ -96,7 +97,7 @@ wim_chunk_size_valid(u32 chunk_size, int ctype) /* Chunk size must be power of 2. */ if (chunk_size == 0) return false; - order = bsr32(chunk_size); + order = fls32(chunk_size); if (chunk_size != 1U << order) return false; @@ -916,7 +917,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;