Declare supplement prototypes conditionally

It should be declared for the case missing, or may be mismatched with builtin.

Signed-off-by: OBATA Akio <obache@wizdas.com>
pull/37/head
OBATA Akio 5 years ago committed by TDE Gitea
parent 0009cb8171
commit 0031121f7e

@ -16,6 +16,8 @@ test_big_endian(WORDS_BIGENDIAN)
tde_setup_largefiles( ) tde_setup_largefiles( )
check_symbol_exists( strlcpy "string.h" HAVE_STRLCPY_PROTO )
check_symbol_exists( strlcat "string.h" HAVE_STRLCAT_PROTO )
##### check for gcc visibility support ######### ##### check for gcc visibility support #########

@ -49,6 +49,11 @@
#cmakedefine HAVE_LIBXSS 1 #cmakedefine HAVE_LIBXSS 1
// mimelib // mimelib
#cmakedefine HAVE_STRLCPY_PROTO
#cmakedefine HAVE_STRLCAT_PROTO
#if !defined(HAVE_STRLCPY_PROTO)
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -56,7 +61,9 @@ unsigned long strlcpy(char*, const char*, unsigned long);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif
#if !defined(HAVE_STRLCAT_PROTO)
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -64,3 +71,4 @@ unsigned long strlcat(char*, const char*, unsigned long);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif

Loading…
Cancel
Save