PostgreSQL, OpenSSL, and the GPL
PostgreSQL, OpenSSL, and the GPL
Posted Feb 19, 2011 23:07 UTC (Sat) by nix (subscriber, #2304)In reply to: PostgreSQL, OpenSSL, and the GPL by butlerm
Parent article: PostgreSQL, OpenSSL, and the GPL
Not necessarily. I've written a good few headers which define convenience functions as static functions in the header file, which only call other public functions with guaranteed API/ABI. This makes them inlinable even if the bulk of the library is in a shared object and thus not amenable to cross-translation-unit inlining from its users, while simultaneously being quite safe compatibility-wise: if the functions they call break, they'd break for all their other users too. The only real downside is that bugs fixed in those functions will not be reflected by their users until those users are recompiled.
Static functions in the header which mess with non-API-guaranteed stuff are exactly as bad as allowing your users to mess with such stuff in the first place. In both cases, the answer is the same: Don't Do That.
