This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/commit 2/2] Import gnulib's errno module.


> 1. Ensure that charset.c includes the files in the correct order.
> 
> 2. Back out your change and promote the EILSEQ define out of charset.c
>    to somewhere more global in gdb.

The reason why I imported gnulib's errno was because gnulib's
mbrtowc failed to build (on ppc-lynx178), because EILSEQ wasn't
defined. Neither of these options, I think would address the
problem in gnulib, because it only includes system and gnulib
includes.

For the GDB sources themselves, option 1 would only partially
work.  It would work when testing after libiconv routines,
but not after wide-char conversion routines.

Perhaps the way forward is to test for both EILSEQ and ENOENT when
EILSEQ is defined by gnulib, instead of just EILSEQ. Another option:
Define LIBICONV_EILSEQ to the value that libiconv uses, and then
use this macro when testing the reusult of libiconv routines.

> Joel> IMO, a more promising approach would be to convince libiconv
> Joel> to use gnulib's errno instead.
> 
> You could try it but that option scares me a little in that what if
> there is gnulib version skew between gdb and libiconv?

Yes - we'd need to check minimum libiconv version. Definitely
a long term plan at best...

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]