You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by David N Bertoni/Cambridge/IBM <da...@us.ibm.com> on 2002/02/20 18:28:19 UTC

Re: VC7 Compatability

Ironically, I've just been working through the same issue.  My feeling is
that, on platforms where wchar_t is know to contain UTF-16 (or UCS-2)  code
points, XMLCh should be a typedef for wchar_t.  As that's true for both VC6
and VC7, Xerces ought to use it for both versions.

Since lots of Xerces code will break under VC7 if XMLCh is _not_ a typedef
for XMLCh and that flag is set, I agree that something must be done.

FWIW, I'd also like to see this happen on AIX, where wchar_t has been a
distinct type for a very long time.  This causes us no end of
inter-operability issues with Xerces and the ICU.

Dave



                                                                                                              
                      "Thomas Walpole"                                                                        
                      <twalpole@adaptr         To:      <xe...@xml.apache.org>                         
                      onic.de>                 cc:      (bcc: David N Bertoni/Cambridge/IBM)                  
                                               Subject: VC7 Compatability                                     
                      02/20/2002 09:32                                                                        
                      AM                                                                                      
                      Please respond                                                                          
                      to xerces-c-dev                                                                         
                                                                                                              
                                                                                                              



VC7 will treat wchar_t as a seperate type if the compile switch
'Zc:wchar_t'
is used.  It also defines the symbol _WCHAR_T_DEFINED if the switch is
used.
Does it make sense therefore to change VCPPDEFS.CPP line 142 from

typedef wchar_t XMLCh;

to

#ifdef _WCHAR_T_DEFINED
             typedef wchar_t XMLCh;
#else
             typedef unsigned short  XMLCh;
#endif

?

Tom Walpole


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org







---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org