There is a wikipedia entry for Library which explains shared libraries:
http://en.wikipedia.org/wiki/Library_(computer_science)
I may be wrong, but I think whether a library (function) is reentrant
or not depends on how you code it.
True, it's possible to make a function non-reentrant unnecessarily
by poor cooding.
However, some functions, like strtok() as defined by Standard C,
cannot be made reentrant and still conform to the requirements for
the function. You can sometimes add an argument that points to
storage that holds state for the function to make it reentrant, but
then it no longer has the same function signature required. It's
now a different function and it needs a different name.
You can use some non-reentrant
system call or library function in your library, and then your library
becomes non-reentrant.
If you use reentrant system calls or functions
in your library, then your library is reentrant. Actually, I think it
is more correct to say whether a function, rather than a library, is
reentrant.
A reasonable definition of a "reentrant library" would seem to be:
A library is reentrant if and only if all of the functions in it
are reentrant.
Some functions in a library may be reentrant, whereas
others in the same library are non-reentrant.
It is sometimes the case that a non-reentrant initialization function
must be called before any of the other functions are used, and that
the reentrant functions use a number of "write-once" variables set
by the initialization function (for example, loading locale-specific
messages for the appropriate language). This would make the library
non-reentrant even if there is no explicit call to the initialization
function since the shared library mechanism automatically calls it.