summaryrefslogtreecommitdiff
path: root/lib/count-one-bits.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/count-one-bits.h')
-rw-r--r--lib/count-one-bits.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/count-one-bits.h b/lib/count-one-bits.h
index 78770e4240d..eea56d85910 100644
--- a/lib/count-one-bits.h
+++ b/lib/count-one-bits.h
@@ -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. */
@@ -129,6 +133,10 @@ 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
#endif /* COUNT_ONE_BITS_H */