diff --git a/crc16speed.h b/crc16speed.h index 49db646..ffcbb1b 100644 --- a/crc16speed.h +++ b/crc16speed.h @@ -1,5 +1,10 @@ #ifndef CRC16SPEED_H #define CRC16SPEED_H + +#if defined(__cplusplus) +extern "C" { +#endif + #include "crcspeed.h" #include "stdbool.h" @@ -17,4 +22,9 @@ uint16_t crc16speed_big(uint16_t crc, const void *s, const uint64_t l); bool crc16speed_init_native(void); uint16_t crc16speed_native(uint16_t crc, const void *s, const uint64_t l); + +#if defined(__cplusplus) +} +#endif + #endif diff --git a/crc64speed.h b/crc64speed.h index c72cd8f..586d8ef 100644 --- a/crc64speed.h +++ b/crc64speed.h @@ -1,5 +1,10 @@ #ifndef CRC64SPEED_H #define CRC64SPEED_H + +#if defined(__cplusplus) +extern "C" { +#endif + #include "crcspeed.h" #include "stdbool.h" @@ -17,4 +22,9 @@ uint64_t crc64speed_big(uint64_t crc, const void *s, const uint64_t l); bool crc64speed_init_native(void); uint64_t crc64speed_native(uint64_t crc, const void *s, const uint64_t l); + +#if defined(__cplusplus) +} +#endif + #endif diff --git a/crc_simd.h b/crc_simd.h index 629497d..0d6fad2 100644 --- a/crc_simd.h +++ b/crc_simd.h @@ -10,6 +10,10 @@ #ifndef CRC_SIMD_H #define CRC_SIMD_H +#if defined(__cplusplus) +extern "C" { +#endif + #include #include #include @@ -25,4 +29,8 @@ uint64_t crc64_simd(uint64_t crc, const void *data, uint64_t len); void crc16_simd_init(void); uint16_t crc16_simd(uint16_t crc, const void *data, uint64_t len); +#if defined(__cplusplus) +} +#endif + #endif /* CRC_SIMD_H */ diff --git a/crcspeed.h b/crcspeed.h index d7ee95e..71af1b9 100644 --- a/crcspeed.h +++ b/crcspeed.h @@ -28,6 +28,10 @@ #ifndef CRCSPEED_H #define CRCSPEED_H +#if defined(__cplusplus) +extern "C" { +#endif + #include #include @@ -57,4 +61,9 @@ uint16_t crcspeed16big(uint16_t table[8][256], uint16_t crc, void *buf, size_t len); uint16_t crcspeed16native(uint16_t table[8][256], uint16_t crc, void *buf, size_t len); + +#if defined(__cplusplus) +} +#endif + #endif