diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2020-02-21 12:41:33 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2020-02-21 12:42:16 -0800 |
commit | e22cd2677a4b7beacbf30b93bb0559f7b89f96ce (patch) | |
tree | aed67225ea38b3a5d84e9096d3bbc1fc5c323e5d /lib/count-leading-zeros.h | |
parent | 0f0a5c9951916002dcb59fc99d227c5eb6eeed0f (diff) | |
download | gnulib-e22cd2677a4b7beacbf30b93bb0559f7b89f96ce.tar.gz |
Add ‘extern "C"’ to count-one-bits.h etc.
This ports these .h files to C++.
Problem reported by Simon Marchi in:
https://lists.gnu.org/r/bug-gnulib/2020-02/msg00110.html
* lib/count-leading-zeros.h, lib/count-one-bits.h:
* lib/count-trailing-zeros.h: Add ‘extern "C"’.
Diffstat (limited to 'lib/count-leading-zeros.h')
-rw-r--r-- | lib/count-leading-zeros.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/count-leading-zeros.h b/lib/count-leading-zeros.h index b548754e18..7e88c8cb9d 100644 --- a/lib/count-leading-zeros.h +++ b/lib/count-leading-zeros.h @@ -30,6 +30,10 @@ _GL_INLINE_HEADER_BEGIN # define COUNT_LEADING_ZEROS_INLINE _GL_INLINE #endif +#ifdef __cplusplus +extern "C" { +#endif + /* Assuming the GCC builtin is BUILTIN and the MSC builtin is MSC_BUILTIN, expand to code that computes the number of leading zeros of the local variable 'x' of type TYPE (an unsigned integer type) and return it @@ -108,6 +112,10 @@ count_leading_zeros_ll (unsigned long long int x) unsigned long long int); } +#ifdef __cplusplus +} +#endif + _GL_INLINE_HEADER_END #endif /* COUNT_LEADING_ZEROS_H */ |