You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Dmitry Hayes (JIRA)" <xa...@xml.apache.org> on 2005/07/08 00:59:11 UTC

[jira] Updated: (XALANC-526) Use of undefined stricmp breaks compilation on Linux

     [ http://issues.apache.org/jira/browse/XALANC-526?page=all ]

Dmitry Hayes updated XALANC-526:
--------------------------------

    Attachment: patch.txt

Patch , removing usage if stricmp in MsgCreator.cpp and XalabFileUtils.cpp. Dave , pls review !

> Use of undefined stricmp breaks compilation on Linux
> ----------------------------------------------------
>
>          Key: XALANC-526
>          URL: http://issues.apache.org/jira/browse/XALANC-526
>      Project: XalanC
>         Type: Bug
>   Components: XalanC
>     Versions: CurrentCVS
>  Environment: SuSE-Linux-9.3
>     Reporter: Axel Weiss
>     Assignee: Dmitry Hayes
>  Attachments: patch.txt, stricmp-20050612.diff
>
> The use of stricmp is not recommended on systems where this symbol is not defined. There are some tender basic approaches in the xalanc sources to make the case-insensitive comparison abstract (e.g. xml-xalan/c/src/xalanc/Utils/MsgCreator/MsgCreator.cpp: depending on the symbol OS390 be defined, strcasecmp is used instead of stricmp).
> There's a workaround to compile on systems where stricmp is not defined:
>    ./runConfigure ... -z -Dstricmp=strcasecmp
> but this seems rather a dirty hack than a solution.
> Clearly, the clean way would be to have the presence of stricmp checked during configure, and have a symbol HAVE_STRICMP indicating the result of the check. However, this would require to have a config.h and source files that make use of it. At the end, making such changes possibly was only waste of time, if xalan switched to autotools one day (like xerces already has done).
> So, I provide a patch, that works for me, but possibly breaks other setups. I don't intend to fix anything here but to use strcasecmp instead of stricmp on linux systems. My real intention here is to give a hint (in form of a diff file), which parts of xalan are affected by this issue, so it might help in implementing a clean solution, in the case that autotools will actually be used for xalan.

-- 
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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org