Kenwood HP 9000 Personal Computer User Manual


 
Chapter 5 149
Creating and Using Libraries
Version Control with Shared Libraries
Version Control with Shared Libraries
HP-UX provides two ways to support incompatible versions of shared
library routines. “Library-Level Versioning” describes how you create
multiple versions of a shared library. “Intra-Library Versioning”
describes how a single shared library can have multiple versions of an
object module. Library-level versioning is recommended over
intra-library versioning.
NOTE Beginning with HP-UX Release 11.00, the 64-bit linker toolset supports
only library-level versioning.
When to Use Shared Library Versioning
For the most part, updates to a shared library should be completely
upward-compatible; that is, updating a shared library won't usually
cause problems for programs that use the library. But sometimes — for
example, if you add a new parameter to a routine — updates cause
undesirable side-effects in programs that call the old version of the
routine. In such cases, it is desirable to retain the old version as well as
the new. This way, old programs will continue to run and new programs
can use the new version of the routine.
Here are some guidelines to keep in mind when making changes to a
library:
When creating the first version of a shared library, carefully consider
whether or not you will need versioning. It is easier to use
library-level versioning from the start.
When creating the first version of a shared library using intra-library
versioning, version control is not an issue: The default version
number is satisfactory.
When creating future revisions of a library, you must determine when
a change represents an incompatible change, and thus deserves a new
version. Some examples of incompatible changes are as follows: