# include "config.h"
#endif
+#include <errno.h>
+#include <fcntl.h>
+#ifndef __WIN32__
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <unistd.h>
+
#include "wimlib.h"
+#include "wimlib/assert.h"
+#include "wimlib/bitops.h"
#include "wimlib/dentry.h"
#include "wimlib/encoding.h"
#include "wimlib/file_io.h"
#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 */
#endif
-#include <errno.h>
-#include <fcntl.h>
-#ifndef __WIN32__
-# include <langinfo.h>
-#endif
-#include <stdlib.h>
-#include <unistd.h>
-
static int
wim_default_pack_compression_type(void)
{
/* 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;
if (imd->root_dentry || imd->modified) {
ret = 0;
} else {
- ret = read_metadata_resource(wim, imd);
+ ret = read_metadata_resource(imd);
if (ret)
wim->current_image = WIMLIB_NO_IMAGE;
}
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;