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 xe...@xml.apache.org on 2004/08/26 01:48:20 UTC

[jira] Created: (XERCESC-1265) Cannot build Mach-O library using CW Pro 9 and BSD C headers

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESC-1265

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1265
    Summary: Cannot build Mach-O library using CW Pro 9 and BSD C headers
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Xerces-C++
 Components: 
             Build
   Versions:
             2.5.0

   Assignee: 
   Reporter: Tobias Patton

    Created: Wed, 25 Aug 2004 4:47 PM
    Updated: Wed, 25 Aug 2004 4:47 PM
Environment: Mac OS X 10.3. Codewarrior 9.3

Description:
It should be possible to build Xerces as a static Mach-O library using the BSD C headers instead of the MSL C Headers. With the latest source code distribution, this is not possible. It can, however, be done by making two small changes to the source.

The changes I made may not be the best way to accomplish this goal. My interest is in touching as few files as possible to get the Mach-O libary to build. Other parties may be interested in doing it right.

Here is the diff to MacOSDefs.hpp:

[tpatton@TPatton_Mac TMXL]\$ p4 diff /Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Platforms/MacOS/MacOSDefs.hpp#4 /Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Platforms/MacOS/MacOSDefs.hpp#3
/Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Platforms/MacOS/MacOSDefs.hpp#4 - file(s) up-to-date.
==== //depot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Platforms/MacOS/MacOSDefs.hpp#3 - /Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Platforms/MacOS/MacOSDefs.hpp ====
77a78,109
> //--    Creo Change 8/24/04
> //      [ tpatton ]
> //
> //      Code in <xercesc/util/platforms/MacOS/> expects some function and types
> //      to be in the std:: namespace, which is where the MSL C headers put them.
> //      However, the BSD header put them in global namesapce. If we're using
> //      the BSD C headers, move them into std:: namespace.
> 
> #if defined( __MACH__ ) && ! _MSL_USING_MW_C_HEADERS
> 
> #include <cstring>
> 
> namespace std
> {
>     typedef unsigned long size_t;
>     using ::memcpy; 
>     using ::memmove;
>     using ::strlen;
>     using ::wint_t;
>     
>     //--    towupper() is a macro defined in <wctype.h>
>     
>     static wint_t towupper(wint_t wc )
>     {
>         return __toupper( wc );
>     }
> }
> 
> #endif
> 
> //--    END Creo change.
> 
[tpatton@TPatton_Mac TMXL]\$ 

and here is the diff to MacOSUnicodeConverter.cpp:

[tpatton@TPatton_Mac TMXL]\$ p4 diff /Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp /Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp#3
/Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp - file(s) not opened on this client.
==== //depot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp#3 - /Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp ====
73c73,80
<       #include <cwctype>
---
> 
>     //--    Creo Change 8/24/04
>     //      [ tpatton ]
>     #if _MSL_USING_MW_C_HEADERS
>           #include <cwctype>
>     #endif
>       //
>       //      END Creo Change
[tpatton@TPatton_Mac TMXL]\$ 




---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESC-1265) Cannot build Mach-O library using CW Pro 9 and BSD C headers

Posted by xe...@xml.apache.org.
The following comment has been added to this issue:

     Author: Tobias Patton
    Created: Mon, 20 Sep 2004 2:31 PM
       Body:
Codewarrior for MacOS provide its own implementations of the C and C++ standard libraries called MSL. It is possible to build a Mach-O binaries using the MSL libraries and headers. It is also possible to build a Mach-O binaries using the BSD C library that ships with Mac OS X, and the MSL C++ library that ships with Codewarrior. This combination is explicitly supported by Metrowerks, and is how we're building our product. 

To accomplish this setup, it's only necessary to change the order of header and library access paths so that /usr/lib and /usr/include are searched before {Compiler}/MSL/MSC_C. If you like, I could send along a copy of the project I'm using to build Xerces-C to these specifications.

You can read more about this in the release notes for CW 9 for MacOS. Specifically, look in the "Release Notes/Mach-O" directory.

I'm not surprised that building with gcc and XCode works. It's the combination of BSD C and MSL C++ that causes the problems.


---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XERCESC-1265?page=comments#action_53262

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESC-1265

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1265
    Summary: Cannot build Mach-O library using CW Pro 9 and BSD C headers
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Xerces-C++
 Components: 
             Build
   Versions:
             2.5.0

   Assignee: 
   Reporter: Tobias Patton

    Created: Wed, 25 Aug 2004 4:47 PM
    Updated: Mon, 20 Sep 2004 2:31 PM
Environment: Mac OS X 10.3. Codewarrior 9.3

Description:
It should be possible to build Xerces as a static Mach-O library using the BSD C headers instead of the MSL C Headers. With the latest source code distribution, this is not possible. It can, however, be done by making two small changes to the source.

The changes I made may not be the best way to accomplish this goal. My interest is in touching as few files as possible to get the Mach-O libary to build. Other parties may be interested in doing it right.

Here is the diff to MacOSDefs.hpp:

