-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix exported symbols #218
Fix exported symbols #218
Conversation
Are these symbols really meant to be exported? They look like internal functions that are not supposed to be used by applications. Of course, they shouldn't be in the public headers. |
Maybe these headers should be private, but it's worth noting that jpeg2000 driver in |
It might be possible to make the main entry points for the individual codecs private (i.e., not exported by the library). I suspect that this would break things for a number of projects, however. I don't think it would be a good idea to simply make these interfaces private without someone warning the users of the library. If one really wanted to make these functions private, it would be best to mark them as deprecated and then only much later make them private (i.e., stop exporting them). |
They are currently private, because they are not marked with This is about a mistake somebody made long ago, but we're not sure if...
On many other operating systems (including Linux), however, all symbols are exported by default. Even those which are not declared in any public header. This may be why nobody ever noticed the mistake. And it means that nobody has ever used JasPer on Windows (with an application requiring those symbols).
This requires updating JasPer's SO version, breaking (binary) compatibility with all applications using JasPer, even those which never used those symbols. Because you must never change the ABI without changing the SO version. |
I'm sorry, but I meant private on Linux/Unix. As you noted, things are exported on Linux/Unix unless you explicitly say otherwise. So, on Linux/Unix (which is a very large number of users of JasPer), code could be relying on these (implicitly) exported symbols, right? This is the point that I was trying to make. |
Yep, I think this should be done only after a binary compatible release to the last version. A release that mainly fixes the CVEs and other cleanup Max and I did. |
I merged this now (and fixed the conflicts), because my interpretation of @mdadams's reply is that applications may rely on these symbols and they should be exported. Many symbols declared in the public headers should never have been declared publically, however. And we should minimize the public API/ABI in the next major release. Exposing so much of JasPer's internals makes it hard to improve JasPer. |
closes #217