* GDB MinGW build error: implicit declaration of function 'wcsncasecmp'
@ 2013-12-18 9:54 asmwarrior
2013-12-18 9:58 ` asmwarrior
` (2 more replies)
0 siblings, 3 replies; 16+ messages in thread
From: asmwarrior @ 2013-12-18 9:54 UTC (permalink / raw)
To: GDB Development
I see the build error when I build GDB(git head) under MSYS+MinGW, here the is build log
mv -f .deps/pe-i386.Tpo .deps/pe-i386.Plo
rm -f peigen.c
sed -e s/XX/pe/g < ../../binutils-gdb/bfd/peXXigen.c > peigen.new
mv -f peigen.new peigen.c
/bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binutils-gdb/bfd -D__USE_MINGW_FSEEK -I. -I../../binutils-gdb/bfd -I../../binutils-gdb/bfd/../include -DHAVE_i386pe_vec -DHAVE_i386pei_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -DBINDIR='"/mingw/bin"' -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wno-format -Werror -O0 -g -D__USE_MINGW_ACCESS -MT peigen.lo -MD -MP -MF .deps/peigen.Tpo -c -o peigen.lo peigen.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../binutils-gdb/bfd -D__USE_MINGW_FSEEK -I. -I../../binutils-gdb/bfd -I../../binutils-gdb/bfd/../include -DHAVE_i386pe_vec -DHAVE_i386pei_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -DBINDIR=\"/mingw/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wno-format -Werror -O0 -g -D__USE_MINGW_ACCESS -MT peigen.lo -MD -MP -MF .deps/peigen.Tpo -c peigen.c -o peigen.o
peigen.c: In function 'rsrc_cmp':
peigen.c:3006:7: error: implicit declaration of function 'wcsncasecmp' [-Werror=implicit-function-declaration]
res = wcsncasecmp (& awc, & bwc, 1);
^
cc1.exe: all warnings being treated as errors
make[4]: *** [peigen.lo] Error 1
make[4]: Leaving directory `/f/build_gdb/mybuild/bfd'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/f/build_gdb/mybuild/bfd'
make[2]: *** [all] Error 2
I just see this is related to the change of this commit:
Revision: 5879bb8fc592e4aea85bdc2a84381d89850e5770
Author: Nick Clifton <nickc@redhat.com>
Date: 2013-12-17 23:39:13
Message:
* peXXigen.c: Include wchar.h if available.
Include safe-ctype.h.
(HighBitSet, SetHighBit, WithoutHighBit): New macros.
(pe_print_resource_entries): Rename to
rsrc_print_resource_entries. Handle names that are not RVAs.
(pe_print_resource_directory): Rename to
rsrc_print_resource_directory.
(pe_print_rsrc): Rename to rsrc_print_section. Corrupt
computation of RVA bias.
(rsrc_count_entries): New function.
(rsrc_count_directory): New function.
(rsrc_parse_entry): New function.
(rsrc_parse_entries): New function.
(rsrc_parse_directory): New function.
(rsrc_write_string): New function.
(rsrc_compute_rva): New function.
(rsrc_write_leaf): New function.
(rsrc_write_entry): New function.
(rsrc_write_directory): New function.
(u16_mbtouc): New function.
(rsrc_cmp): New function.
(rsrc_print_name): New function.
(rsrc_resource_name): New function.
(rsrc_merge_string_entries): New function.
(rsrc_sort_entries): New function.
(rsrc_attach_chain): New function.
(rsrc_merge): New function.
(rsrc_process_section): New function - merges the contents of a
.rsrc section.
(_bfd_XXi_final_link_postscript): Call rsrc_process_section.
* configure.in (AC_CHECK_HEADERS): Add wchar.h
* config.in: Regenerate.
* configure: Regenerate.
----
Modified: bfd/ChangeLog
Modified: bfd/config.in
Modified: bfd/configure
Modified: bfd/configure.in
Modified: bfd/peXXigen.c
In my ststem, wchar.h exists, but I see there is no functionwcsncasecmp() here.
Thanks
Yuanhui Zhang
^ permalink raw reply [flat|nested] 16+ messages in thread* Re: GDB MinGW build error: implicit declaration of function 'wcsncasecmp' 2013-12-18 9:54 GDB MinGW build error: implicit declaration of function 'wcsncasecmp' asmwarrior @ 2013-12-18 9:58 ` asmwarrior 2013-12-18 10:06 ` BFD " Pedro Alves 2013-12-18 15:35 ` GDB MinGW build error: implicit declaration of function 'wcsncasecmp' Eli Zaretskii 2 siblings, 0 replies; 16+ messages in thread From: asmwarrior @ 2013-12-18 9:58 UTC (permalink / raw) To: GDB Development On 2013-12-18 17:53, asmwarrior wrote: > I see the build error when I build GDB(git head) under MSYS+MinGW, here the is build log > > mv -f .deps/pe-i386.Tpo .deps/pe-i386.Plo > rm -f peigen.c > sed -e s/XX/pe/g < ../../binutils-gdb/bfd/peXXigen.c > peigen.new > mv -f peigen.new peigen.c > /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binutils-gdb/bfd -D__USE_MINGW_FSEEK -I. -I../../binutils-gdb/bfd -I../../binutils-gdb/bfd/../include -DHAVE_i386pe_vec -DHAVE_i386pei_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -DBINDIR='"/mingw/bin"' -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wno-format -Werror -O0 -g -D__USE_MINGW_ACCESS -MT peigen.lo -MD -MP -MF .deps/peigen.Tpo -c -o peigen.lo peigen.c > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../binutils-gdb/bfd -D__USE_MINGW_FSEEK -I. -I../../binutils-gdb/bfd -I../../binutils-gdb/bfd/../include -DHAVE_i386pe_vec -DHAVE_i386pei_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -DBINDIR=\"/mingw/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wno-format -Werror -O0 -g -D__USE_MINGW_ACCESS -MT peigen.lo -MD -MP -MF .deps/peigen.Tpo -c peigen.c -o peigen.o > peigen.c: In function 'rsrc_cmp': > peigen.c:3006:7: error: implicit declaration of function 'wcsncasecmp' [-Werror=implicit-function-declaration] > res = wcsncasecmp (& awc, & bwc, 1); > ^ > cc1.exe: all warnings being treated as errors > make[4]: *** [peigen.lo] Error 1 > make[4]: Leaving directory `/f/build_gdb/mybuild/bfd' > make[3]: *** [all-recursive] Error 1 > make[3]: Leaving directory `/f/build_gdb/mybuild/bfd' > make[2]: *** [all] Error 2 > > I just see this is related to the change of this commit: > > Revision: 5879bb8fc592e4aea85bdc2a84381d89850e5770 > Author: Nick Clifton <nickc@redhat.com> > Date: 2013-12-17 23:39:13 > Message: > * peXXigen.c: Include wchar.h if available. > > Include safe-ctype.h. > (HighBitSet, SetHighBit, WithoutHighBit): New macros. > (pe_print_resource_entries): Rename to > rsrc_print_resource_entries. Handle names that are not RVAs. > (pe_print_resource_directory): Rename to > rsrc_print_resource_directory. > (pe_print_rsrc): Rename to rsrc_print_section. Corrupt > computation of RVA bias. > (rsrc_count_entries): New function. > (rsrc_count_directory): New function. > (rsrc_parse_entry): New function. > (rsrc_parse_entries): New function. > (rsrc_parse_directory): New function. > (rsrc_write_string): New function. > (rsrc_compute_rva): New function. > (rsrc_write_leaf): New function. > (rsrc_write_entry): New function. > (rsrc_write_directory): New function. > (u16_mbtouc): New function. > (rsrc_cmp): New function. > (rsrc_print_name): New function. > (rsrc_resource_name): New function. > (rsrc_merge_string_entries): New function. > (rsrc_sort_entries): New function. > (rsrc_attach_chain): New function. > (rsrc_merge): New function. > (rsrc_process_section): New function - merges the contents of a > .rsrc section. > (_bfd_XXi_final_link_postscript): Call rsrc_process_section. > * configure.in (AC_CHECK_HEADERS): Add wchar.h > * config.in: Regenerate. > * configure: Regenerate. > ---- > Modified: bfd/ChangeLog > Modified: bfd/config.in > Modified: bfd/configure > Modified: bfd/configure.in > Modified: bfd/peXXigen.c > > In my ststem, wchar.h exists, but I see there is no functionwcsncasecmp() here. > > Thanks > > Yuanhui Zhang BTW: I'm using mingw-builds/i686-4.8.2-release-posix-dwarf-rt_v3-rev1 hosted from http://mingw-w64.sourceforge.net/ Thanks. ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: BFD MinGW build error: implicit declaration of function 'wcsncasecmp' 2013-12-18 9:54 GDB MinGW build error: implicit declaration of function 'wcsncasecmp' asmwarrior 2013-12-18 9:58 ` asmwarrior @ 2013-12-18 10:06 ` Pedro Alves 2013-12-18 12:50 ` asmwarrior ` (3 more replies) 2013-12-18 15:35 ` GDB MinGW build error: implicit declaration of function 'wcsncasecmp' Eli Zaretskii 2 siblings, 4 replies; 16+ messages in thread From: Pedro Alves @ 2013-12-18 10:06 UTC (permalink / raw) To: asmwarrior; +Cc: GDB Development, Binutils Development Hi there, Adding the binutils folks. (bfd is maintained by binutils.) Looks like fallout from the .rsrc merge support. On 12/18/2013 09:53 AM, asmwarrior wrote: > I see the build error when I build GDB(git head) under MSYS+MinGW, here the is build log > > mv -f .deps/pe-i386.Tpo .deps/pe-i386.Plo > rm -f peigen.c > sed -e s/XX/pe/g < ../../binutils-gdb/bfd/peXXigen.c > peigen.new > mv -f peigen.new peigen.c > /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binutils-gdb/bfd -D__USE_MINGW_FSEEK -I. -I../../binutils-gdb/bfd -I../../binutils-gdb/bfd/../include -DHAVE_i386pe_vec -DHAVE_i386pei_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -DBINDIR='"/mingw/bin"' -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wno-format -Werror -O0 -g -D__USE_MINGW_ACCESS -MT peigen.lo -MD -MP -MF .deps/peigen.Tpo -c -o peigen.lo peigen.c > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../binutils-gdb/bfd -D__USE_MINGW_FSEEK -I. -I../../binutils-gdb/bfd -I../../binutils-gdb/bfd/../include -DHAVE_i386pe_vec -DHAVE_i386pei_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -DBINDIR=\"/mingw/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wno-format -Werror -O0 -g -D__USE_MINGW_ACCESS -MT peigen.lo -MD -MP -MF .deps/peigen.Tpo -c peigen.c -o peigen.o > peigen.c: In function 'rsrc_cmp': > peigen.c:3006:7: error: implicit declaration of function 'wcsncasecmp' [-Werror=implicit-function-declaration] > res = wcsncasecmp (& awc, & bwc, 1); > ^ > cc1.exe: all warnings being treated as errors > make[4]: *** [peigen.lo] Error 1 > make[4]: Leaving directory `/f/build_gdb/mybuild/bfd' > make[3]: *** [all-recursive] Error 1 > make[3]: Leaving directory `/f/build_gdb/mybuild/bfd' > make[2]: *** [all] Error 2 > > I just see this is related to the change of this commit: > > Revision: 5879bb8fc592e4aea85bdc2a84381d89850e5770 > Author: Nick Clifton <nickc@redhat.com> > Date: 2013-12-17 23:39:13 > Message: > * peXXigen.c: Include wchar.h if available. > > Include safe-ctype.h. > (HighBitSet, SetHighBit, WithoutHighBit): New macros. > (pe_print_resource_entries): Rename to > rsrc_print_resource_entries. Handle names that are not RVAs. > (pe_print_resource_directory): Rename to > rsrc_print_resource_directory. > (pe_print_rsrc): Rename to rsrc_print_section. Corrupt > computation of RVA bias. > (rsrc_count_entries): New function. > (rsrc_count_directory): New function. > (rsrc_parse_entry): New function. > (rsrc_parse_entries): New function. > (rsrc_parse_directory): New function. > (rsrc_write_string): New function. > (rsrc_compute_rva): New function. > (rsrc_write_leaf): New function. > (rsrc_write_entry): New function. > (rsrc_write_directory): New function. > (u16_mbtouc): New function. > (rsrc_cmp): New function. > (rsrc_print_name): New function. > (rsrc_resource_name): New function. > (rsrc_merge_string_entries): New function. > (rsrc_sort_entries): New function. > (rsrc_attach_chain): New function. > (rsrc_merge): New function. > (rsrc_process_section): New function - merges the contents of a > .rsrc section. > (_bfd_XXi_final_link_postscript): Call rsrc_process_section. > * configure.in (AC_CHECK_HEADERS): Add wchar.h > * config.in: Regenerate. > * configure: Regenerate. > ---- > Modified: bfd/ChangeLog > Modified: bfd/config.in > Modified: bfd/configure > Modified: bfd/configure.in > Modified: bfd/peXXigen.c > > In my ststem, wchar.h exists, but I see there is no functionwcsncasecmp() here. > > Thanks > > Yuanhui Zhang > -- Pedro Alves ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: BFD MinGW build error: implicit declaration of function 'wcsncasecmp' 2013-12-18 10:06 ` BFD " Pedro Alves @ 2013-12-18 12:50 ` asmwarrior 2013-12-18 15:47 ` Eli Zaretskii 2013-12-18 13:03 ` [RFC] BFD MinGW/Cygwin build error in bfd/peiXXgen.c Pierre Muller ` (2 subsequent siblings) 3 siblings, 1 reply; 16+ messages in thread From: asmwarrior @ 2013-12-18 12:50 UTC (permalink / raw) To: Pedro Alves; +Cc: GDB Development, Binutils Development On 2013-12-18 18:06, Pedro Alves wrote: > Hi there, > > Adding the binutils folks. (bfd is maintained by binutils.) > > Looks like fallout from the .rsrc merge support. > > On 12/18/2013 09:53 AM, asmwarrior wrote: >> I see the build error when I build GDB(git head) under MSYS+MinGW, here the is build log >> >> mv -f .deps/pe-i386.Tpo .deps/pe-i386.Plo >> rm -f peigen.c >> sed -e s/XX/pe/g < ../../binutils-gdb/bfd/peXXigen.c > peigen.new >> mv -f peigen.new peigen.c >> /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binutils-gdb/bfd -D__USE_MINGW_FSEEK -I. -I../../binutils-gdb/bfd -I../../binutils-gdb/bfd/../include -DHAVE_i386pe_vec -DHAVE_i386pei_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -DBINDIR='"/mingw/bin"' -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wno-format -Werror -O0 -g -D__USE_MINGW_ACCESS -MT peigen.lo -MD -MP -MF .deps/peigen.Tpo -c -o peigen.lo peigen.c >> libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../binutils-gdb/bfd -D__USE_MINGW_FSEEK -I. -I../../binutils-gdb/bfd -I../../binutils-gdb/bfd/../include -DHAVE_i386pe_vec -DHAVE_i386pei_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -DBINDIR=\"/mingw/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wno-format -Werror -O0 -g -D__USE_MINGW_ACCESS -MT peigen.lo -MD -MP -MF .deps/peigen.Tpo -c peigen.c -o peigen.o >> peigen.c: In function 'rsrc_cmp': >> peigen.c:3006:7: error: implicit declaration of function 'wcsncasecmp' [-Werror=implicit-function-declaration] >> res = wcsncasecmp (& awc, & bwc, 1); >> ^ >> cc1.exe: all warnings being treated as errors >> make[4]: *** [peigen.lo] Error 1 >> make[4]: Leaving directory `/f/build_gdb/mybuild/bfd' >> make[3]: *** [all-recursive] Error 1 >> make[3]: Leaving directory `/f/build_gdb/mybuild/bfd' >> make[2]: *** [all] Error 2 I think under Windows, there is a function: (in wchar.h under my MinGW-W64 toolchain) _CRTIMP int __cdecl _wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); See:http://msdn.microsoft.com/en-us/library/chd90w8e.aspx Thanks. Yuanhui Zhang ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: BFD MinGW build error: implicit declaration of function 'wcsncasecmp' 2013-12-18 12:50 ` asmwarrior @ 2013-12-18 15:47 ` Eli Zaretskii 0 siblings, 0 replies; 16+ messages in thread From: Eli Zaretskii @ 2013-12-18 15:47 UTC (permalink / raw) To: asmwarrior; +Cc: palves, gdb, binutils > Date: Wed, 18 Dec 2013 20:48:41 +0800 > From: asmwarrior <asmwarrior@gmail.com> > CC: GDB Development <gdb@sourceware.org>, Binutils Development <binutils@sourceware.org> > > I think under Windows, there is a function: (in wchar.h under my MinGW-W64 toolchain) > > _CRTIMP int __cdecl _wcsnicmp(const wchar_t *_Str1,const wchar_t *_Str2,size_t _MaxCount); Yes, that will also do. ^ permalink raw reply [flat|nested] 16+ messages in thread
* [RFC] BFD MinGW/Cygwin build error in bfd/peiXXgen.c 2013-12-18 10:06 ` BFD " Pedro Alves 2013-12-18 12:50 ` asmwarrior @ 2013-12-18 13:03 ` Pierre Muller 2013-12-18 17:52 ` nick clifton [not found] ` <52b19d01.22cbc20a.69b0.ffffb29eSMTPIN_ADDED_BROKEN@mx.google.com> [not found] ` <52b19d19.0850420a.7b6a.52dcSMTPIN_ADDED_BROKEN@mx.google.com> 3 siblings, 1 reply; 16+ messages in thread From: Pierre Muller @ 2013-12-18 13:03 UTC (permalink / raw) To: 'Pedro Alves', 'asmwarrior' Cc: 'GDB Development', 'Binutils Development' Cygwin also fails to compile bfd/peigen.c, itself gebnerated from source bfd/peXXigen.c. The patch below allows to compile both for mingw32 and cygwin hosts. To fix the unknown wcsncasecmp function for mingw32 hosts, I added this code: +#ifdef __MINGW32__ +#define wcsncasecmp wcsnicmp +#endif I think that using the Windows API function wcsnicmp here is OK, but I don't know if the code should be somehow modified to accept wcsncasecmp function if it is added later to mingw hosts... Pierre Muller bfd/ChangeLog entry: 2013-12-18 Pierre Muller <muller@sourceware.org> peXXigen.c (u16_mbtouc): Avoid unused function warning by exculding if __CYGWIN__ or __MINGW32__ macro is defined. (rsrc_cmp): Fix short Windows OS version. Also use this code for mingw32 systems. [__MINGW32__]: Alias wcsncasecmp function to Windows API wcsnicmp function. diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c index 5e2a876..05c7d8b 100644 --- a/bfd/peXXigen.c +++ b/bfd/peXXigen.c @@ -2930,7 +2930,7 @@ rsrc_write_directory (rsrc_write_data * data, BFD_ASSERT (nt == next_entry); } -#ifdef HAVE_WCHAR_H +#if defined HAVE_WCHAR_H && ! defined __CYGWIN__ && ! defined __MINGW32__ /* Return the length (number of units) of the first character in S, putting its 'ucs4_t' representation in *PUC. */ @@ -2979,9 +2979,16 @@ rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b) /* We have to perform a case insenstive, unicode string comparison... */ int res; -#ifdef __CYGWIN__ +#if defined __CYGWIN__ || defined __MINGW32__ +#ifdef __MINGW32__ +#define wcsncasecmp wcsnicmp +#endif /* Under Cygwin unicode == UTF-16 == wchar_t. FIXME: The same is true for MingGW - we should test for that too. */ + bfd_byte * astring = a->name_id.name.string; + unsigned int alen = a->name_id.name.len; + bfd_byte * bstring = b->name_id.name.string; + unsigned int blen = b->name_id.name.len; res = wcsncasecmp ((const wchar_t *) astring + 2, (const wchar_t *) bstring + 2, min (alen, blen)); #elif defined HAVE_WCHAR_H unsigned int i; > -----Message d'origine----- > De : binutils-owner@sourceware.org [mailto:binutils- > owner@sourceware.org] De la part de Pedro Alves > Envoyé : mercredi 18 décembre 2013 11:06 > À : asmwarrior > Cc : GDB Development; Binutils Development > Objet : Re: BFD MinGW build error: implicit declaration of function > 'wcsncasecmp' > > Hi there, > > Adding the binutils folks. (bfd is maintained by binutils.) > > Looks like fallout from the .rsrc merge support. > > On 12/18/2013 09:53 AM, asmwarrior wrote: > > I see the build error when I build GDB(git head) under MSYS+MinGW, > here the is build log > > > > mv -f .deps/pe-i386.Tpo .deps/pe-i386.Plo > > rm -f peigen.c > > sed -e s/XX/pe/g < ../../binutils-gdb/bfd/peXXigen.c > peigen.new > > mv -f peigen.new peigen.c > > /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. - > I../../binutils-gdb/bfd -D__USE_MINGW_FSEEK -I. -I../../binutils- > gdb/bfd -I../../binutils-gdb/bfd/../include -DHAVE_i386pe_vec - > DHAVE_i386pei_vec -DHAVE_bfd_elf32_i386_vec - > DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec - > DBINDIR='"/mingw/bin"' -W -Wall -Wstrict-prototypes -Wmissing- > prototypes -Wshadow -Wno-format -Werror -O0 -g -D__USE_MINGW_ACCESS -MT > peigen.lo -MD -MP -MF .deps/peigen.Tpo -c -o peigen.lo peigen.c > > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../binutils-gdb/bfd - > D__USE_MINGW_FSEEK -I. -I../../binutils-gdb/bfd -I../../binutils- > gdb/bfd/../include -DHAVE_i386pe_vec -DHAVE_i386pei_vec - > DHAVE_bfd_elf32_i386_vec -DHAVE_bfd_elf32_little_generic_vec - > DHAVE_bfd_elf32_big_generic_vec -DBINDIR=\"/mingw/bin\" -W -Wall - > Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wno-format -Werror - > O0 -g -D__USE_MINGW_ACCESS -MT peigen.lo -MD -MP -MF .deps/peigen.Tpo - > c peigen.c -o peigen.o > > peigen.c: In function 'rsrc_cmp': > > peigen.c:3006:7: error: implicit declaration of function > 'wcsncasecmp' [-Werror=implicit-function-declaration] > > res = wcsncasecmp (& awc, & bwc, 1); > > ^ > > cc1.exe: all warnings being treated as errors > > make[4]: *** [peigen.lo] Error 1 > > make[4]: Leaving directory `/f/build_gdb/mybuild/bfd' > > make[3]: *** [all-recursive] Error 1 > > make[3]: Leaving directory `/f/build_gdb/mybuild/bfd' > > make[2]: *** [all] Error 2 > > > > I just see this is related to the change of this commit: > > > > Revision: 5879bb8fc592e4aea85bdc2a84381d89850e5770 > > Author: Nick Clifton <nickc@redhat.com> > > Date: 2013-12-17 23:39:13 > > Message: > > * peXXigen.c: Include wchar.h if available. > > > > Include safe-ctype.h. > > (HighBitSet, SetHighBit, WithoutHighBit): New macros. > > (pe_print_resource_entries): Rename to > > rsrc_print_resource_entries. Handle names that are not RVAs. > > (pe_print_resource_directory): Rename to > > rsrc_print_resource_directory. > > (pe_print_rsrc): Rename to rsrc_print_section. Corrupt > > computation of RVA bias. > > (rsrc_count_entries): New function. > > (rsrc_count_directory): New function. > > (rsrc_parse_entry): New function. > > (rsrc_parse_entries): New function. > > (rsrc_parse_directory): New function. > > (rsrc_write_string): New function. > > (rsrc_compute_rva): New function. > > (rsrc_write_leaf): New function. > > (rsrc_write_entry): New function. > > (rsrc_write_directory): New function. > > (u16_mbtouc): New function. > > (rsrc_cmp): New function. > > (rsrc_print_name): New function. > > (rsrc_resource_name): New function. > > (rsrc_merge_string_entries): New function. > > (rsrc_sort_entries): New function. > > (rsrc_attach_chain): New function. > > (rsrc_merge): New function. > > (rsrc_process_section): New function - merges the contents of a > > .rsrc section. > > (_bfd_XXi_final_link_postscript): Call rsrc_process_section. > > * configure.in (AC_CHECK_HEADERS): Add wchar.h > > * config.in: Regenerate. > > * configure: Regenerate. > > ---- > > Modified: bfd/ChangeLog > > Modified: bfd/config.in > > Modified: bfd/configure > > Modified: bfd/configure.in > > Modified: bfd/peXXigen.c > > > > In my ststem, wchar.h exists, but I see there is no > functionwcsncasecmp() here. > > > > Thanks > > > > Yuanhui Zhang > > > > > -- > Pedro Alves ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC] BFD MinGW/Cygwin build error in bfd/peiXXgen.c 2013-12-18 13:03 ` [RFC] BFD MinGW/Cygwin build error in bfd/peiXXgen.c Pierre Muller @ 2013-12-18 17:52 ` nick clifton 2013-12-19 11:45 ` [RFC-v2] " Pierre Muller 0 siblings, 1 reply; 16+ messages in thread From: nick clifton @ 2013-12-18 17:52 UTC (permalink / raw) To: Pierre Muller, 'Pedro Alves', 'asmwarrior' Cc: 'GDB Development', 'Binutils Development' Hi Pierre, > bfd/ChangeLog entry: > > 2013-12-18 Pierre Muller <muller@sourceware.org> > > peXXigen.c (u16_mbtouc): Avoid unused function warning by exculding if > __CYGWIN__ or __MINGW32__ macro is defined. > (rsrc_cmp): Fix short Windows OS version. Also use this code > for mingw32 systems. > [__MINGW32__]: Alias wcsncasecmp function to Windows API wcsnicmp function. Approved - please apply. Cheers Nick ^ permalink raw reply [flat|nested] 16+ messages in thread
* [RFC-v2] BFD MinGW/Cygwin build error in bfd/peiXXgen.c 2013-12-18 17:52 ` nick clifton @ 2013-12-19 11:45 ` Pierre Muller 2013-12-19 12:41 ` nick clifton 0 siblings, 1 reply; 16+ messages in thread From: Pierre Muller @ 2013-12-19 11:45 UTC (permalink / raw) To: 'nick clifton', 'Pedro Alves', 'asmwarrior' Cc: 'GDB Development', 'Binutils Development' Hi Nick, After looking at the code a little longer, I think that there were still other issues in that part of the code. 1) The astring and bstring were still not declared for the last macro case (hosts having no wchar header). I solved this issue by placing the declarations at the start of the function. 2) In GDB coding rules, we are not allowed to mix code and declaration. The declaration of res after handling the ! is_name part does not follow this rule. Isn't that rule also used for Binutils project? I moved the declaration of astring, alen, bstring and blen to the start of the function. It does introduce a penalty, in the sense that those variables are set even though this is not useful if is_name is false. Otherwise adding an extra brace level might be the proper solution. Another silly coding style question: Should there by a space between the address operator "&" and the variable or expression following? 3) I was wondering why the Windows case started at astring + 2, but I couldn't find any valid reason, so that I changed it to compare the strings from the first position. 4) I did the same for the code if wchar is missing. 5) To have a symmetric code for cygwin versus mingw, I introduced a macro called rscpcmp for both cases. Finally, I also have a question regarding the codepage field. According to Windows PE resources can use any codepage. Is the new code restricted to UNICODE only? If not, shouldn't the rsrc_cmp code also depend on whether 16-bit Windows UNICODE is used or any other page code? The main problem is that I have no source code to test this code on... Pierre Muller PS: I removed the fixme as suggested by Pedro. 2013-12-19 Pierre Muller <muller@sourceware.org> peXXigen.c (u16_mbtouc): Avoid unused function warning by excluding if __CYGWIN__ or __MINGW32__ macro is defined. (rsrc_cmp): Fix Windows host version and version without wchar header. [__CYGWIN__, __MINGW32__]: Introduce rsrccmp macro. diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c index 2a33a77..f5879f6 100644 --- a/bfd/peXXigen.c +++ b/bfd/peXXigen.c @@ -2930,7 +2930,7 @@ rsrc_write_directory (rsrc_write_data * data, BFD_ASSERT (nt == next_entry); } -#ifdef HAVE_WCHAR_H +#if defined HAVE_WCHAR_H && ! defined __CYGWIN__ && ! defined __MINGW32__ /* Return the length (number of units) of the first character in S, putting its 'ucs4_t' representation in *PUC. */ @@ -2974,22 +2974,30 @@ static signed int rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b) { if (! is_name) - return a->name_id.id - b->name_id.id; + return a->name_id.id - b->name_id.id; /* We have to perform a case insenstive, unicode string comparison... */ int res; - -#ifdef __CYGWIN__ - /* Under Cygwin unicode == UTF-16 == wchar_t. - FIXME: The same is true for MingGW - we should test for that too. */ - res = wcsncasecmp ((const wchar_t *) astring + 2, (const wchar_t *) bstring + 2, min (alen, blen)); -#elif defined HAVE_WCHAR_H - unsigned int i; bfd_byte * astring = a->name_id.name.string; unsigned int alen = a->name_id.name.len; bfd_byte * bstring = b->name_id.name.string; unsigned int blen = b->name_id.name.len; +#if defined __CYGWIN__ || defined __MINGW32__ +#undef rscpcmp +#ifdef __CYGWIN__ +#define rscpcmp wcsncasecmp +#endif +#ifdef __MINGW32__ +#define rscpcmp wcsnicmp +#endif + /* Under Windows hosts (both cygwin and mingw types), + unicode == UTF-16 == wchar_t. */ + res = rscpcmp ((const wchar_t *) astring, (const wchar_t *) bstring, + min (alen, blen)); +#elif defined HAVE_WCHAR_H + unsigned int i; + res = 0; for (i = min (alen, blen); i--; astring += 2, bstring += 2) { @@ -3008,7 +3016,7 @@ rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b) break; } #else - res = memcmp (astring + 2, bstring + 2, min (alen, blen) * 2); + res = memcmp (astring, bstring, min (alen, blen) * 2); #endif if (res == 0) ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC-v2] BFD MinGW/Cygwin build error in bfd/peiXXgen.c 2013-12-19 11:45 ` [RFC-v2] " Pierre Muller @ 2013-12-19 12:41 ` nick clifton 2013-12-19 13:02 ` Mark Kettenis 2013-12-19 13:18 ` Pierre Muller 0 siblings, 2 replies; 16+ messages in thread From: nick clifton @ 2013-12-19 12:41 UTC (permalink / raw) To: Pierre Muller, 'Pedro Alves', 'asmwarrior' Cc: 'GDB Development', 'Binutils Development' Hi Pierre, > 2) In GDB coding rules, we are not allowed to mix code and declaration. > The declaration of res after handling the ! is_name part > does not follow this rule. > Isn't that rule also used for Binutils project? Doh - this is my bad. The rule *is* followed in the Binutils project and I should have caught this before checking in the patch. I blame the GCC project - ever since they switched over to using C++ I have been developing "bad" C coding habits. > I moved the declaration of astring, alen, bstring and blen to > the start of the function. It does introduce a penalty, in the sense that > those variables are set even though this is not useful if is_name is false. I do not see this as a problem. I am much more interested in clean code than in highly optimized, but harder to read code. > Another silly coding style question: Should there by a space > between the address operator "&" and the variable or expression following? *sigh* There is no strict rule on this subject. Most people omit the space, I include it. I feel that since we separate other operators from their arguments we should do the same with &. I feel the same way about the asterisk operator too, but not many people agree with me on that one either. > 3) I was wondering why the Windows case started at astring + 2, > but I couldn't find any valid reason, so that I changed it to > compare the strings from the first position. Doh - I was confused by the length field which I thought was included in my string pointer. > Finally, I also have a question regarding the codepage field. > According to Windows PE resources can use any codepage. > Is the new code restricted to UNICODE only? > If not, shouldn't the rsrc_cmp code also depend on whether > 16-bit Windows UNICODE is used or any other page code? I have no idea. :-( I am not an expert on this subject. According to the "Microsoft Portable Executable and Common Object File Format Specification Revision 8.3 â February 6, 2013" which has been my guide for this work, the codepage field is: The code page that is used to decode code point values within the resource data. Typically, the code page would be the Unicode code page. But Resource Directory Strings are: Offset Size Field Description 0 2 Length The size of the string, not including length field itself. 2 variable Unicode The variable-length Unicode string data, String word-aligned. Ie - the strings are explicitly encoded in Unicode. I think that the codepage field in a resource entry only applies to non-resource-string data. > 2013-12-19 Pierre Muller <muller@sourceware.org> > > peXXigen.c (u16_mbtouc): Avoid unused function warning by excluding if > __CYGWIN__ or __MINGW32__ macro is defined. > (rsrc_cmp): Fix Windows host version and version without wchar header. > [__CYGWIN__, __MINGW32__]: Introduce rsrccmp macro. Thanks - I have applied this patch. Cheers Nick ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC-v2] BFD MinGW/Cygwin build error in bfd/peiXXgen.c 2013-12-19 12:41 ` nick clifton @ 2013-12-19 13:02 ` Mark Kettenis 2013-12-19 13:18 ` Pierre Muller 1 sibling, 0 replies; 16+ messages in thread From: Mark Kettenis @ 2013-12-19 13:02 UTC (permalink / raw) To: nickc; +Cc: pierre.muller, palves, asmwarrior, gdb, binutils > Date: Thu, 19 Dec 2013 12:38:28 +0000 > From: nick clifton <nickc@redhat.com> > > > Another silly coding style question: Should there by a space > > between the address operator "&" and the variable or expression following? > > *sigh* There is no strict rule on this subject. Most people omit the > space, I include it. I feel that since we separate other operators from > their arguments we should do the same with &. I feel the same way about > the asterisk operator too, but not many people agree with me on that one > either. Spaces around binary operators, no spaces around unary operators. That's pretty much the universally accepted standard, and the one used by the official C standard. Everybody who thinks differently has been poisoned by C++ ;). ^ permalink raw reply [flat|nested] 16+ messages in thread
* RE: [RFC-v2] BFD MinGW/Cygwin build error in bfd/peiXXgen.c 2013-12-19 12:41 ` nick clifton 2013-12-19 13:02 ` Mark Kettenis @ 2013-12-19 13:18 ` Pierre Muller 2013-12-19 15:13 ` nick clifton 1 sibling, 1 reply; 16+ messages in thread From: Pierre Muller @ 2013-12-19 13:18 UTC (permalink / raw) To: 'nick clifton', 'Pedro Alves', 'asmwarrior' Cc: 'GDB Development', 'Binutils Development' > > 2013-12-19 Pierre Muller <muller@sourceware.org> > > > > peXXigen.c (u16_mbtouc): Avoid unused function warning by > excluding if > > __CYGWIN__ or __MINGW32__ macro is defined. > > (rsrc_cmp): Fix Windows host version and version without wchar > header. > > [__CYGWIN__, __MINGW32__]: Introduce rsrccmp macro. > > Thanks - I have applied this patch. Not yet completely OK: peigen.c: In function ‘rsrc_cmp’: peigen.c:2984:17: erreur: unused variable ‘i’ [-Werror=unused-variable] ChangeLog entry: 2013-12-19 Pierre Muller <muller@sourceware.org> Fix unused variable warning. diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c index 843cae8..d50db73 100644 --- a/bfd/peXXigen.c +++ b/bfd/peXXigen.c @@ -2981,7 +2981,6 @@ static signed int rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b) { signed int res; - unsigned int i; bfd_byte * astring; unsigned int alen; bfd_byte * bstring; @@ -3013,24 +3012,26 @@ rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b) min (alen, blen)); #elif defined HAVE_WCHAR_H - res = 0; - for (i = min (alen, blen); i--; astring += 2, bstring += 2) - { - wchar_t awc; - wchar_t bwc; - - /* Convert UTF-16 unicode characters into wchar_t characters so - that we can then perform a case insensitive comparison. */ - int Alen = u16_mbtouc (& awc, (const unsigned short *) astring, 2); - int Blen = u16_mbtouc (& bwc, (const unsigned short *) bstring, 2); - - if (Alen != Blen) - return Alen - Blen; - res = wcsncasecmp (& awc, & bwc, 1); - if (res) - break; - } - + { + unsigned int i; + res = 0; + for (i = min (alen, blen); i--; astring += 2, bstring += 2) + { + wchar_t awc; + wchar_t bwc; + + /* Convert UTF-16 unicode characters into wchar_t characters so + that we can then perform a case insensitive comparison. */ + int Alen = u16_mbtouc (& awc, (const unsigned short *) astring, 2); + int Blen = u16_mbtouc (& bwc, (const unsigned short *) bstring, 2); + + if (Alen != Blen) + return Alen - Blen; + res = wcsncasecmp (& awc, & bwc, 1); + if (res) + break; + } + } #else /* Do the best we can - a case sensitive, untranslated comparison. */ res = memcmp (astring, bstring, min (alen, blen) * 2); ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC-v2] BFD MinGW/Cygwin build error in bfd/peiXXgen.c 2013-12-19 13:18 ` Pierre Muller @ 2013-12-19 15:13 ` nick clifton 0 siblings, 0 replies; 16+ messages in thread From: nick clifton @ 2013-12-19 15:13 UTC (permalink / raw) To: Pierre Muller, 'Pedro Alves', 'asmwarrior' Cc: 'GDB Development', 'Binutils Development' Hi Pierre, > > 2013-12-19 Pierre Muller <muller@sourceware.org> > > Fix unused variable warning. *sigh* - approved - please apply. After all this I hope that someone actually does use the code... :-) Cheers Nick ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <52b19d01.22cbc20a.69b0.ffffb29eSMTPIN_ADDED_BROKEN@mx.google.com>]
* Re: [RFC] BFD MinGW/Cygwin build error in bfd/peiXXgen.c [not found] ` <52b19d01.22cbc20a.69b0.ffffb29eSMTPIN_ADDED_BROKEN@mx.google.com> @ 2013-12-18 13:25 ` asmwarrior 0 siblings, 0 replies; 16+ messages in thread From: asmwarrior @ 2013-12-18 13:25 UTC (permalink / raw) To: Pierre Muller, 'Pedro Alves' Cc: 'GDB Development', 'Binutils Development' On 2013-12-18 21:02, Pierre Muller wrote: > Cygwin also fails to compile bfd/peigen.c, itself gebnerated > from source bfd/peXXigen.c. > > The patch below allows to compile both for mingw32 and cygwin hosts. > To fix the unknown wcsncasecmp function for mingw32 hosts, > I added this code: > > +#ifdef __MINGW32__ > +#define wcsncasecmp wcsnicmp > +#endif > I think that using the Windows API function wcsnicmp > here is OK, but I don't know if the code should be somehow modified to > accept wcsncasecmp function if it is added later to mingw hosts... > > Pierre Muller > > > bfd/ChangeLog entry: > > 2013-12-18 Pierre Muller <muller@sourceware.org> > > peXXigen.c (u16_mbtouc): Avoid unused function warning by exculding if > __CYGWIN__ or __MINGW32__ macro is defined. > (rsrc_cmp): Fix short Windows OS version. Also use this code > for mingw32 systems. > [__MINGW32__]: Alias wcsncasecmp function to Windows API wcsnicmp function. > > diff --git a/bfd/peXXigen.c b/bfd/peXXigen.c > index 5e2a876..05c7d8b 100644 > --- a/bfd/peXXigen.c > +++ b/bfd/peXXigen.c > @@ -2930,7 +2930,7 @@ rsrc_write_directory (rsrc_write_data * data, > BFD_ASSERT (nt == next_entry); > } > > -#ifdef HAVE_WCHAR_H > +#if defined HAVE_WCHAR_H && ! defined __CYGWIN__ && ! defined __MINGW32__ > /* Return the length (number of units) of the first character in S, > putting its 'ucs4_t' representation in *PUC. */ > > @@ -2979,9 +2979,16 @@ rsrc_cmp (bfd_boolean is_name, rsrc_entry * a, rsrc_entry * b) > /* We have to perform a case insenstive, unicode string comparison... */ > int res; > > -#ifdef __CYGWIN__ > +#if defined __CYGWIN__ || defined __MINGW32__ > +#ifdef __MINGW32__ > +#define wcsncasecmp wcsnicmp > +#endif > /* Under Cygwin unicode == UTF-16 == wchar_t. > FIXME: The same is true for MingGW - we should test for that too. */ > + bfd_byte * astring = a->name_id.name.string; > + unsigned int alen = a->name_id.name.len; > + bfd_byte * bstring = b->name_id.name.string; > + unsigned int blen = b->name_id.name.len; > res = wcsncasecmp ((const wchar_t *) astring + 2, (const wchar_t *) bstring + 2, min (alen, blen)); > #elif defined HAVE_WCHAR_H > unsigned int i; Thanks, just test this patch, it fix the build error under MinGW-Build 4.8.2 + MSYS. Yuanhui Zhang ^ permalink raw reply [flat|nested] 16+ messages in thread
[parent not found: <52b19d19.0850420a.7b6a.52dcSMTPIN_ADDED_BROKEN@mx.google.com>]
* Re: [RFC] BFD MinGW/Cygwin build error in bfd/peiXXgen.c [not found] ` <52b19d19.0850420a.7b6a.52dcSMTPIN_ADDED_BROKEN@mx.google.com> @ 2013-12-18 17:56 ` Pedro Alves 2013-12-19 11:15 ` nick clifton 0 siblings, 1 reply; 16+ messages in thread From: Pedro Alves @ 2013-12-18 17:56 UTC (permalink / raw) To: Pierre Muller Cc: 'asmwarrior', 'GDB Development', 'Binutils Development' On 12/18/2013 01:02 PM, Pierre Muller wrote: > -#ifdef __CYGWIN__ > +#if defined __CYGWIN__ || defined __MINGW32__ > +#ifdef __MINGW32__ > +#define wcsncasecmp wcsnicmp > +#endif > /* Under Cygwin unicode == UTF-16 == wchar_t. > FIXME: The same is true for MingGW - we should test for that too. */ Isn't this FIXME note stale now? > + bfd_byte * astring = a->name_id.name.string; > + unsigned int alen = a->name_id.name.len; > + bfd_byte * bstring = b->name_id.name.string; > + unsigned int blen = b->name_id.name.len; > res = wcsncasecmp ((const wchar_t *) astring + 2, (const wchar_t *) bstring + 2, min (alen, blen)); > #elif defined HAVE_WCHAR_H > unsigned int i; -- Pedro Alves ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [RFC] BFD MinGW/Cygwin build error in bfd/peiXXgen.c 2013-12-18 17:56 ` Pedro Alves @ 2013-12-19 11:15 ` nick clifton 0 siblings, 0 replies; 16+ messages in thread From: nick clifton @ 2013-12-19 11:15 UTC (permalink / raw) To: Pedro Alves, Pierre Muller Cc: 'asmwarrior', 'GDB Development', 'Binutils Development' Hi Pedro, Hi Pierre, Pedro Alves wrote: > On 12/18/2013 01:02 PM, Pierre Muller wrote: >> -#ifdef __CYGWIN__ >> +#if defined __CYGWIN__ || defined __MINGW32__ >> +#ifdef __MINGW32__ >> +#define wcsncasecmp wcsnicmp >> +#endif >> /* Under Cygwin unicode == UTF-16 == wchar_t. >> FIXME: The same is true for MingGW - we should test for that too. */ > > Isn't this FIXME note stale now? True - Pierre: would you mind removing the FIXME comment as well, when you check in your patch please ? Cheers Nick ^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: GDB MinGW build error: implicit declaration of function 'wcsncasecmp' 2013-12-18 9:54 GDB MinGW build error: implicit declaration of function 'wcsncasecmp' asmwarrior 2013-12-18 9:58 ` asmwarrior 2013-12-18 10:06 ` BFD " Pedro Alves @ 2013-12-18 15:35 ` Eli Zaretskii 2 siblings, 0 replies; 16+ messages in thread From: Eli Zaretskii @ 2013-12-18 15:35 UTC (permalink / raw) To: asmwarrior; +Cc: gdb > Date: Wed, 18 Dec 2013 17:53:07 +0800 > From: asmwarrior <asmwarrior@gmail.com> > > I see the build error when I build GDB(git head) under MSYS+MinGW, here the is build log > > mv -f .deps/pe-i386.Tpo .deps/pe-i386.Plo > rm -f peigen.c > sed -e s/XX/pe/g < ../../binutils-gdb/bfd/peXXigen.c > peigen.new > mv -f peigen.new peigen.c > /bin/sh ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binutils-gdb/bfd -D__USE_MINGW_FSEEK -I. -I../../binutils-gdb/bfd -I../../binutils-gdb/bfd/../include -DHAVE_i386pe_vec -DHAVE_i386pei_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -DBINDIR='"/mingw/bin"' -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wno-format -Werror -O0 -g -D__USE_MINGW_ACCESS -MT peigen.lo -MD -MP -MF .deps/peigen.Tpo -c -o peigen.lo peigen.c > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../binutils-gdb/bfd -D__USE_MINGW_FSEEK -I. -I../../binutils-gdb/bfd -I../../binutils-gdb/bfd/../include -DHAVE_i386pe_vec -DHAVE_i386pei_vec -DHAVE_bfd_elf32_i386_vec -DHAVE_bfd_elf32_little_generic_vec -DHAVE_bfd_elf32_big_generic_vec -DBINDIR=\"/mingw/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wno-format -Werror -O0 -g -D__USE_MINGW_ACCESS -MT peigen.lo -MD -MP -MF .deps/peigen.Tpo -c peigen.c -o peigen.o > peigen.c: In function 'rsrc_cmp': > peigen.c:3006:7: error: implicit declaration of function 'wcsncasecmp' [-Werror=implicit-function-declaration] > res = wcsncasecmp (& awc, & bwc, 1); > ^ MinGW doesn't have this function, it needs to be emulated using the non-standard lstrcmpiW. ^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2013-12-19 15:13 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-18 9:54 GDB MinGW build error: implicit declaration of function 'wcsncasecmp' asmwarrior
2013-12-18 9:58 ` asmwarrior
2013-12-18 10:06 ` BFD " Pedro Alves
2013-12-18 12:50 ` asmwarrior
2013-12-18 15:47 ` Eli Zaretskii
2013-12-18 13:03 ` [RFC] BFD MinGW/Cygwin build error in bfd/peiXXgen.c Pierre Muller
2013-12-18 17:52 ` nick clifton
2013-12-19 11:45 ` [RFC-v2] " Pierre Muller
2013-12-19 12:41 ` nick clifton
2013-12-19 13:02 ` Mark Kettenis
2013-12-19 13:18 ` Pierre Muller
2013-12-19 15:13 ` nick clifton
[not found] ` <52b19d01.22cbc20a.69b0.ffffb29eSMTPIN_ADDED_BROKEN@mx.google.com>
2013-12-18 13:25 ` [RFC] " asmwarrior
[not found] ` <52b19d19.0850420a.7b6a.52dcSMTPIN_ADDED_BROKEN@mx.google.com>
2013-12-18 17:56 ` Pedro Alves
2013-12-19 11:15 ` nick clifton
2013-12-18 15:35 ` GDB MinGW build error: implicit declaration of function 'wcsncasecmp' Eli Zaretskii
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox