[PATCH] Version symbols
The attached patch adds symbol versioning. Doing this
-
ao_read_config_files()
-
ao_au
-
ao_null
-
ao_raw
-
ao_wav
are not exported anymore. Looking at http://www.xiph.org/ao/doc/libao-api.html it seems this is OK, correct?
Notice that web page (and the ao.h file) talks about an ao_file_extension() function. But such a function doesn't exists at all!! It's not exported with this patch and wasn't exported before.
The patch is against the latest SVN version. I used only the LIBAO4_1.0.0 symbol (extra verbose, could be changed) since I don't know of any added functionality in any of the functions since the 1.0.0 version... is this OK?
The symbol versioning support detection from configure.ac is copied from libpng, so I expect it to work without problems in other systems. Still, I didn't test it.
Symbol versioning has multiple advantages:
-
Avoids crashes in UNIX systems when two ABI incompatible versions of libao are loaded in the same process image (since symbol resolution is global)
-
The RPM build process automatically adds dependencies based on symbol versions. So, if the library is versioned, a package that requires libao 1.0.1 will have such dependency in the RPM package. Otherwise any library with the same soname, even if too old, would be allowed.
-
If you trust Drepper and want to do the extra work, you can avoid any future ABI breakage.