summaryrefslogtreecommitdiff
path: root/lib/count-one-bits.c
Commit message (Collapse)AuthorAgeFilesLines
* Put LGPLv2+ notices in source files where appropriate.Bruno Haible2021-06-041-0/+18
| | | | | * lib/**.{h,c,gperf}: Use LGPLv2+ notice whenever the module description says so.
* count-one-bits: port to MSC; support types wider than 64 bitsPaul Eggert2013-10-071-0/+4
| | | | | | | | | | | | | | The ideas behind the MSC port are stolen from Emacs. * lib/count-one-bits.c (popcount_support) [_MSC_VER]: New variable. * lib/count-one-bits.h: Include limits.h, for CHAR_BIT. Don't include verify.h: it's no longer needed, as types wider than 64 bits are now supported. (COUNT_ONE_BITS_GENERIC): New macro. (popcount_supported) [_MSC_VER]: New inline function. (COUNT_ONE_BITS): Use it. New arg MSC_BUILTIN, for better performance with MSC. All uses changed. Do not assume that TYPE has at most 64 bits. * modules/count-one-bits (Depends-on): Do not depend on 'verify'.
* count-one-bits: better 'inline'Paul Eggert2012-11-291-0/+3
* lib/count-one-bits.c: New file. * lib/count-one-bits.h (COUNT_ONE_BITS_INLINE): New macro. Replace all uses of 'static inline' with it. Use _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END. * m4/count-one-bits.m4 (gl_COUNT_ONE_BITS): Do not require AC_C_INLINE. * modules/count-one-bits (Files, lib_SOURCES): Add lib/count-one-bits.c. (Depends-on): Add extern-inline.