[tpatton@TPatton_Mac TMXL]\$ p4 diff /Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Platforms/MacOS/MacOSDefs.hpp#4 /Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Platforms/MacOS/MacOSDefs.hpp#3
/Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Platforms/MacOS/MacOSDefs.hpp#4 - file(s) up-to-date.
==== //depot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Platforms/MacOS/MacOSDefs.hpp#3 - /Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Platforms/MacOS/MacOSDefs.hpp ====
77a78,109
> //--    Creo Change 8/24/04
> //      [ tpatton ]
> //
> //      Code in <xercesc/util/platforms/MacOS/> expects some function and types
> //      to be in the std:: namespace, which is where the MSL C headers put them.
> //      However, the BSD header put them in global namesapce. If we're using
> //      the BSD C headers, move them into std:: namespace.
> 
> #if defined( __MACH__ ) && ! _MSL_USING_MW_C_HEADERS
> 
> #include <cstring>
> 
> namespace std
> {
>     typedef unsigned long size_t;
>     using ::memcpy; 
>     using ::memmove;
>     using ::strlen;
>     using ::wint_t;
>     
>     //--    towupper() is a macro defined in <wctype.h>
>     
>     static wint_t towupper(wint_t wc )
>     {
>         return __toupper( wc );
>     }
> }
> 
> #endif
> 
> //--    END Creo change.
> 
[tpatton@TPatton_Mac TMXL]\$ 

and here is the diff to MacOSUnicodeConverter.cpp:

[tpatton@TPatton_Mac TMXL]\$ p4 diff /Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp /Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp#3
/Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp - file(s) not opened on this client.
==== //depot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp#3 - /Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp ====
73c73,80
<       #include <cwctype>
---
> 
>     //--    Creo Change 8/24/04
>     //      [ tpatton ]
>     #if _MSL_USING_MW_C_HEADERS
>           #include <cwctype>
>     #endif
>       //
>       //      END Creo Change
[tpatton@TPatton_Mac TMXL]\$ 




---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESC-1265) Cannot build Mach-O library using CW Pro 9 and BSD C headers

Posted by xe...@xml.apache.org.
The following comment has been added to this issue:

     Author: James Berry
    Created: Mon, 20 Sep 2004 1:07 PM
       Body:
Hi Tobias,

Can you clarify which BSD C headers you're talking about? The code builds fine under gcc from the command line, as well as from xcode. Is this a set of BSD headers shipped by Metrowerks?

-jdb
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XERCESC-1265?page=comments#action_53255

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESC-1265

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESC-1265
    Summary: Cannot build Mach-O library using CW Pro 9 and BSD C headers
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Xerces-C++
 Components: 
             Build
   Versions:
             2.5.0

   Assignee: 
   Reporter: Tobias Patton

    Created: Wed, 25 Aug 2004 4:47 PM
    Updated: Mon, 20 Sep 2004 1:07 PM
Environment: Mac OS X 10.3. Codewarrior 9.3

Description:
It should be possible to build Xerces as a static Mach-O library using the BSD C headers instead of the MSL C Headers. With the latest source code distribution, this is not possible. It can, however, be done by making two small changes to the source.

The changes I made may not be the best way to accomplish this goal. My interest is in touching as few files as possible to get the Mach-O libary to build. Other parties may be interested in doing it right.

Here is the diff to MacOSDefs.hpp:

[tpatton@TPatton_Mac TMXL]\$ p4 diff /Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Platforms/MacOS/MacOSDefs.hpp#4 /Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Platforms/MacOS/MacOSDefs.hpp#3
/Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Platforms/MacOS/MacOSDefs.hpp#4 - file(s) up-to-date.
==== //depot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Platforms/MacOS/MacOSDefs.hpp#3 - /Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Platforms/MacOS/MacOSDefs.hpp ====
77a78,109
> //--    Creo Change 8/24/04
> //      [ tpatton ]
> //
> //      Code in <xercesc/util/platforms/MacOS/> expects some function and types
> //      to be in the std:: namespace, which is where the MSL C headers put them.
> //      However, the BSD header put them in global namesapce. If we're using
> //      the BSD C headers, move them into std:: namespace.
> 
> #if defined( __MACH__ ) && ! _MSL_USING_MW_C_HEADERS
> 
> #include <cstring>
> 
> namespace std
> {
>     typedef unsigned long size_t;
>     using ::memcpy; 
>     using ::memmove;
>     using ::strlen;
>     using ::wint_t;
>     
>     //--    towupper() is a macro defined in <wctype.h>
>     
>     static wint_t towupper(wint_t wc )
>     {
>         return __toupper( wc );
>     }
> }
> 
> #endif
> 
> //--    END Creo change.
> 
[tpatton@TPatton_Mac TMXL]\$ 

and here is the diff to MacOSUnicodeConverter.cpp:

[tpatton@TPatton_Mac TMXL]\$ p4 diff /Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp /Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp#3
/Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp - file(s) not opened on this client.
==== //depot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp#3 - /Users/tpatton/PerforceDepot/workspace.tobias_patton/oem/xerces-c/src/xercesc/util/Transcoders/MacOSUnicodeConverter/MacOSUnicodeConverter.cpp ====
73c73,80
<       #include <cwctype>
---
> 
>     //--    Creo Change 8/24/04
>     //      [ tpatton ]
>     #if _MSL_USING_MW_C_HEADERS
>           #include <cwctype>
>     #endif
>       //
>       //      END Creo Change
[tpatton@TPatton_Mac TMXL]\$ 




---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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