| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 
 | Description: add missing implementation of uint64_msbit for i386
 Without this definition, we get a "successful" library build with undefined
 symbols on i386.  We can use the same implementation of this function as on
 x86_64.
Author: Steve Langasek <steve.langasek@ubuntu.com>
Last-Modified: 2018-08-26
Bug-Debian: https://bugs.debian.org/907358
Index: ncbi-vdb/interfaces/cc/gcc/i386/arch-impl.h
===================================================================
--- ncbi-vdb.orig/interfaces/cc/gcc/i386/arch-impl.h
+++ ncbi-vdb/interfaces/cc/gcc/i386/arch-impl.h
@@ -75,6 +75,13 @@ int32_t uint32_msbit ( uint32_t self )
     return -1;
 }
 
+static __inline__
+int32_t uint64_msbit ( uint64_t self )
+{
+    if (self==0) return -1;
+    return 63 - __builtin_clzll ( self );
+}
+
 typedef struct int128_t int128_t;
 struct int128_t
 {
 |