Commit ad46db9add5bb5d8190f8d0eba4372f1fe6faa8a

Authored by blueswir1
1 parent 807d5170

Rename fls to qemu_fls

Fix compiler warning on OSX, reported by Andreas Faerber.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5982 c046a42c-6fe2-441c-8c8c-71466251a162
cutils.c
@@ -97,7 +97,7 @@ time_t mktimegm(struct tm *tm) @@ -97,7 +97,7 @@ time_t mktimegm(struct tm *tm)
97 return t; 97 return t;
98 } 98 }
99 99
100 -int fls(int i) 100 +int qemu_fls(int i)
101 { 101 {
102 return 32 - clz32(i); 102 return 32 - clz32(i);
103 } 103 }
hw/virtio.c
@@ -858,7 +858,7 @@ VirtIODevice *virtio_init_pci(PCIBus *bus, const char *name, @@ -858,7 +858,7 @@ VirtIODevice *virtio_init_pci(PCIBus *bus, const char *name,
858 858
859 size = 20 + config_size; 859 size = 20 + config_size;
860 if (size & (size-1)) 860 if (size & (size-1))
861 - size = 1 << fls(size); 861 + size = 1 << qemu_fls(size);
862 862
863 pci_register_io_region(pci_dev, 0, size, PCI_ADDRESS_SPACE_IO, 863 pci_register_io_region(pci_dev, 0, size, PCI_ADDRESS_SPACE_IO,
864 virtio_map); 864 virtio_map);
qemu-common.h
@@ -104,7 +104,7 @@ char *pstrcat(char *buf, int buf_size, const char *s); @@ -104,7 +104,7 @@ char *pstrcat(char *buf, int buf_size, const char *s);
104 int strstart(const char *str, const char *val, const char **ptr); 104 int strstart(const char *str, const char *val, const char **ptr);
105 int stristart(const char *str, const char *val, const char **ptr); 105 int stristart(const char *str, const char *val, const char **ptr);
106 time_t mktimegm(struct tm *tm); 106 time_t mktimegm(struct tm *tm);
107 -int fls(int i); 107 +int qemu_fls(int i);
108 108
109 #define qemu_isalnum(c) isalnum((unsigned char)(c)) 109 #define qemu_isalnum(c) isalnum((unsigned char)(c))
110 #define qemu_isalpha(c) isalpha((unsigned char)(c)) 110 #define qemu_isalpha(c) isalpha((unsigned char)(c))