Bug 63459 - Compile fails with latest mingw-w64 compiler
Summary: Compile fails with latest mingw-w64 compiler
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All Windows (All)
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-12 09:30 UTC by Hib Eris
Modified: 2013-04-14 14:39 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
0001-Check-for-strcpy_s-and-strcat_s-at-configure-time.patch (2.25 KB, patch)
2013-04-12 09:31 UTC, Hib Eris
Details | Splinter Review

Description Hib Eris 2013-04-12 09:30:01 UTC
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.
Comment 1 Hib Eris 2013-04-12 09:31:22 UTC
Created attachment 77855 [details] [review]
0001-Check-for-strcpy_s-and-strcat_s-at-configure-time.patch
Comment 2 Albert Astals Cid 2013-04-14 14:39:46 UTC
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.