It would be nice if some C preprocessor magic could be used to make
different XML_Char sizes, selected at compile time, result in different
link symbols for the functions in the API.
This would make it possible for different shared libraries making up an
application on linux, to link against expat shared libraries that have
been compiled with different values for XML_char.
I ran into a problem when I had compiled my own shared library
version of expat on linux, compiled with -DUNICODE, and a base
library had been linked with the fontconfig library, to improve X11 font
handling. The fontconfig library had an XML config file, and used expat
to parse the file. It used the system installed version of expat, which
had a char sized XML_Char.
This resulted in the following console output at my application's startup:
Fontconfig error: line 1: unknown encoding
Fontconfig error: Cannot load default config file
and the application started up with a strange-looking font named
"Arioso", when what I expected was "Helvetica".
Log in to post a comment.