From 30eb28e89e513ba7c04e8424be0cba326a01882b Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 1 Oct 2014 20:47:44 +0200 Subject: libxtrans pixman fontconfig mesa xserver xkeyboard-config git update 1 Oct 2014 plink 10277 xserver commit d3d845ca9e92f0a2ccde93f4242d7769cfe14164 xkeyboard-config commit 73aa90ce32967747c84a1b5fe32cee329bc3bbcf pixman commit f078727f392bc9f235df916e75634ed87177b9b4 libxtrans commit 7cbad9fe2e61cd9d5caeaf361826a6f4bd320f03 fontconfig commit 1082161ea303cf2bbc13b62a191662984131e820 mesa commit 4f7916ab4f8093fa33519dfa3d08e73b4d35ebe3 --- mesalib/src/mesa/main/imports.h | 45 +++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 26 deletions(-) (limited to 'mesalib/src/mesa/main/imports.h') diff --git a/mesalib/src/mesa/main/imports.h b/mesalib/src/mesa/main/imports.h index 59fd19c36..436d1651a 100644 --- a/mesalib/src/mesa/main/imports.h +++ b/mesalib/src/mesa/main/imports.h @@ -377,8 +377,7 @@ _mesa_is_pow_two(int x) static inline int32_t _mesa_next_pow_two_32(uint32_t x) { -#if defined(__GNUC__) && \ - ((__GNUC__ * 100 + __GNUC_MINOR__) >= 304) /* gcc 3.4 or later */ +#ifdef HAVE___BUILTIN_CLZ uint32_t y = (x != 1); return (1 + y) << ((__builtin_clz(x - y) ^ 31) ); #else @@ -396,13 +395,10 @@ _mesa_next_pow_two_32(uint32_t x) static inline int64_t _mesa_next_pow_two_64(uint64_t x) { -#if defined(__GNUC__) && \ - ((__GNUC__ * 100 + __GNUC_MINOR__) >= 304) /* gcc 3.4 or later */ +#ifdef HAVE___BUILTIN_CLZLL uint64_t y = (x != 1); - if (sizeof(x) == sizeof(long)) - return (1 + y) << ((__builtin_clzl(x - y) ^ 63)); - else - return (1 + y) << ((__builtin_clzll(x - y) ^ 63)); + STATIC_ASSERT(sizeof(x) == sizeof(long long)); + return (1 + y) << ((__builtin_clzll(x - y) ^ 63)); #else x--; x |= x >> 1; @@ -423,8 +419,7 @@ _mesa_next_pow_two_64(uint64_t x) static inline GLuint _mesa_logbase2(GLuint n) { -#if defined(__GNUC__) && \ - ((__GNUC__ * 100 + __GNUC_MINOR__) >= 304) /* gcc 3.4 or later */ +#ifdef HAVE___BUILTIN_CLZ return (31 - __builtin_clz(n | 1)); #else GLuint pos = 0; @@ -473,28 +468,33 @@ _mesa_exec_malloc( GLuint size ); extern void _mesa_exec_free( void *addr ); -extern void * -_mesa_realloc( void *oldBuffer, size_t oldSize, size_t newSize ); - #ifndef FFS_DEFINED #define FFS_DEFINED 1 -#ifdef __GNUC__ +#ifdef HAVE___BUILTIN_FFS #define ffs __builtin_ffs -#define ffsll __builtin_ffsll #else extern int ffs(int i); +#endif + +#ifdef HAVE___BUILTIN_FFSLL +#define ffsll __builtin_ffsll +#else extern int ffsll(long long int i); -#endif /*__ GNUC__ */ +#endif #endif /* FFS_DEFINED */ -#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 304) /* gcc 3.4 or later */ +#ifdef HAVE___BUILTIN_POPCOUNT #define _mesa_bitcount(i) __builtin_popcount(i) -#define _mesa_bitcount_64(i) __builtin_popcountll(i) #else extern unsigned int _mesa_bitcount(unsigned int n); +#endif + +#ifdef HAVE___BUILTIN_POPCOUNTLL +#define _mesa_bitcount_64(i) __builtin_popcountll(i) +#else extern unsigned int _mesa_bitcount_64(uint64_t n); #endif @@ -507,7 +507,7 @@ _mesa_bitcount_64(uint64_t n); static inline unsigned int _mesa_fls(unsigned int n) { -#if defined(__GNUC__) && ((__GNUC__ * 100 + __GNUC_MINOR__) >= 304) +#ifdef HAVE___BUILTIN_CLZ return n == 0 ? 0 : 32 - __builtin_clz(n); #else unsigned int v = 1; @@ -537,13 +537,6 @@ _mesa_half_is_negative(GLhalfARB h) return h & 0x8000; } -extern void * -_mesa_bsearch( const void *key, const void *base, size_t nmemb, size_t size, - int (*compar)(const void *, const void *) ); - -extern char * -_mesa_getenv( const char *var ); - extern char * _mesa_strdup( const char *s ); -- cgit v1.2.3