diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/ChangeLog | 8 | ||||
| -rw-r--r-- | lib/eu-config.h | 11 |
2 files changed, 19 insertions, 0 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog index d04bf172..720c98df 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -73,6 +73,9 @@ 2009-01-23 Roland McGrath <[email protected]> + * eu-config.h [! HAVE_BUILTIN_POPCOUNT] + (__builtin_popcount): New inline function. + * eu-config.h: Add multiple inclusion protection. 2009-01-17 Ulrich Drepper <[email protected]> @@ -129,6 +132,11 @@ * Makefile.am (libeu_a_SOURCES): Add it. * system.h: Declare crc32_file. +2005-02-07 Roland McGrath <[email protected]> + + * Makefile.am (WEXTRA): New variable, substituted by configure. + (AM_CFLAGS): Use it in place of -Wextra. + 2005-04-30 Ulrich Drepper <[email protected]> * Makefile.am: Use -ffunction-sections for xmalloc.c. diff --git a/lib/eu-config.h b/lib/eu-config.h index 400cdc6e..88cac670 100644 --- a/lib/eu-config.h +++ b/lib/eu-config.h @@ -163,6 +163,17 @@ asm (".section predict_data, \"aw\"; .previous\n" /* This macro is used by the tests conditionalize for standalone building. */ #define ELFUTILS_HEADER(name) <lib##name.h> +#ifndef HAVE_BUILTIN_POPCOUNT +# define __builtin_popcount hakmem_popcount +static inline unsigned int __attribute__ ((unused)) +hakmem_popcount (unsigned int x) +{ + /* HAKMEM 169 */ + unsigned int n = x - ((x >> 1) & 033333333333) - ((x >> 2) & 011111111111); + return ((n + (n >> 3)) & 030707070707) % 63; +} +#endif /* HAVE_BUILTIN_POPCOUNT */ + #ifdef SYMBOL_VERSIONING # define OLD_VERSION(name, version) \ |
