xiph / ogg

Reference implementation of the Ogg media container
BSD 3-Clause "New" or "Revised" License
345 stars 168 forks source link

simplification of code and build system: require C99 and use the [u]int*_t types #89

Closed vtorri closed 2 years ago

vtorri commented 2 years ago

What about using C99 standard and its types, instead of checking for all the possible values ? C99 was 23 years old and one can consider that the compilers support it on all the needed platforms

rillian commented 2 years ago

The ogg library(22 years old!) targets C89. Microsoft Visual Studio only added support for stdint.h in VS2013 (9 years ago). Even then there was a long tail of embedded device toolchains with poor C99 support. You're probably correct that targetting C99 would be fine today, though.

While using C99 types would tidy up the code, I don't see the advantage of changing a mature library. A number of projects re-use the ogg_* types so we'd have to either continue exporting them or break API.

vtorri commented 2 years ago

actually, i had that in mind : breaking api and release another major version

rillian commented 2 years ago

Porting stable software to a new API is a lot of work. What else would you change to make that worthwhile for ogg users?

If you're interested in moving to more modern code you might also want to consider a Rust implementation and the libogg2-zerocopy branch here.

vtorri commented 2 years ago

sorry, i'm involved in too much projects right now, i just throw some ideas, but you can at least the simplifications in configure.ac and useless ogg.m4

i begun the meson stuff, though. I compiles but there it's not finished

rillian commented 2 years ago

Ok. Thanks for the suggestion!