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 "Eric Albert (JIRA)" <xe...@xml.apache.org> on 2005/09/17 00:26:55 UTC
[jira] Created: (XERCESC-1502) xerces gets endianness wrong on Intel-based Macs
xerces gets endianness wrong on Intel-based Macs
------------------------------------------------
Key: XERCESC-1502
URL: http://issues.apache.org/jira/browse/XERCESC-1502
Project: Xerces-C++
Type: Bug
Components: Miscellaneous
Versions: Nightly build (please specify the date)
Environment: Mac OS X on an Apple Developer Transition Kit
Reporter: Eric Albert
MacOSDefs.hpp currently says this:
// ---------------------------------------------------------------------------
// MacOS runs in big endian mode.
// ---------------------------------------------------------------------------
#define ENDIANMODE_BIG
That's wrong, or at least out of date -- Apple is shifting to Intel-based Macs and will support both PowerPC and Intel systems moving forward. The Intel-based Macs are of course little-endian.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
[jira] Updated: (XERCESC-1502) xerces gets endianness wrong on Intel-based Macs
Posted by "Eric Albert (JIRA)" <xe...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XERCESC-1502?page=all ]
Eric Albert updated XERCESC-1502:
---------------------------------
Attachment: diffs.tgz
Attached a patch against xerces TOT which resolves this issue.
> xerces gets endianness wrong on Intel-based Macs
> ------------------------------------------------
>
> Key: XERCESC-1502
> URL: http://issues.apache.org/jira/browse/XERCESC-1502
> Project: Xerces-C++
> Type: Bug
> Components: Miscellaneous
> Versions: Nightly build (please specify the date)
> Environment: Mac OS X on an Apple Developer Transition Kit
> Reporter: Eric Albert
> Attachments: diffs.tgz
>
> MacOSDefs.hpp currently says this:
> // ---------------------------------------------------------------------------
> // MacOS runs in big endian mode.
> // ---------------------------------------------------------------------------
> #define ENDIANMODE_BIG
> That's wrong, or at least out of date -- Apple is shifting to Intel-based Macs and will support both PowerPC and Intel systems moving forward. The Intel-based Macs are of course little-endian.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
[jira] Commented: (XERCESC-1502) xerces gets endianness wrong on Intel-based Macs
Posted by "David Bertoni (JIRA)" <xe...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XERCESC-1502?page=comments#action_12329593 ]
David Bertoni commented on XERCESC-1502:
----------------------------------------
I think we should determine the platform endianness through the configure script, rather than through hard-coded defines in the header files. Since we are making major changes for the 3.0 release, we might as well try to do that now.
> xerces gets endianness wrong on Intel-based Macs
> ------------------------------------------------
>
> Key: XERCESC-1502
> URL: http://issues.apache.org/jira/browse/XERCESC-1502
> Project: Xerces-C++
> Type: Bug
> Components: Miscellaneous
> Versions: Nightly build (please specify the date)
> Environment: Mac OS X on an Apple Developer Transition Kit
> Reporter: Eric Albert
> Attachments: diffs.tgz
>
> MacOSDefs.hpp currently says this:
> // ---------------------------------------------------------------------------
> // MacOS runs in big endian mode.
> // ---------------------------------------------------------------------------
> #define ENDIANMODE_BIG
> That's wrong, or at least out of date -- Apple is shifting to Intel-based Macs and will support both PowerPC and Intel systems moving forward. The Intel-based Macs are of course little-endian.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
[jira] Updated: (XERCESC-1502) xerces gets endianness wrong on
Intel-based Macs
Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESC-1502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Boris Kolpackov updated XERCESC-1502:
-------------------------------------
Fix Version/s: 2.9.0
Would be good to fix for 2.9.0.
> xerces gets endianness wrong on Intel-based Macs
> ------------------------------------------------
>
> Key: XERCESC-1502
> URL: https://issues.apache.org/jira/browse/XERCESC-1502
> Project: Xerces-C++
> Issue Type: Bug
> Components: Miscellaneous
> Affects Versions: Nightly build (please specify the date)
> Environment: Mac OS X on an Apple Developer Transition Kit
> Reporter: Eric Albert
> Fix For: 2.9.0
>
> Attachments: diffs.tgz
>
>
> MacOSDefs.hpp currently says this:
> // ---------------------------------------------------------------------------
> // MacOS runs in big endian mode.
> // ---------------------------------------------------------------------------
> #define ENDIANMODE_BIG
> That's wrong, or at least out of date -- Apple is shifting to Intel-based Macs and will support both PowerPC and Intel systems moving forward. The Intel-based Macs are of course little-endian.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
[jira] Closed: (XERCESC-1502) xerces gets endianness wrong on
Intel-based Macs
Posted by "Boris Kolpackov (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESC-1502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Boris Kolpackov closed XERCESC-1502.
------------------------------------
Resolution: Won't Fix
Marking this bug as "Won't fix" since there are no plans to make any more releases in the 2-series.
> xerces gets endianness wrong on Intel-based Macs
> ------------------------------------------------
>
> Key: XERCESC-1502
> URL: https://issues.apache.org/jira/browse/XERCESC-1502
> Project: Xerces-C++
> Issue Type: Bug
> Components: Miscellaneous
> Affects Versions: Nightly build (please specify the date)
> Environment: Mac OS X on an Apple Developer Transition Kit
> Reporter: Eric Albert
> Fix For: 2.9.0
>
> Attachments: diffs.tgz
>
>
> MacOSDefs.hpp currently says this:
> // ---------------------------------------------------------------------------
> // MacOS runs in big endian mode.
> // ---------------------------------------------------------------------------
> #define ENDIANMODE_BIG
> That's wrong, or at least out of date -- Apple is shifting to Intel-based Macs and will support both PowerPC and Intel systems moving forward. The Intel-based Macs are of course little-endian.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
[jira] Commented: (XERCESC-1502) xerces gets endianness wrong on Intel-based Macs
Posted by "Eric Albert (JIRA)" <xe...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XERCESC-1502?page=comments#action_12329595 ]
Eric Albert commented on XERCESC-1502:
--------------------------------------
I agree, but there's one catch -- Mac OS X allows you to build for multiple architectures at once by invoking gcc with "-arch i386 -arch ppc". configure scripts don't work well with that because autoconf doesn't support the concept of targeting multiple configurations simultaneously.
As a result, checking for __BIG_ENDIAN__ or __LITTLE_ENDIAN__ (as I've done here) works better in practice than moving this into a configure script. Doing so works better than AC_C_BIGENDIAN in practice for all gcc-based platforms.
In fact, given the state of, say, the NetBSD platform defs I'd suggest this check be added to other platform definitions. However, I'm personally only interested in Mac OS X on Intel for now, since a few Mac developers have already hit this as part of their transition to Intel-based Macs.
> xerces gets endianness wrong on Intel-based Macs
> ------------------------------------------------
>
> Key: XERCESC-1502
> URL: http://issues.apache.org/jira/browse/XERCESC-1502
> Project: Xerces-C++
> Type: Bug
> Components: Miscellaneous
> Versions: Nightly build (please specify the date)
> Environment: Mac OS X on an Apple Developer Transition Kit
> Reporter: Eric Albert
> Attachments: diffs.tgz
>
> MacOSDefs.hpp currently says this:
> // ---------------------------------------------------------------------------
> // MacOS runs in big endian mode.
> // ---------------------------------------------------------------------------
> #define ENDIANMODE_BIG
> That's wrong, or at least out of date -- Apple is shifting to Intel-based Macs and will support both PowerPC and Intel systems moving forward. The Intel-based Macs are of course little-endian.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org
[jira] Commented: (XERCESC-1502) xerces gets endianness wrong on Intel-based Macs
Posted by "James Berry (JIRA)" <xe...@xml.apache.org>.
[ http://issues.apache.org/jira/browse/XERCESC-1502?page=comments#action_12329603 ]
James Berry commented on XERCESC-1502:
--------------------------------------
I am _so_ ahead of you guys ;)
I fixed this a while ago, in checkin 190921. The 3.0 code determines endianness at runtime during Iniatialize, with the following code:
// Determine our endianness (with regard to a XMLCh 16-bit word)
union {
XMLCh ch;
unsigned char ar[sizeof(XMLCh)];
} endianTest;
endianTest.ch = 1;
fgXMLChBigEndian = (endianTest.ar[sizeof(XMLCh)-1] == 1);
So you can configure once, and compile for multiple architectures, and still come out a winner!
(so it's fixed for 3.0, but not of course in the 2.x code).
James.
> xerces gets endianness wrong on Intel-based Macs
> ------------------------------------------------
>
> Key: XERCESC-1502
> URL: http://issues.apache.org/jira/browse/XERCESC-1502
> Project: Xerces-C++
> Type: Bug
> Components: Miscellaneous
> Versions: Nightly build (please specify the date)
> Environment: Mac OS X on an Apple Developer Transition Kit
> Reporter: Eric Albert
> Attachments: diffs.tgz
>
> MacOSDefs.hpp currently says this:
> // ---------------------------------------------------------------------------
> // MacOS runs in big endian mode.
> // ---------------------------------------------------------------------------
> #define ENDIANMODE_BIG
> That's wrong, or at least out of date -- Apple is shifting to Intel-based Macs and will support both PowerPC and Intel systems moving forward. The Intel-based Macs are of course little-endian.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org