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] Handle cygwin wchar_t specifics


>>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr> writes:

Pierre>   Yes, but the problem is that it is not possible to use sizeof
Pierre> inside a #if conditions :(
 
Pierre>   Do you know of any way to get the size of wchar_t?
Pierre>   I suspect we will need to add this to the configure scripts...
Pierre> But I am still very bad on that part.

In this case you don't need to know the size during preprocessing.
You can do something like:

extern const char *intermediate_encoding;
#define INTERMEDIATE_ENCODING intermediate_encoding

... and then initialize the string in _initialize_charset, under the
appropriate conditions.  The only caveat is to check the case where the
size is neither 2 nor 4.

Tom


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