When compiling poppler with the latest mingw-w64 compiler it fails with: [ 320s] CXX perf-test.o [ 321s] perf-test.cc: In function 'void strcpy_s(char*, size_t, const char*)': [ 321s] perf-test.cc:329:58: error: new declaration 'void strcpy_s(char*, size_t, const char*)' [ 321s] void strcpy_s(char* dst, size_t dst_size, const char* src) [ 321s] ^ [ 321s] In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/_mingw.h:13:0, [ 321s] from /usr/i686-w64-mingw32/sys-root/mingw/include/windows.h:9, [ 321s] from perf-test.cc:24: [ 321s] /usr/i686-w64-mingw32/sys-root/mingw/include/sec_api/string_s.h:28:3: error: ambiguates old declaration 'errno_t strcpy_s(char*, size_t, const char*)' [ 321s] __CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_0_2_(errno_t,strcpy_s,char,,_Dst,size_t,,_SizeInBytes,const char *,,_Src) [ 321s] ^ [ 321s] perf-test.cc: In function 'void strcat_s(char*, size_t, const char*)': [ 321s] perf-test.cc:342:58: error: new declaration 'void strcat_s(char*, size_t, const char*)' [ 321s] void strcat_s(char *dst, size_t dst_size, const char* src) [ 321s] ^ [ 321s] In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/_mingw.h:13:0, [ 321s] from /usr/i686-w64-mingw32/sys-root/mingw/include/windows.h:9, [ 321s] from perf-test.cc:24: [ 321s] /usr/i686-w64-mingw32/sys-root/mingw/include/sec_api/string_s.h:33:3: error: ambiguates old declaration 'errno_t strcat_s(char*, size_t, const char*)' [ 321s] __CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES_0_2_(errno_t,strcat_s,char,,strDestination,size_t,,numberOfElements,const char *,,strSource) [ 321s] ^ The reasons for this failure is that the mingw-w64 compiler has strcpy_s and strcat_s build in, but poppler tries to redefine it anyway.
Created attachment 77855 [details] [review] 0001-Check-for-strcpy_s-and-strcat_s-at-configure-time.patch
Pushed, thanks
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.