diff options
author | Xavier Roche <xroche@users.noreply.github.com> | 2014-06-08 09:35:34 +0000 |
---|---|---|
committer | Xavier Roche <xroche@users.noreply.github.com> | 2014-06-08 09:35:34 +0000 |
commit | 4608b62e2ef90e36d8ede40d4d09a550d15ea873 (patch) | |
tree | b740c1c99370d61e607993682ebb0c600cbab13d /src/htssafe.h | |
parent | 3f1e6ac8cd1dc1ab32b9008038460d71825e262c (diff) |
Fixed __cplusplus issues
Diffstat (limited to 'src/htssafe.h')
-rw-r--r-- | src/htssafe.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/htssafe.h b/src/htssafe.h index 329d12a..d0d6c2a 100644 --- a/src/htssafe.h +++ b/src/htssafe.h @@ -33,6 +33,14 @@ Please visit our Website: http://www.httrack.com #ifndef HTSSAFE_DEFH #define HTSSAFE_DEFH +#ifdef __cplusplus +extern "C" { +#endif + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> + #include "htsglobal.h" /** @@ -91,7 +99,7 @@ static HTS_UNUSED void abortf_(const char *exp, const char *file, int line) { /** * Check wether 'VAR' is of type char[]. */ -#ifdef __GNUC__ +#if (defined(__GNUC__) && !defined(__cplusplus)) /* Note: char[] and const char[] are compatible */ #define HTS_IS_CHAR_BUFFER(VAR) ( __builtin_types_compatible_p ( typeof (VAR), char[] ) ) #else @@ -199,4 +207,8 @@ static HTS_INLINE HTS_UNUSED char* strcpy_safe_(char *const dest, const size_t s #define realloct(A,B) realloc(A, B) #define memcpybuff(A, B, N) memcpy((A), (B), (N)) +#ifdef __cplusplus +} +#endif + #endif |