on dlclose. Also correctly call constructors and destructors for libraries
linked with /usr/lib/c++rt0.o.
Change interpretation of dlopen manpage to call _init() rather than init()
for dlopened objects.
Change c++rt0.o to avoid using atexit to call destructors, allowing dlclose to
call destructors when an object is unloaded.
Change interface between crt0 and ld.so to allow crt0 to call a function on
exit to call destructors for shared libraries explicitly.
These changes are backwards compatible. Old binaries will work with the new
ld.so and new binaries will work with the old ld.so. A version number has
been introduced in the crt0-ld.so interface to allow for future changes.
Reviewed by: GAWollman, Craig Struble <cstruble@singularity.bevc.blacksburg.va.us>
(void) setlocale(LC_ALL, "");
It will be easiest way now to make national chars available
for all ctype-oriented programs at once by simple:
setenv LANG Your_National_Charset
Default case (without "LANG" environment
variable) will be fully ANSI compatible (got "C" locale).
If "LANG" variable present, extention becomes active.
Effect of this extention is great: in one time all ctype
oriented programs can accept/print national characters
without any touching source/binary code, it is big win, IMHO.
This method is fully compatible with ISO8859-* and russian koi8-r
too (in general -- with all 8-bit character sets). I think
it is very useful.
I got this idea from Xenix locale implementation.
This extention is even never compiled in, unless you set
setenv STARTUP_LOCALE
before rebuilding crt0.c or corresponding variable in /etc/make.conf
program. The idea was that these are 'alignment' crap, but the image
is 16byte-aligned without these. Location 0 still doesn't have a 0,
but who cares, binaries wil be built with page zero unmapped in the
near future.