aboutsummaryrefslogtreecommitdiff
path: root/gnulib/import/count-one-bits.h
diff options
context:
space:
mode:
Diffstat (limited to 'gnulib/import/count-one-bits.h')
-rw-r--r--gnulib/import/count-one-bits.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/gnulib/import/count-one-bits.h b/gnulib/import/count-one-bits.h
index 0056994..eea56d8 100644
--- a/gnulib/import/count-one-bits.h
+++ b/gnulib/import/count-one-bits.h
@@ -1,5 +1,5 @@
/* count-one-bits.h -- counts the number of 1-bits in a word.
- Copyright (C) 2007-2019 Free Software Foundation, Inc.
+ Copyright (C) 2007-2020 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -30,6 +30,10 @@ _GL_INLINE_HEADER_BEGIN
# define COUNT_ONE_BITS_INLINE _GL_INLINE
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Expand to code that computes the number of 1-bits of the local
variable 'x' of type TYPE (an unsigned integer type) and return it
from the current function. */
@@ -122,13 +126,15 @@ count_one_bits_l (unsigned long int x)
COUNT_ONE_BITS (__builtin_popcountl, __popcnt, unsigned long int);
}
-#if HAVE_UNSIGNED_LONG_LONG_INT
/* Compute and return the number of 1-bits set in X. */
COUNT_ONE_BITS_INLINE int
count_one_bits_ll (unsigned long long int x)
{
COUNT_ONE_BITS (__builtin_popcountll, __popcnt64, unsigned long long int);
}
+
+#ifdef __cplusplus
+}
#endif
_GL_INLINE_HEADER_END