fixed checking for strlcat/strlcpy
newer clang uses a definition rather than a function
This commit is contained in:
parent
e71b85867f
commit
178c4a9eaa
|
@ -417,8 +417,9 @@ AC_FUNC_VPRINTF
|
||||||
AC_CHECK_FUNCS([ \
|
AC_CHECK_FUNCS([ \
|
||||||
getpass gettimeofday getline memset mkdir \
|
getpass gettimeofday getline memset mkdir \
|
||||||
strdup strerror memset_s explicit_bzero \
|
strdup strerror memset_s explicit_bzero \
|
||||||
strlcpy strlcat strnlen sigaction
|
strnlen sigaction
|
||||||
])
|
])
|
||||||
|
AC_CHECK_DECLS([strlcpy, strlcat], [], [], [[#include <string.h>]])
|
||||||
AC_CHECK_SIZEOF(void *)
|
AC_CHECK_SIZEOF(void *)
|
||||||
if test "${ac_cv_sizeof_void_p}" = 8; then
|
if test "${ac_cv_sizeof_void_p}" = 8; then
|
||||||
LIBRARY_BITNESS="64"
|
LIBRARY_BITNESS="64"
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_STRLCAT
|
#if !defined(HAVE_DECL_STRLCAT) || !HAVE_DECL_STRLCAT
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
|
@ -10,9 +10,11 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_STRLCAT
|
#if !defined(HAVE_DECL_STRLCAT) || !HAVE_DECL_STRLCAT
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
size_t strlcat(char *dst, const char *src, size_t siz);
|
size_t strlcat(char *dst, const char *src, size_t siz);
|
||||||
|
#else
|
||||||
|
#include <string.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_STRLCPY /* empty file if strlcpy is available */
|
#if !defined(HAVE_DECL_STRLCPY) || !HAVE_DECL_STRLCPY
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
|
@ -38,9 +38,11 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_STRLCPY
|
#if !defined(HAVE_DECL_STRLCPY) || !HAVE_DECL_STRLCPY
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
size_t strlcpy(char *dst, const char *src, size_t siz);
|
size_t strlcpy(char *dst, const char *src, size_t siz);
|
||||||
|
#else
|
||||||
|
#include <string.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue