]> git.proxmox.com Git - qemu.git/blobdiff - cutils.c
Add map client retry notification (Avi Kivity)
[qemu.git] / cutils.c
index 9ef2fa627cfba9d78c12ed406f491b2e09ef6334..9617e083c6434e0b2bccef3d8a6493ee68a13818 100644 (file)
--- a/cutils.c
+++ b/cutils.c
@@ -22,6 +22,7 @@
  * THE SOFTWARE.
  */
 #include "qemu-common.h"
+#include "host-utils.h"
 
 void pstrcpy(char *buf, int buf_size, const char *str)
 {
@@ -72,7 +73,7 @@ int stristart(const char *str, const char *val, const char **ptr)
     p = str;
     q = val;
     while (*q != '\0') {
-        if (toupper(*p) != toupper(*q))
+        if (qemu_toupper(*p) != qemu_toupper(*q))
             return 0;
         p++;
         q++;
@@ -95,3 +96,8 @@ time_t mktimegm(struct tm *tm)
     t += 3600 * tm->tm_hour + 60 * tm->tm_min + tm->tm_sec;
     return t;
 }
+
+int qemu_fls(int i)
+{
+    return 32 - clz32(i);
+}