Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
CurrentCVS
-
None
-
None
-
SuSE-Linux-9.3
Description
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.