From 62a5b4d5c6d5c368d190b86eab63ccb07d642c01 Mon Sep 17 00:00:00 2001 From: Hib Eris Date: Sun, 14 Apr 2013 16:37:14 +0200 Subject: Check for strcpy_s() and strcat_s() at configure time It is better to test for functions than to hardcode exceptions for specific compilers. This fixes compiling poppler with the latest mingw-w64 compiler which has strcpy_s() and strcat_s() build in. Bug #63459 --- test/perf-test.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/perf-test.cc b/test/perf-test.cc index 21fbdeed..cb97bcf1 100644 --- a/test/perf-test.cc +++ b/test/perf-test.cc @@ -1,5 +1,5 @@ /* Copyright Krzysztof Kowalczyk 2006-2007 - Copyright Hib Eris 2008 + Copyright Hib Eris 2008, 2013 License: GPLv2 */ /* A tool to stress-test poppler rendering and measure rendering times for @@ -325,7 +325,7 @@ void sleep_milliseconds(int milliseconds) #endif } -#ifndef _MSC_VER +#ifndef HAVE_STRCPY_S void strcpy_s(char* dst, size_t dst_size, const char* src) { size_t src_size = strlen(src) + 1; @@ -338,7 +338,9 @@ void strcpy_s(char* dst, size_t dst_size, const char* src) } } } +#endif +#ifndef HAVE_STRCAT_S void strcat_s(char *dst, size_t dst_size, const char* src) { size_t dst_len = strlen(dst); -- cgit v1.2.3