LWN.net Logo

libpng

libpng

Posted Jun 29, 2011 14:47 UTC (Wed) by tialaramex (subscriber, #21167)
In reply to: Zeuthen: Writing a C library, part 2 by jhhaller
Parent article: Zeuthen: Writing a C library, part 1

This type of thing is what went wrong in libpng. Their worst sin was /inserting/ new structure members into an existing structure definition which was part of their public ABI. But there were many others, including changing the declaration of ABI functions depending on your build flags.

For a while its authors tried being indignant, insisting that you should only use a libpng program with the precise build of the precise version of the library against which it was compiled.

Eventually we managed to explain to them how ABI compatibility works, and the modern libpng takes roughly the getter/setter approach with the caller having only an opaque handle to the internal structures.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds