#334 Create different link symbols for different XML_Char sizes

Feature Request
closed-out-of-date
nobody
None
5
2017-09-03
2004-10-16
No

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".

Discussion

  • Fred L. Drake, Jr.

    • status: open --> open-postponed
     
  • Fred L. Drake, Jr.

    Logged In: YES
    user_id=3066

    This should definately be done, but will break binary
    compatibility with recent releases.

    We'll plan to include this as a new feature in Expat 3
    (Expat 2 will be the result of recent, not something
    incompatible with the current releases).

    Marking this "postponed"; this will be un-postponed when we
    start Expat 3 development.

     
  • Sebastian Pipping

    • status: open-postponed --> closed-out-of-date
     
  • Sebastian Pipping

    Linux solutions including Debian and Gentoo have addressed this problem by providing two libraries: libexpat.so and libexpatw.so (compiled with XML_UNICODE). It seems that approach is good enough, closing.

     

Log in to post a comment.