You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by "Schlesinger, Philip" <ps...@filenet.com> on 2006/07/14 03:29:00 UTC
Follow up question on single threading
Hi! Using the Xerces single-threading rules as a model, we tried the
following changes in an attempt to force Xalan to build itself
single-threaded. Do you think they're ok? Would you have any
suggestions?
- Phil
For Aix
o Replace xlc_r and xlC_r libraries with xlc and xlC respectively
o Replace makeC++SharedLib_r with makeC++SharedLib
o Remove flag -D_THREAD_SAFE, add flag -DAPP_NO_THREADS
o Grep -i thread Makefile*, remove all mentioning of thread, se
ignorecase, (Remove qthreaded, pthread)
- For HPUX and HP Itanium
o Add flag -DAPP_NO_THREADS
o Remove inclusion of -lpthread
o Remove threading define like -D_PTHREADS_DRAFTS, -DXML_USE_DCE
We tried similar steps in Solaris, but got an error when compiling
XalanEXSLDateTime.cpp:
- For Solaris
o Remove flag -D_REENTRANT , add flag -DAPP_NO_THREADS
o Remove compiler switch -mt
o Remove inclusion of -lpthread
"/PEBuilds/bldtogether/xml-xalan/c/src/xalanc/XalanEXSLT/XalanEXSLTDateT
ime.cpp", line 188: Error: The function "localtime_r" must have a
prototype.
"/PEBuilds/bldtogether/xml-xalan/c/src/xalanc/XalanEXSLT/XalanEXSLTDateT
ime.cpp", line 194: Error: The function "gmtime_r" must have a
prototype.
(it seems to require the define of XALAN_NO_REENTRANT_TIME_FUNCTIONS to
see this method)
Re: Follow up question on single threading
Posted by David Bertoni <db...@apache.org>.
Schlesinger, Philip wrote:
> Hi! Using the Xerces single-threading rules as a model, we tried the
> following changes in an attempt to force Xalan to build itself
> single-threaded. Do you think they're ok? Would you have any
> suggestions?
>
> - Phil
>
> For Aix
> o Replace xlc_r and xlC_r libraries with xlc and xlC respectively
> o Replace makeC++SharedLib_r with makeC++SharedLib
> o Remove flag -D_THREAD_SAFE, add flag -DAPP_NO_THREADS
> o Grep -i thread Makefile*, remove all mentioning of thread, se
> ignorecase, (Remove qthreaded, pthread)
>
>
> - For HPUX and HP Itanium
> o Add flag -DAPP_NO_THREADS
> o Remove inclusion of -lpthread
> o Remove threading define like -D_PTHREADS_DRAFTS, -DXML_USE_DCE
>
Those changes look fine, although you don't need to define APP_NO_THREADS
for Xalan-C's sake.
> We tried similar steps in Solaris, but got an error when compiling
> XalanEXSLDateTime.cpp:
>
> - For Solaris
> o Remove flag -D_REENTRANT , add flag -DAPP_NO_THREADS
> o Remove compiler switch -mt
> o Remove inclusion of -lpthread
>
> "/PEBuilds/bldtogether/xml-xalan/c/src/xalanc/XalanEXSLT/XalanEXSLTDateT
> ime.cpp", line 188: Error: The function "localtime_r" must have a
> prototype.
> "/PEBuilds/bldtogether/xml-xalan/c/src/xalanc/XalanEXSLT/XalanEXSLTDateT
> ime.cpp", line 194: Error: The function "gmtime_r" must have a
> prototype.
> (it seems to require the define of XALAN_NO_REENTRANT_TIME_FUNCTIONS to
> see this method)
>
Yes, you'll need to define XALAN_NO_REENTRANT_TIME_FUNCTIONS.
Dave