]> www.ginac.de Git - cln.git/commit
Replace CL_REQUIRE/CL_PROVIDE(cl_prin_globals) with portable code.
authorAlexei Sheplyakov <varg@theor.jinr.ru>
Thu, 21 Aug 2008 09:56:15 +0000 (13:56 +0400)
committerAlexei Sheplyakov <varg@theor.jinr.ru>
Wed, 27 Aug 2008 04:41:02 +0000 (08:41 +0400)
commit040ed6f6ed478f65442b2e0fee05c19b42c0d5e9
tree8a5aebab5f63c02d499556bab97e40d2c45c72fb
parente94c6a2bfb11e490bee54e79e93997db8c623b56
Replace CL_REQUIRE/CL_PROVIDE(cl_prin_globals) with portable code.

The order of initialization of non-local objects in different compilation units
is not specified in C++. Hence special care should be taken to avoid static
initialization order fiasco. CLN solved the problem with some evil (GCC
specific, and even GCC-version-specific) hack. Replace it with a technique
similar to one used in STL to initialize std::cout and friends.
include/cln/io.h
src/base/output/cl_prin_globals.cc