2008-12-10 Petr Ovtchenkov * Repository: STLport release 5.2.1 2008-12-03 Petr Ovtchenkov * build: HP-UX/ia64 with aC++ compiler; verified on HP-UX 11.23 and 11.31 with aC++ A.06.17; [4 of 436 tests, 4 ignored (2 explicit), and 4 of 360 tests, 2 ignored]; submitted by Boris Gubenko. 2008-11-27 Petr Ovtchenkov * build: EVC9 (Visual Studio 2008) by Johan Andersson. 2008-11-19 Petr Ovtchenkov * Repository: STLport release 5.2.0 2008-08-26 Petr Ovtchenkov * Repository: branch for STLport 5.2, r3618 2008-07-21 Petr Ovtchenkov * stlport/type_traits: decay, conditional, ebable_if added. 2008-07-18 Francois Dumont * configure.bat: Specifying the compiler is now mandatory and must be first. 2008-07-17 Francois Dumont * stlport/stdlib.h, cstdlib: Fix errno workaround for gcc MinGW. Latest gcc version (4.3.0) includes stdlib.h in cstdlib using include_next so skipping workaround in STLport stdlib.h. So errno.h must also be included from cstdlib. 2008-07-17 Petr Ovtchenkov src/details/fstream_unistd.cpp: fix bug #2001222, opening with ios_base::app should rewind write pointer to the end of the file; fix treatment of ios_base::ate (it should rewind pointer to the end of the file once) and ios_base::app (offset will be set to the end of the file prior to each write); references --- http://www.open-std.org/Jtc1/sc22/wg21/docs/papers/2008/n2691.pdf 27.8.1.4; http://www.opengroup.org/onlinepubs/7990989775/xsh/fopen.html; http://www.opengroup.org/onlinepubs/7990989775/xsh/open.html test/unit/fstream_test.cpp: add sample with fopen as reference point. 2008-07-14 Francois Dumont * build/Makefiles/gmake: Build system updated for gcc under Cygwin, MinGW. Under Cygwin, with or without -mno-cygwin option, STLport is now a full replacement for libstdc++, building an application with it do not require -lsupc++ anymore as it is completely integrated in STLport. Under MinGW it didn't work resulting in a crash when starting an application using STLport so -lsupc++ is necessary both when linking STLport _and_ when linking the application using it. 2008-07-10 Francois Dumont * src/num_put_float.cpp: Use an union based technique to find out the sign of floating point values. It will maybe replace use of platform specific functions in a future version. * src/stdio_streambuf.cpp, test/unit/iostream_test.cpp: Change behavior of stdio_istreambuf implementation that now always return 0 on showmanyc call. Returning -1 means that reading attempt will necessarily fail which is not the case, 0 is prefered as it means that we don't know. It is also similar to other std implementations like libstdc++. 2008-07-02 Francois Dumont * configure.bat: After a very interesting debate the consesus is to put configure scripts in root folder. * stlport/stl/_string_sum_methods.h: Bug report #2003308, compilation error with _STLP_USE_TEMPLATE_EXPRESSION. Regression due to remove of POD type support in basic_string implementation. 2008-06-26 Francois Dumont * stlport/stl/_fstream.c: Consider read file failure in _M_underflow_aux method to avoid infinite looping on some platforms. Thanks Pawel Sikora. 2008-06-26 Petr Ovtchenkov * build/Makefiles/gmake/unix/rules-install-so.mak: do install-headers tags when make install or install-release-shared. 2008-06-24 Francois Dumont * build/Makefiles/gmake: Cygwin/MinGW upgrade, now build without referencing libstdc++. * stlport/stl/_threads.h: Move definition of __stl_atomic_t next to definition of atomic operations to guaranty coherency. 2008-06-18 Francois Dumont * build: configure.bat moved to build folder. lib/Makefile, test/unit/Makefile removed from SVN, now generated by configure scripts. Under GNU make use include rather than link to reference the right make file, link seems not supported by Cygwin/MinGW make. Remove default value of STLPORT_DIR, already set in internal make files and moreover the absolute path generated in the script leads to trouble under Cygwin/MinGW. * src/num_get_float.cpp: Use an union to generate double value from 64 bits int to avoid gcc type-punned pointer warning. 2008-06-16 Petr Ovtchenkov * build/test/unit/gcc.mak: pass runtime pathes as absolute; removed LDSEARCH macro, use LDFLAGS instead; * Makefile: clean in test/unit too. 2008-06-13 Francois Dumont * stlport/stl/_iterator_base.h: Add a funny feature, when using both STLport and native STLs it was not possible to use std iterators in STLport containers because of the missing iterator category that is defined in std:: and not in stlport::. So now STLport map std iterator categories in stlport ones. Now it is possible to write something like that: std::string stdstr("std"); stlport::string stlportstr("stlport and "); stlportstr.append(stdstr.begin(), stdstr.end()); However the other side is not supported except when STLport iterators are simply pointers. 2008-06-05 Francois Dumont * src/num_get_float.cpp: Remove useless skip of white space at begining of buffer in _Stl_string_to_double function. __read_float, the function that generate that buffer do not put white space at the first place. * stlport/stl/_new.h, _range_errors.c: Remove unused _STLP_RTTI_BUG macro. Moreover __stl_new was not correctly implemented with this macro, there was no check for failed allocation. * test/unit/limits_test.cpp: Remove code supposed to hide numeric_limits::max value to MSVC 8 compiler, this code was introducing a test regression. If it is producing a warning a #pragma warning should be use to hide it. * test/unit/num_put_get_test.cpp: Add test showing problem with code that used to be in limits test. Those tests will be activated for 5.3 to check that there is really nothing wrong with it. 2008-06-07 Petr Ovtchenkov * configure: don't duplicate options in config.mak, that has default values in makefiles. 2008-06-06 Petr Ovtchenkov * configure: put it on common place for ./configure; * build/Makefiles/gmake/targetdirs.mak: use $(DESTDIR) as in common practice (change root of installation, but don't change run paths); * build: by default use make for gcc; * Makefile: top makefile for common project task; * build/Makefiles/gmake/depend.mak: fix options for ctags and etags; * configure, build/Makefiles/gmake/top.mak: take into account extra flags for linker. 2008-06-05 Francois Dumont * stlport/stl/_function_adaptors.h: Fix instantiation of unary_function and binary_function as base type of _Mem_fun0_ref, _Mem_fun1_ref, _Const_mem_fun0_ref, _Const_mem_fun1_ref, _Void_mem_fun0_ref, _Void_mem_fun1_ref, _Void_const_mem_fun0_ref, _Void_const_mem_fun1_ref. Those classes are use as a workaround for compiler missing class partial template specialization or that don't support return of void. Instantiation is now done without reference qualifier as specified by the Standard and as done in the implementation used when workaround is not necessary. 2008-06-03 Francois Dumont * src/ios.cpp, stlport/stl/_complex.c, _ios.c, _ios.h, _ios_base.h, _istream.c, _num_get.c, _num_put.c: Remove invalid cached facet pointers in ios_base class. This class can be used in a char or wchar_t instantiation context making cast to ctype or ctype invalid resulting in an application crashed. The only safe access to facet instances from a ios_base instance is through the use_facet(getloc()) function. Only _M_cached_ctype has been kept in basic_ios class even if small bench hasn't show real enhancement compared to using use_facet. * stlport/stl/_time_facets.c: In addition to above modifications time_get implementation has been simplified as localized info are now stored as wchar_t for wide char instantiation. We do not need to use ctype.widen method anymore. * test/unit/time_facets_test.cpp: Add test for time_get wchar_t instantiation. * test/unit/cppunit/cppunit_mini.h: Fix report of ignored/explicit tests. 2008-05-27 Francois Dumont * stlport/stl/_alloc.h: Code simplification, clean up null pointer checks as allocators should never return it but rather throw a bad_alloc exception. 2008-05-27 Francois Dumont * test/unit/cppunit/cppunit_mini.h, file_reporter.h: Fix counting of failed test, won't report more failures than tests anymore. Now also report explicit tests. 2008-05-15 Francois Dumont * src/allocators.cpp, locale_catalog.cpp, num_put_float.cpp: Use static method returning static instance to mutex rather than direct access to a static mutex instance to control initialization order of static variables thanks Peter Hrenka report. 2008-04-26 Francois Dumont * stlport/stl/_function.h, type_traits.h: Adoption of Defect Report 109 Missing binders for non-const sequence elements. * test/unit/bind_test.cpp: Test for DR above. 2008-05-11 Petr Ovtchenkov * stlport/stl/_string.c: from formal (ISO/IEC 14882:2003) point of view string s; string::size_type p = s.find( "", 0, 0 ); should return 0 in p, i.e. position out-of-bound of string; people near Standard commete has opinion that Standard correct in this point and not require clarification (opposite to my opinion); even if it looks like bogus behavior for me, it fixed to conform standard; see bugreport #1872656; * test/unit/string_test.cpp: test for issue above. 2008-05-10 Petr Ovtchenkov * stlport/stl/_istream.c, stlport/stl/_ostream.h: ISO/IEC 14882:2003 (and 1998 too) assume change as get as put positions with seekg and seekp (27.6.1.3, par 38; 27.6.2.4 par 2), but this contradict to common practice and proposed draft N2588 (27.6.1.3, par 41; 27.6.2.5, par 4); now STLport implement (i.e. change present behavior) the draft's point of view; this reflect patch #1650657 by Jan Echternach; * test/unit/sstream_test.cpp: test for issue above. 2008-04-26 Francois Dumont * Patches #1940126, #1941267, #1941814 from Johan Andersson for evc8 Pocket PC support and build of tests without warnings. 2008-04-24 Francois Dumont * Patch 1937823 from Johan Andersson to add Microsoft Visual Studio 2008 support. * stlport/stl/_algobase.h: Patch 1935497 from Andrey Semashev to apply a common optimization in STLport algos for random access iterators to fill and fill_n algos. 2008-04-23 Petr Ovtchenkov * src/num_put.cpp: remove ambiguity of char to int conversion (comparison with integers, check for negative value); remove ambiguity with postfix increment in index in conditional expression. 2008-04-22 Petr Ovtchenkov * build/Makefiles/gmake/gcc.mak, build/lib/configure: take into account CFLAGS, EXTRA_CFLAGS, because of C compiler in use too. 2008-04-17 Francois Dumont * stlport/stl/_string.h: Remove support for non POD type in basic_string implementation. 2008-04-08 Petr Ovtchenkov * build/Makefiles/gmake/lib/gcc.mak: try to create $(PRE_OUTPUT_DIR) before run lipo; impact only MacOS; * build/Makefiles/gmake/sysid.mak: uname -m on MacOS return power-macintosh, but identify architechture as ppc. 2008-03-28 Francois Dumont * stlport/assert.h: Bug #1894882: Apply a technique similar to the one used in errno.h to detect when assert has been defined before including assert.h. 2008-03-21 Francois Dumont * Patch 1876529 from Johan Andersson to add support for VS 2005 bundled Pocket PC 2003 SDK. 2008-03-18 Petr Ovtchenkov * stlport/stl/_string.c: derived from patch #1914475, wrong replace for selfreferencing string; thanks Farid Zaripov; * test/unit/string_test.cpp: test for problem above. 2008-03-17 Francois Dumont * stlport/stl/_stdexcept_base.h, _stdexcept_base.c, type_manips.h, src/num_put_float.cpp, test/unit/num_put_get_test.cpp: Borland patch from Eric Sanford. No need for a __Named_exception workaround anymore. Force floating point control word when testing special floating point operations. Change implementation _Copyable and add a workaround to correctly render long double max value that is consider as equal to double max value. 2008-03-10 Francois Dumont * build/Makefiles: Normalization of --with-static-rtl and --with-dynamic-rtl extended to configure script for Borland and DMC compilers. 2008-03-08 Francois Dumont * test/unit/cppunit/cppunit_mini.h: New mini cppunit framework feature, the explicit tests that have to be explicitly tested thanks to the -t option to run. * test/unit/unordered_test.cpp: benchmark1 and benchmark2 tests are now explicit. * stlport/stl/_stdexcept_base.h, _stdexcept_base.c: __Named_exception that contains dynamically allocated memory require a copy constructor and assignment operator. Thanks bug report #1908626 from Ilya Dogadaev. * build/Makefiles: Normalized some configure options: --without-thread, --without-rtti, --with-lib-motif. 2008-03-06 Francois Dumont * Fix rtti management: - no rtti support do not imply no type_info struct definition. - #error message in typeinfo to signal missing rtti support has been removed. - locale implementation do not use typeid anymore to enhance runtime_error message thrown by combine message when we cannot find the combined facet. It was introducing an annoying dependency making use of the lib without rtti support impossible. 2008-03-05 Francois Dumont * stlport/stl/_range_errors.h: Signal function responsible for throwing excepions as not returning to the DMC compiler. 2008-03-03 Francois Dumont * build/Makefiles/gmake: Eric Sanford patch to make generation of debug symbols optional when using Borland compiler to build unit tests. * stlport/stl/config: Normalization of verbose mode used to get feedback about build context when using STLport. _STLP_VERBOSE_AUTO_LINK has been renamed in _STLP_VERBOSE and report additional information like rtti, exception support, mono/multi threaded, static/dynamic library. * stlport/stl/_check_config.h: Unused, removed. * stlport/typeinfo: Report use of this header when there is no RTTI support, only when we can detect it of course. 2008-02-29 Francois Dumont * build/Makefiles/gmake: Several modif for Digital Mars support. * stlport/stl/_function_base.h: Hide protected constructor not supported by Borland compiler. * stlport/stl/config/_bc.h: Now detect Rtti support. 2008-02-28 Petr Ovtchenkov * build/Makefiles/gmake/gcc.mak: use more convenient option -dumpversion to detect compiler's revision; check that -fuse-cxa-atexit really required; remove -fident option; * build/Makefiles/gmake/targetdirs.mak: take into account DESTDIR; * build/lib/configure: write DESTDIR as prefix for installation pathes; * stlport/type_traits: type traits, close to JTC1/SC22/WG21 C++ 0x working draft [http://www.open-std.org/Jtc1/sc22/wg21/docs/papers/2008/n2521.pdf] 2008-02-26 Francois Dumont * Rationalization in detection of real localization implementation. _STLP_REAL_LOCALE_IMPLEMENTED removed, the whole detection mecanism is now in c_locale.h/c_locale.c and is based on API specific macros. For the moment real localization is used for windows platforms (_STLP_WIN32 except Windows CE) and when Glibc 2.2 or newer with GNU extensions (_GNU_SOURCE) is detected. 2008-02-25 Francois Dumont * stlport/stl/type_traits.h: Generalize technique used by Borland compiler to detect pointer types const or volatile qualified and avoid trivial copy in this case. * Eric Sanford patch for Borland compiler for Linux. 2008-02-22 Francois Dumont * stlport/stl/c_locale.h, src/c_locale.h, c_locale_win32/c_locale_win32.c, c_wlocale_win32.c: Major code simplification. Definition of _Locale_UPPER, _Locale_LOWER, etc... used to be platform dependant requiring a lot of macro checks and additionnaly exposing STLport to wrong definitions. When for instance _Locale_PRINT was defined as _Locale_UPPER|_Locale_LOWER|..., marking a character as printable was also making it a upper and lower character! In fact those masks have to be platform specific only when STLport directly expose platform masks which is only the case when using GlibC. So now those mask are hard coded in STLport using values defined in the C++ Standard 22.2.1. Under Windows the localisation implementation has been adapted to map Win32 mask values to the STLport ones. A number of now useless workaround has been removed. * src/c_locale_dummy/c_locale_dummy.c, ctype.cpp, test/unit/ctype_facets_test.cpp: Removed the hard coded table of character types that was duplicating the one in src/ctype.cpp. Now a table is build during library initialisation using C functions isspace, isalpha... Doing so and adding a test in LocaleTest::ctype_by_name will show if STLport and the C runtime agree on character classification. 2008-02-20 Francois Dumont * src/allocators.cpp: Change management of _S_heap_size, now bit translation is done on the value used to increment it rather than when using _S_heap_size. Thanks to this modif, when _S_heap_size is only a 32 bits value it won't roll before 16Go has been allocated. Thanks to an additional unsigned cast the effect won't be notice before 32 Go are allocated. 2008-02-19 Francois Dumont * src/c_locale_dummy/c_locale_dummy.c: Fix implementation of _WLocale_toupper/_WLocale_tolower, call to respectively towupper/towlower was inverted. * src/allocators.cpp: __stlp_chunk_malloc/__stlp_chunck_free renamed respectively in __stlp_new_chunk/__stlp_delete_chunck as those functions behavior are closer to the new operator behavior rather than to malloc. __stlp_new_chunk implementation fixed, it was using _STLP_CHECK_NULL_ALLOC reserved to check allocations performed through new operator. Fix code to correctly take into account bad_alloc exceptions. 2008-02-18 Francois Dumont * stlport/stl/_algobase.h: Removed namespace specification on swap invocation in iter_swap implemenation because it was breaking template function resolution for gcc. Whether this is a gcc bug or simply correct Standard C++ is not clear yet so namespace has been removed independant of compiler in use. * stlport/stl/_alloc.h, _new.h, src/locale.cpp, locale_impl.cp: Generalize use of _STLP_THROW_BAD_ALLOC macro to throw the bad_alloc exception. Definition of this macro is now in _new.h header. * stlport/stl/_valarray.h: Use __stl_new rather than malloc to get exception management without additional code. It also gives users a Standard way to detect memory starvation through the new handler. 2008-02-16 Francois Dumont * Removed anachronous and unmaintained raw SGI allocator mode. 2008-02-15 Francois Dumont * src/details/fstream_win32io.cpp: Fix wrong use of Win32 API. SetFilePointer do not take SEEK_CUR macro but FILE_CURRENT. * src/allocators.cpp, stlport/stl/_alloc.h, _alloc_old.h, _construct.h, _new.h, _pthread_alloc.h, _rope.h, config/_evc.h, features.h: Code cleanup; __THROW_BAD_ALLOC normalized in _STLP_THROW_BAD_ALLOC; _STLP_NEW, _STLP_PLACEMENT_NEW and _STLP_BROKEN_BAD_ALLOC_CLASS macros removed. 2008-02-14 Francois Dumont * src/c_locale_glibc/c_locale_glibc2.c: Manualy handle the "C" locale to guaranty consistency with the default "C" facet implementations in the lib. * * test/unit/time_facets_test.cpp, num_facets_test.cpp, monetary_facets_test.cpp, ctype_facets_test.cpp: Enhance tests by using a third way of generating locale instance from names. 2008-02-13 Francois Dumont * src/fstream_impl.h, details/fstream_win32io.cpp, fstream_unitstd.cpp, fstream_stdio.cpp, stdio_streambuf.cpp: __stdin_size function revomed making fstream_impl.h useless. 2008-02-12 Francois Dumont * stlport/stl/type_manips.h, type_traits.h: Borland patch from Eric Sanford to fix regressions introduced with recent modifications of some helper struct used to detect potential optimizations. * config/_bc.h, features.h: New configuration, Borland do not support following syntax: typename std::iterator_traits<>::value_type. It breaks on association of typename keyword with namespace specification. As Borland do not require typename keyword in this case it is now possible avoid it thanks to the _STLP_NO_TYPENAME_BEFORE_NAMESPACE macro. * stlport/stl/_limits.c: Borland, like gcc 4, prefer additional brackets in initialization of struct associated to computation of numeric limits values. 2008-02-01 Francois Dumont * General code review to look for Standard or internal functions called with namespace scope in order to avoid ambiguous calls when compiler implement Argument Dependant Lookup. See ListTest::adl test case to see what it means. * stlport/stl/config/features.h: _STLP_PRIV now contains full namespace path starting at global namespace that is to say ::stlport::priv:: when private namespace is in use and ::stlport:: when it is not. Idem for _STLP_TR1 that now contains ::stlport::tr1::. * stlport/stl/debug/_string.h: Call to std::distance removed to avoid reading input iterators before reading their contents. Now all basic_string::assign methods invalidate all iterators like other containers. * stlport/stl/_iterator_base.h: Remove implementation of __value_type __distance_type and __iterator_category when compiler support partial template specialization. In this case we directly use iterator_traits, we do not need those functions. Removed special __distance implementations use in an anachronous implementation of distance taking an initial value to start counting. Now this function use __distance functions already used by the std::distance function. The MSVC _Distance function is also considered as anachronous. 2008-01-31 Francois Dumont * stlport/stl/_string.h, test/unit/string_test.cpp: Add swap implementation when there is no support for template function partial ordering. 2008-01-30 Francois Dumont * src/fstream_impl.h, details/fstream_stdio.cpp, fstream_unistd.cpp, fstream_win32io.cpp, stdio_streambuf.h, stdio_streambuf.cpp: Hide __is_regular_file only used in fsteam implementation specific files. Rename __file_size in __stdin_size as this function is only used to get stdin FILE* size. Under Win32 this function now always returns 0 as it looks like Windows do not consider FILE* as allowing position operations. Move platform specific code from stdio_streambuf implementation to associated fstream_*.cpp file. 2008-01-29 Petr Ovtchenkov * build/test/unit/gcc.mak: option for run-time path to libstlport on HP-UX; * build/Makefiles/gmake/hp-ux/targetsys.mak: HP-UX IA64 use so as shared object extention, while PA-RISC use sl; * build/Makefiles/gmake/gcc.mak: use -fno-reorder-blocks for PA-RISC; * src/cxa.c: use cxa_atexit fix similar to trick on Solaris and FreeBSD; * src/num_get_float.cpp: stdint.h on HP-UX; * stlport/wctype.h, stlport/stl/_cwctype.h: HP-UX has problems with wchars; changes suggested by KBac. 2008-01-28 Francois Dumont * stlport/stl/config/_cygwin.h: Cygwin do not define _STLP_USE_GLIBC anymore, platform API is closer to a Standard C lib than to the Gnu lib C. 2008-01-26 Francois Dumont * src/fstream_stdio.cpp, fstream_win32io.cpp, fstream_unistd.cpp: Removed unused uint64.h include and definition of ULL macro. * src/uin64.h: Removed, _compound_int class defined in it is simply not used anymore. * src/_stdio_file.h: Major cleanup, only _FILE_fd is still in use. * src/locale.cpp, locale_impl.cpp, build/lib/Makefile.inc: Restore independency between those 2 translation units, code duplication is very limited. This is a 1st step to make build of STLport easier by having all sources in src folder buildable. * src/locale_impl.h, locale_impl.cpp: _copy_Locale_impl removed, only use to create initial global locale that can simply reference classic locale incrementing its reference counter by one. * stlport/stl/_locale.h: Fix locale implementation when MSVC6 workaround is used. The base class _NoMem_loc do not have to have a virtual destructor, it only need a protected one. Moreover fix constructor taking an other locale instance and a facet instance, _M_impl was not released before being assigned resulting in a memory leak. * src/fstream_stdio.cpp, fstream_unistd.cpp, fstream_win32io.cpp: Moved to details sub-folder. Now building STLport means build all .cpp, .c and optionnaly .rc files from src folder. 2008-01-22 Petr Ovtchenkov * build/test/unit/gcc.mak: check confguration and set ALL_TAGS before inclusion top.mak, to correctly set targets for 'all'. 2008-01-21 Francois Dumont * build/test/unit/icl.mak: Add /fp:strict option to build unit tests as we need strict floating point number operations respect to have numeric limits to work correctly. * stlport/stl/config/_intel.h: Looks like ICL since version 9 support static constant correctly. * stlport/stl/config/features.h, src/c_locale_win32/c_locale_win32.c: New macro _STLP_MARK_PARAMETER_AS_UNUSED to offer a compiler specific way of marking parameters as unused. Default behavior is to cast the parameter to void*. * src/c_locale_win32/c_wlocale_win32.c: Fix _WLocale_strxfrm function implementation thanks Kai Khcyt. Despite taking a pointer to wchar_t* LCMapStringW writes bytes to it. * build/Makefiles/gmake/bcc.mak, lib/bcc.mak, app/bcc.mak, stlport/cerrno, errno.h, stl/type_manips.h, type_traits.h: Borland patch from Eric Sanford to build Borland libs with GNU make build system. 2008-01-18 Francois Dumont * test/unit/locale_test.cpp, ctype_facets_test.cpp, money_facets_test.cpp, num_facets_test.cpp, time_facets_test.cpp: test_supported_locale function do not have to be template, might avoid ICL wring code generation. * stlport/stl/_function_base.h: Based on an idea from Herb Sutter in his excellent book "Exceptional C++ Style", derived class destructor should be protected non virtual or public virtual. unary_function and binary_function struct are intended to be derived but they are not polymorphic so destructor should be protected non virtual. According the book it is even not breaking library Standard conformity in doing so. What is sure is that it will help users detect bad code. 2008-01-17 Francois Dumont * stlport/stl/debug/_list.h: Remove use of std::distance in STL safe mode, it is invalid for pure input iterators. Now assign invalidate all iterators which make the code simpler. * Remove the difficult to implement and maintain _AreSameUnCVTypes, doing so has a number of impact on the lib: - Remove usage of it in debug/_string.h and debug/_deque.h, we rather use function specialization to detect self reference. In string implementation it is almost impossible to detect self referencing in insert and assign method even with use of _AreSameUnCVTypes, so we systematically creation an intermediate string instance. - Creation of _AreCopyable helper class to detect when it is safe to do a memcpy or memmove between 2 types. This class returns false when any type is volatile qualified or when trying to copy to a const qualified type. - Creation of _AreSameTypes only really implemented thanks to partial template specialization, only used in _IsOkToSwap struct. * test/unit/copy_test.cpp: Add test showing bug 1806558. 2008-01-17 Petr Ovtchenkov * build/lib/configure: Don't override COMPILER_NAME, if already defined; * stlport/stl/config/_prolog.h: remove suspicious comments. 2008-01-15 Petr Ovtchenkov * stlport/stl/config/_hpux.h: define _POSIX_C_SOURCE 199506; suggested by KBac, patch #1869229. 2008-01-14 Francois Dumont * stlport/stl/_string.h, _string.c: Restore code to support non-POD types in basic_string implementation as specified in basic_string comments. * stlport/stl/_limits.c: Use double numeric limits for long double when sizeof(double) == sizeof(long double). * stlport/stl/debug/_debug.h, _deque.h, _list.h, _vector.h: Prefer to use overloading of member method to activate additional check of 23.1.1 table 67 Standard conformity rather than using metaprogrammng technique. 2008-01-12 Petr Ovtchenkov * build/Makefiles/gmake/lib/gcc.mak: gcc 3.3 has useful libsupc++, but some builds not; prefer normal situation, not marginal; see record 2007-10-10; * build/Makefiles/gmake/gcc.mak: fix reference to _FORCE_CXX macro; * build/Makefiles/gmake/CC.mak: ditto; * build/Makefiles/gmake/aCC.mak: ditto; * build/lib/configure: keep compiler and default compiler --- gcc is most common defualt and plans to switch to default makefile. 2008-01-11 Francois Dumont * stlport/stl/_limits.c: Adapt long double numeric limits for Intel C++ compiler 9 for Windows. * test/unit/cppunit/test_main.cpp: Add command usage output when option is not recognise. * build/lib/configure: Remove specification of COMPILER_NAME default value gcc. COMPILER_NAME is already set in all root make scripts like gcc.mak, aCC.mak, dmc.mak ... Doing so forces users to specify their compiler family using configure script which is redundant. 2008-01-10 Francois Dumont * stlport/stl/_prolog.h: Remove code duplication by including _cprolog.h. * stlport/errno.h, cerrno: Move import of errno from errno.h to cerrno. * src/ctype.cpp, facets_byname.cpp, time_facets.cpp, test/unit/codecvt_test.cpp: Several small modifications to make Intel C++ compiler happier. Mostly avoid warnings and use unary_function to avoid some typedef. 2008-01-09 Francois Dumont * stlport/stl/_uninitialized.h: Fix implementation of __uninitialized_copy_copy in order to make the function exception safe. Detected thanks to the EH test suite. 2008-01-08 Francois Dumont * stlport/stl/_ios_base.h: _S_was_synced renamed in _S_is_synced because it reflects what the sync state is and not what it was. * src/iostream.cpp: Use auto_ptr to avoid use of the catch(...) blocks. Changed management of the _STLP_REDIRECT_STDSTREAMS macro. cout, cerr and clog streams are not ofstream anymore but classic ostream instances, only streambuf is a filebuf when the macro is defined. Improve _S_initialize robustness to exceptions, now exceptions like bad_alloc are not silently eaten. _S_initialize guaranty that on exception, Standard streams will be valid, it do not offer however strong guaranty, global state might still have been modified. Idem for sync_with_stdio. Moreover this method is now Standard compliant, it returns the new sync state and not the old one. 2008-01-07 Francois Dumont * src/c_locale_dummy/c_locale_dummy.c: Upgrade to take into account recent localization Api modifications. 2008-01-04 Francois Dumont * src/fstream_win32.cpp: Change detection of regular file, only reject handlers identified as folders. * stlport/stl/_codecvt.h: Add assertion to check buffer ranges pass to the codecvt facet. * src/fstream.cpp, stlport/stl/_fstream.c: Complete bug #1854345 fix, get buffer was not reset at the right place. * stlport/stl/_fstream.h, _fstream.c: Several modifications in the seekoff method: - Remove limitation of positioning to binary file stream, setting position in a text file stream is not a problem. - Fix mbstate_t instance returned in the file_pos instance when getting position in a file stream with variable encoding. - Move all the sanity check code to the debug mode. 2008-01-02 Francois Dumont * test/unit/fstream_test.cpp: Change FstreamTest::seek test to reveal bug #1854345. * src/fstream.cpp: #1854345 bug fixed. 2008-01-01 Francois Dumont * stlport/stl/_time_facets.h, _time_facets.c, src/time_facet.cpp, c_locale_glibc/c_locale_glibc2.c: Restore GlibC++ support after 2007-12-27 modifications. 2007-12-29 Francois Dumont * Borland patch from Eric Sanford mainly to enable move constructor. * stlport/stl/_string_base.h, _string.h, _string.c, _string_sum_methods.h: Attempt to make string implementation more clear: _M_allocated renamed in _M_start_of_storage, _M_Buffers._M_dynamic_buffer renamed in _M_Buffers._M_end_of_storage, _M_end_block renamed in _M_end_of_storage too. To respect current naming convention _capacity has been renamed in _M_capacity and _rest in _M_rest. * stlport/stl/_string_workaround.h: Updated to take into account recent modification in string data model. * etc/autoexp.dat: Updated to take into account string data model modifications, new model is really simpler to map to. 2007-12-27 Francois Dumont * src/c_locale.h, c_locale_dummy/c_locale_dummy.c, c_locale_glibc/c_locale_glibc.c, c_locale_glibc2.c, c_locale_win32/c_locale_win32.c, facets_byname.cpp, time_facets.cpp, stlport/stl/_codecvt.h, _ctype.h, _numpunct.h, _time_facets.c, _time_facets.h: Major internal localization API modification. Add several _WLocale_* functions to allow native support of access to wide char representation of localization information. The time facet support has been the most impacted. GlibC based implementation still have to be updated. 2007-12-23 Francois Dumont * build/Makefiles/nmake/evc8.mak, targets.mak, src/_stdio_file.h, fstream_win32io.cpp, iostream.cpp, locale_catalog.cpp: Patch from Johan Anderson for Evc 3/4/8 to: - fix the opening console issue on this platform. - add EVC8 SH4 support. * test/unit: Add CPPUNIT_FAIL macro to force failure without using a constant conditional expression. Many tests updated to use this new macro. * stlport/stl/config/_evc.h, debug/_debug.h, _debug.c: Patch from Michael Fink to allow _STLP_DEBUG mode when using WCE ARM platform. 2007-12-20 Francois Dumont * stlport/stl/_monetary.c: Remove test of existing space at end of stream when last pattern field is none because on ouput stream space are only added optionaly. Small code duplication removed. * build/lib/configure.bat, evc.mak, msvc.mak, test/unit/evc.mak, msvc.mak: Config file moved to Makefiles/nmake folder. Add --without-stlport option to build unit tests without STLport. * test/unit/money_facets_test.cpp: Add validation that moneypunct "C" facet is identical to the one contained in locale::classic(). * src/c_locale_dummy/c_locale_dummy.c, c_locale_win32/c_locale_win32.c, facets_byname.cpp: Fix to have moneypunct by name facet build from "C" similar to locale::classic() one. Now default format in _Init_monetary_formats is the C++ default one. 2007-12-20 Petr Ovtchenkov * test/unit/fstream_test.cpp: test for seek, inspired by Soren (stsoe, #1854345); report not confirmed. 2007-12-17 Francois Dumont * stlport/stl/_limits.c: Add brackets on union initialization for gcc starting with version 4. 2007-12-17 Petr Ovtchenkov * stlport/stl/config/_linux.h: if not explicitly specified another, use threads. 2007-12-14 Francois Dumont * src/c_locale_win32/c_locale_win32.c: Fix implementation of _Locale_mbtowc and _Locale_wctomb functions. Reveal limitation of the MultiByteToWideChar function that cannot be used to implement more complicated encodings that have a real shift state like the JIS one. Add support for UTF7 and UTF8 encodings. * test/unit/codecvt_test.cpp: New test case to check support for 2 encodings, the Windows specific code page 936 and the UTF8 one. Those tests are coming from chinese test samples proposed by Victor Xie. 2007-12-14 Petr Ovtchenkov * stlport/stl/_string_base.h, stlport/stl/_string.h, stlport/stl/_string.c: experimental string buffer---start of buffer in _M_allocated._M_data now, end of buffer either end of local short buffer, or stored in pointer within local short buffer; this potentially reduce amount of pointer arithmetic; prefer Traits::assign to uninitialized fill, it more optimized for POD types, such as chars [experimental too]. 2007-12-13 Francois Dumont * src/c_locale.h, c_locale_dummy/c_locale_dummy.c, c_locale_glibc/c_locale_glibc.c, c_locale_glibc2.c, c_locale_win32/c_locale_win32.c: Remove unused _Locale_wctob and _Locale_btowc localization API functions. 2007-12-13 Petr Ovtchenkov * build/test/unit/gcc.mak, test/unit/...: allow build unit tests with libstdc++, without STLport; useful for reference and comparison. 2007-12-12 Petr Ovtchenkov * build/Makefiles/gmake/unix/rules-install-so.mak, build/lib/gcc.mak: install-headers usable; it use user-defined macro HEADERS_BASE [catalog and all files, keeping directory structure] and HEADERS [for single files]; target catalog is INSTALL_HDR_DIR, by default it is ${BASE_INSTALL_DIR}/include. 2007-12-07 Petr Ovtchenkov * stlport/stl/_uninitialized.h: comment unused parameter; * stlport/stl/_limits.c: 64-bits systems may has [and really has] size of long double 16, not 12; but IEEE 854 still in force, and only 10 bytes of long double taken into account. This should fix limits on 64-bits systems. Thanks joebishop [aka Denis Cheremisov] for granted access to 64-bit linux. 2007-12-05 Francois Dumont * src/c_locale_glibc/c_locale_glibc2.c: Fix a one byte memory overrun when passing a very locale name. * src/c_locale_win32/c_locale_win32.c: Simplified Win32 localization code. Remove useless calls to strcpy. Remove useless call to the __Extract_locale_name once in the _Locale_*_create functions as name has already been extracted at this moment. 2007-12-05 Francois Dumont * src/c_locale_glibc/c_locale_glibc2.c: Removed many checks useless as the C functions are called in a well defined and safe context. Also remove useless strcpy calls when it is safe to return the internal string. 2007-12-04 Francois Dumont * Add the _Locale_codecvt localization data structure for 2 purposes: - in the win32 implementation it simplify _Locale_ctype data structure. - in the glibc implementation it helps making clear that this implementation do not support the codecvt facet for the moment. 2007-12-03 Francois Dumont * src/fstream_win32io.cpp: Fix management of Ctrl-Z when reading text file stream thanks Hector Chu patch. 2007-11-30 Francois Dumont * src/acquire_release.h, facets_byname.cpp, locale.cpp, locale_impl.cpp, locale_impl.h, messages.cpp, time_facets.cpp: Localization code modification, now locale instances will adopt a normalized name rather than the name used to create them. This way identical locale instances will compare equals even if created from name aliases like 'french' and 'fr_FR'. Moreover default locale built from an empty string won't have an empty name. * test/unit/locale_test.cpp, ctype_facets_test.cpp, money_facets_test.cpp, num_facets_test.cpp, time_facets_test.cpp: Enhance localization tests, add test of default locale when possible. Add test for the locale instances built from a mix of the locale::classic instance and a named category. 2007-11-27 Francois Dumont * stlport/stl/_ios_base.h, _ios.c: Add qualification on the cached ctype and numpunct facets, we can keep them as const pointers. Moreover, prefer to use the use_facet function rather than _M_get_facet to access those instances to avoid direct reference to the facet::id static instance. * Some evolution in the localization code: - Hide _Locale_name_hint in internal implementation, facets *_byname constructor are now respecting the C++ Standard signature. - numpunct facet: Remove unused _M_grouping field, move hard coded values of the "C" facet in the sources. Only the numpunct_byname keeps internal wstring representation of true and false names. - time facets: Use the non template time_base class for initialization of the _Time_Info instance, it is more coherent with other facets implementations. Many functions like __acquire_time and __release_time are now hidden in the library. 2007-11-26 Francois Dumont * stlport/stl/char_traits.h, _stdexcept_base.c: Borland patch from Eric Sanford, add a missing header and change __Named_exception implementation because of a Borland compiler bug. * src/c_locale_win32/c_locale_win32.c: Add LANG_INVARIANT definition when SDK are missing it. 2007-11-24 Francois Dumont * stlport/stl/_monetary.h: Add missing explicit keyword on money_get and money_put constructors. * stlport/stl/_numpunct.h: Removed friend relation between numpunct and num_get, looks like it is useless with current implementation. * stlport/stl/config/stl_mycomp.h, features.h, _watcom.h, _sunprocc.h, _mwerks.h, _msvc.h, _ibm.h, _dec_vms.h, _dec.h, _as400.h: Removed _STLP_NO_FRIEND_TEMPLATES, _STLP_FRIEND_TEMPLATES macros unused since fix above regarding numpunct/num_get friend relation. * test/unit/collate_facets_test.cpp: Fix "C" facet by name test, Standard do not define any special behavior for the "C" transform method so transformed result should simply follow the normal transform behavior. * src/locale_impl.cpp: Removed useless holes in locale facets table. Now the table contains 26 non null entries rather than 38 entries with some begin null. 2007-11-23 Francois Dumont * src/locale.cpp, locale_impl.h, locale_impl.cpp: Some small modifications to limit necessary friend class _Locale_impl declaration in several facet classes. Moreover, num_get, num_put, money_get, money_put facets that do not depend on any name are not allocated anymore in the functions responsible for generating facets for a given category. * stlport/stl/_codecvt.h, _collate.h, _ctype.h, _messages_facets.h, _monetary.h, _num_get.h, _num_put.h, _numpunct.h, _time_facets.h: Removed many useless friend class _Locale_impl declarations. 2007-11-23 Petr Ovtchenkov * build/lib/configure: make configuration suitable for installation procedure and package building. 2007-11-22 Francois Dumont * src/c_locale_dummy/c_locale_dummy.c: Now implements the "C" locale to respect the C++ Standard. * test/unit/collate_facets_test.cpp: Fix test checking that collate facet build from the "C" name behave like the one coming from the locale::classic() locale. * src/c_locale.h, locale.cpp, c_locale_glibc/c_locale_glibc.c, c_locale_glic2.c, c_locale_win32/c_locale_win32.c, locale.cpp: Removed _Locale_compose_name from the STLport internal localization API. Composition of locale names will now be the responsibility of STLport itself and not of the platform localization implementations one. 2007-11-20 Francois Dumont * stlport/stl/_iterator_base.h, _ptrs_specialize.h: Avoid inclusion of _ptrs_specialize.h while still in stlport namespace scope thanks Christof Meerwald report. 2007-11-17 Francois Dumont * _STLP_STATIC_MEMBER_DECLSPEC workaround removed. Thanks to _GetFacetId other workaround it should now be useless. There are still some tests to confirm especially testing the gcc visibility feature. 2007-11-16 Francois Dumont * stlport/stl/_fstream.c: Fix implementation of basic_filebuf<_CharT, _Traits>::_M_underflow_aux() to take into consideration already read external buffer even if reading from file failed. Thanks Hector Chu report and patch. * test/unit/codecvt_test.cpp: New test for problem above, CodecvtTest::imbue_while_reading thanks Hector Chu. * test/unit/fstream_test.cpp: Remove useless FstreamTest::special_encoding test replaced by new test in CodecvtTest. Fix FstreamTest::custom_facet test that is now using a specialization of codecvt rather than a class inheriting from codecvt. 2007-11-14 Francois Dumont * src/c_locale_win32/c_locale_win32.c: Fix to support creation of locale facet from the 'C' name. * test/unit/collate_facets_test.cpp, locale_test.cpp, money_facets_test.cpp, num_facets_test.cpp, time_facets_test.cpp: Add test to check build from names "" or "C", on platform without real localization support, "" should result in "C". Also check for some facets that the one build from "C" name is similar to the one taken from locale::classic() locale. 2007-11-12 Petr Ovtchenkov * test/unit/fstream_test.cpp: testcase for bug #1830513; __read_unbuffered wrongly process valid streamsize 0; [was derived from original report of Anton Samokhvalov and Oleg Obolenskiy] * stlport/stl/_istream.c: fix for bug #1830513 above; check boundary condition in the beginning of loop. 2007-11-09 Francois Dumont * build/Makefiles/gmake: Add missing cygming folder comming from task branch, required for Cygwin/MinGW builds. * stlport/stl/_bvector.h, _deque.h, _hashtable.h, _list.h, _rope.h, _slist.h, _string_base.h, _tree.h, _vector.h: Removed useless instantiation of _Alloc_traits to define nested allocator_type in several containers. STLport users will simply have to correctly instantiate containers when they specify the allocator to use. 2007-10-30 Francois Dumont * etc/autoexp.dat: New file containing description of STLport data structures in the Visual Studio C++ debugger language. 2007-10-21 Francois Dumont * Merged with STLPORT_5_1 up to revision 3229. 2007-10-20 Francois Dumont * _STLP_NO_MBSTATE_T removed, STLport cannot really live without any mbstate_t definition. Moreover we were already defining our own definition when _STLP_NO_MBSTATE_T is defined, we now simply generalize this behavior. So definition of _STLP_NO_MBSTATE_T has been replaced with _STLP_NO_NATIVE_MBSTATE_T. 2007-10-14 Francois Dumont * src/bitset.cpp: Add const qualifier on static arrays used in bitset implementation. Thanks a Andrey Semachev remark. 2007-10-12 Francois Dumont * stlport/stl/_hash_map.h, _hash_set.h, _unordered_set.h, _unordered_map.h: Because of the hashtable data model, number of bucket should not be to high compare to the number of elements. For this reason, default constructor of all hash containers is now passing 0 as the initial size rather than 100. * stlport/stl/_hashtable.h, _hashtable.c: For the same reason exposed above, the hashtable number of buckets is decrease when removing elements from the container. All is done in the newly introduce _M_reduce method that should be called each time elements are removed. * test/unit/unordered_test.cpp: Two new test in UnorderedTest test fixture, benchmark1 and benchmark2. Those tests are rather, as indicated by their name, bench to compare performance of hashed containers. It can be used with the -m unit test console option that display timing of tests. For instance, thanks to the reduction policy exposed above, benchmark1 is running 20 times faster while benchmark2 is almost identical. * stlport/stl/_hashtable.h: Container might now be rehash when user modified max load factor in order to respect load_factor() <= max_load_factor() rule. hashtable::resize fixed, according SGI doc it should behave as Standard unordered_*::rehash that is to say it gives number of buckets and not number of elements. * stlport/stl/_hashtable.c: Fix Code warrior workaround that was only showing a limited number of prime numbers. 2007-10-10 Petr Ovtchenkov * build/Makefiles: merge r2883:3223 from tasks/STLport-Makefiles; revision of build system, from 'complement' project, adopted for STLport requirements; support build of static lib and build unit tests with this lib; gmake-specific files moved into gmake catalog; top.mak (gmake-specific) moved into gmake catalog; add include option for boost's headers, if STLP_BUILD_BOOST_PATH defined; config.mak has make-dependent features, so it moved to gmake or nmake catalog; settings from gmake/windows/sysid.mak should be present in common gmake/sysid.mak file; gcc 3.3 has bad or absent libsupc++, at least in debian; don't use -lstlport, when build it; removed windows platform support that used to represent the environment given by the cmd shell with MinGW additional commands i.e. MinGW require not only gmake, but other POSIX file utils too; install target by default install to /usr/local/lib on POSIX-like platforms; added distclean target; added install-headers target; * build/test/unit: top.mak (gmake-specific) moved into gmake catalog; * build/test/unit/gcc.mak: see just build stlport libs, not installation path [default install path is /usr/local/lib on POSIX-like platforms]. 2007-10-07 Francois Dumont * 5.1.4 released, trunk merged with STLPORT_5_1 branch up to revision 3221. 2007-10-04 Francois Dumont * stlport/stl/_codecvt.h, _fstream.c, src/codecvt.cpp: Fix non Standard conformity in codecvt::length and associated codecvt::do_length methods. Those methods was taking const reference to mbstate_t but the Standard specify that it must be a simple reference. * src/facets_byname.cpp: Add a real implementation of codecvt::do_length based on the _Locale_mbtowc locale API function. * test/unit/codecvt_test.cpp: Add a test for codecvt::length. * test/unit/fstream_test.cpp: Add a test that indirectly test codecvt facet and integration of it in the basic_filebuf implementation. 2007-10-02 Francois Dumont * test/unit/deque_test.cpp, hash_test.cpp, list_test.cpp, map_test.cpp, set_test.cpp, slist_test.cpp, unordered_test.cpp, vector_test.cpp: Allow test on incomplete types even when pointer specialization is activated as long as partial template specialization is supported. * stlport/stl/_fstream.c, src/facets_byname.cpp, test/unit/codecvt_test.cpp: Fixed codecvt_byname::do_in and do_out methods. They now both correctly take into account to_end pointer. Thanks Vistor (finalvistory) report on sourceforge Developer forum. 2007-09-28 Francois Dumont * src/num_put_float.cpp: Modification in _Stl_ecvtR and _Stl_fcvtR long double overloads, if value can be converted to double without precision loss we can rely on the double overload. Moreover _Stl_fcvtR has been fixed. * stlport/stl/pointer/_tools.h: Use class partial specialization to enhance usability of the container pointer specialization feature. Thanks to it, container can be instanciated with incomplete types. Modification based on bug report 1799048 from Andrey Semashev. * trunk merged with STLPORT_5_1 up to revision 3211. 2007-09-27 Francois Dumont * src: Modification in the internal localization API. _Locale_errno removed, now an int pointer is passed to all _Locale_*_create and all _Locale_extract_*_name functions so that they can return an error code. This method avoid multithreaded issues. * src/locale_catalog.cpp: Modification in __acquire_category function. If create_obj return null, the null pointer is not stored anymore in cached as creation failure reason might be temporary like in case of memory starvation. * stlport/stl/_locale.h: Error reporting enhancement. In combine method we use a typeid call to report the unknown facet type. In other situation we report both the facet category being built and the name used to build it. * test/unit/locale_test.cpp, collate_facets_test.cpp, messages_facet_test.cpp, money_facets_test.cpp, num_facets_test.cpp, time_facets_test.cpp: Add checks for construction of facets from very long facet name. 2007-09-27 Petr Ovtchenkov * test/unit/find_test.cpp: array initialization missed. 2007-09-19 Francois Dumont * trunk merged with STLPORT_5_1 up to revision 3193. 2007-09-11 Petr Ovtchenkov * stlport/stl/_algobase.c: keep check for symmetry in lexicographical compare---algorithm assume symmetry comparator; remove check for symmetrical comparator in search and find, due to double checks not better then single (the same check done in algorithm, and algorithm not require symmetrical comparator); * stlport/stl/debug/_hashtable.h: idem; * stlport/stl/debug/_tree.h: idem; * stlport/stl/debug/_debug.h: __symetrical_strict_weak_call and __symetrical_equal_call not used anyware. 2007-09-10 Francois Dumont * stlport/stl/_algo.c: Add check for symetrical functor in max_element and min_element algo. * stlport/stl/_algobase.c: Restore symetrical functor checks. Sometimes simply because the algo was already considering the functor as symetrical as in lexicographical_compare. Sometimes using specific helpers functions (see below). * stlport/stl/debug/_debug.h: Add __symetrical_strict_weak_call and __symetrical_equal_call helper functions to check for symetric functors only when invocating the symetrical functor is valid that is to say when both parameters are of the same type. * stlport/stl/debug/_hashtable.h: Make use of __symetrical_equal_call to check that equivalence functor used in hashtable instanciation is correctly implemented. * stlport/stl/debug/_tree.h: Make use of __symetrical_strict_weak_call to check that functor predicate use in tree instanciation is correctly implemented. 2007-09-10 Petr Ovtchenkov * stlport/stl/_string.c: fix bugs in string rfind, find_last_of, find_last_not_of [bug #1788700, position 0 was wrongly excluded]; * test/unit/string_test.cpp: test for problems above. Thanks to Bred Bored for bug report and initial test. 2007-09-09 Petr Ovtchenkov * test/unit/rope_test.cpp, stlport/stl/_rope.h: test for bug #1788615 [bug during copy of rope's iterator] and fix; suggested by John Maddock. 2007-09-07 Petr Ovtchenkov * test/unit/alg_test.cpp: add #include , required for comparator symmetry test; * test/unit/string_test.cpp: test for bug in find_last_of, bug #1788700, submitted by Bred Bored. 2007-09-05 Petr Ovtchenkov * stlport/stl/_algobase.c: symmetry not required for comparator in case of two different sequences comparison or searching; symmetrical comparator just may not exist; * stlport/stl/debug/_hashtable.h: symmetry not required for comparator in hashtable in case of containers extention; symmetrical comparator just may not exist; * test/unit/alg_test.cpp: test for problem above, thanks Oleg Obolenskiy. 2007-09-03 Petr Ovtchenkov * src/dll_main.cpp, stlport/stl/debug/_debug.c: removed macro _STLP_STATIC_TEMPLATE_DATA, __PUT_STATIC_DATA_MEMBERS_HERE, _STLP_NO_STATIC_TEMPLATE_DATA; only few old compilers require this and are good enough to work with STL; * test/eh/test_rope.cpp, stlport/stl/_num_get.c: idem; * stlport/stl/_time_facets.c, stlport/stl/_codecvt.h: idem; * stlport/stl/_monetary.c, stlport/stl/_num_put.c: idem; * stlport/stl/_rope.c, stlport/stl/_rope.h: idem; * stlport/stl/config/user_config.h: idem; * stlport/stl/config/stl_mycomp.h: idem; * stlport/stl/config/_gcc.h: idem; * stlport/stl/_threads.c: idem. 2007-09-02 Francois Dumont * stlport/stl/_algobase.c: Small optimization, add an intermediate __eq function to detect when both iterator types are identicals. Thanks Jim Xochellis idear. * stlport/stl/_threads.h, _threads.c: Fully apply modification of _S_nsec_sleep implementation for Win32 platforms contained in bug report 1720635 from Taras Overchuck. It is an optimization of the spin lock mutex specifically targetting the multiprocessor platforms. 2007-08-29 Francois Dumont * stlport/stl/_algobase.c, _string.c: Some modification in __find_first_of_aux2 implementation to reduce number of iterator dereferencements. 2007-08-26 Francois Dumont * stlport/stl/config/user_config.h, host.h: Moved administrative _STLP_USE_UNIX_IO, _STLP_USE_STDIO_IO, _STLP_USE_WIN32_IO macros to host.h. * Merged with STLPORT_5_1 branch up to revision 3151. 2007-08-23 Petr Ovtchenkov * stlport/stl/debug/_vector.h: only random access iterators allow operations 'less-then' and distance; for bidirectional iterators removed usage of 'less-then', and for others [like forward and input iterators] removed as usage of 'less-then' as distance; thanks Oleg Obolenskiy for bug report; * test/unit/ioiter_test.cpp: test for problem above. 2007-08-18 Francois Dumont * stlport/stl/config/host.h: Removed _STLP_NO_CYGWIN macro unused since we are using include_next. 2007-08-16 Francois Dumont * stlport/stl/config/_gcc.h: Avoid conflict in link model, gcc visibility for many platforms or dllimport/dllexport for Cygwin/MinGW. * build/Makefiles/gmake/gcc.mak: Looks like Cygwin/MinGW won't support visibility for the moment. 2007-08-15 Petr Ovtchenkov * stlport/stl/char_traits.h, src/fstream_unistd.cpp: use 64-bits file operations calls, if available on system; streamoff is always off64_t, if _LARGEFILE_SOURCE or _LARGEFILE64_SOURCE defined, i.e. if 64-bits file operations present; * src/fstream_stdio.cpp, src/stdio_streambuf.cpp: ditto; * stlport/stl/config/user_config.h: add _STLP_USE_DEFAULT_FILE_OFFSET, force use off_t for streamoff and appropriate file operations calls; note, that this may lead to problems, for example if _FILE_OFFSET_BITS defined as 64 somewhere in user's code; * test/unit/fstream_test.cpp: test 64 bits type for filesize and file offset. 2007-08-13 Francois Dumont * test/unit/memory_test.cpp: MSVC6 do not support this test, ignored. * stlport/stl/_string.h: Internal _String_reserve_t moved to private namespace. * stlport/stl/_algobase.c, _string.c, char_traits.h: Adoption of the find_first_of trick below in string::find_first_of, find_last_of, find_first_not_of and find_last_not_of. 2007-08-12 Francois Dumont * stlport/stl/_algo.h, _algobase.h, _algobase.c: find_first_of algorithm enhancement based on the Jim Xochellis analysis that you can find here: http://www.codeproject.com/vcpp/stl/find_first_of.asp. * test/unit/alg_test.cpp: Add several tests to challenge the above enhancement. 2007-08-08 Francois Dumont * stlport/stl/config/feature.h: Removed useless workaround, there is no more platform using Win32 threading API and missing bool type. * src/num_put_float.cpp, num_get_float.cpp: Fixes for DMC, DMC has real long double so it now uses ieee854_long_double Glibc type. DMC do not use anymore the sprintf workaround to write floating point numbers. * stlport/stl/_auto_ptr.h, test/unit/memory_test.cpp: Fix auto_ptr implementation, removed a useless const_cast and change a reinterpret_cast in static_cast. Add support for instanciation with the volatile qualifier. Thanks Ulrich Eckhardt report. 2007-08-03 Francois Dumont * src/c_locale_win32/c_locale_win32.c: Fix some static buffer size to always have a free place for the trailing zero. * test/unit/locale_test.cpp: Add a test when passing a very long name as the LC_CTYPE facet name to the locale constructor. * src/system_api.h, system_api.c, build/lib/Makefile.inc, src/num_put_float.cpp: Removed system_api workaround to access isinfinite, isnan, isinf C functions used with gcc under Hp unix. Now __format_nan_or_inf has an implementation entirely based on numeric_limits values that avoids access to platform functions. 2007-07-30 Francois Dumont * stlport/stl/_facets_fwd.h, _num_put.h, _num_get.h, _monetary.h, _time_facets.h, _locale.h: Fix _GetFacetId workaround for compilers like gcc since 3.4 that consider only the context at point on template definition and not at the point of instantiation when resolving _GetFacetId calls in has_facet or use_facets template functions. 2007-07-20 Francois Dumont * stlport/stl/_mbstate_t.h: We have to define mbstate_t ourself on platforms having mbstate_t in cwchar when we want to only use C headers. 2007-07-22 Petr Ovtchenkov * src/fstream_unistd.cpp: force use lseek64/mmap64 for HP-UX, if _LARGEFILE64_SOURCE defined; thanks for Michael Klein. 2007-07-20 Francois Dumont * stlport/stl/config/_gcc.h, stl_mycomp.h: Removed unused _STLP_WEAK_ATTRIBUTE macro. * stlport/stl/config/_msvc.h, _intel.h, _gcc.h, features.h: Some cleanup concerning _STLP_STATIC_TEMPLATE_DATA macro. 2007-07-18 Francois Dumont * stlport/stl/_num_put.h: Removed __string_to_float declarations only used in a num_get context. * src/num_get_float.cpp: - Import Glibc ieee854_long_double union for compilers having a real long double type but no runtime support to correctly generate it. This union is used by gcc under Cygwin and MinGW and by Borland compiler. - _Stl_string_to_long_double removed, it was so similar to _Stl_string_to_double that everything is done with this function now. - Removed check on exponent value while parsing it from buffer, check is only done when combining this value with the digits read. * src/num_get_float.cpp: - Generalize synchronization code arround the ecvt/fcvt functions when the platform do not grant reentrant functions. - In __format_float_scientific, removed useless rz temporary variable, removed limitation in the number of appended trailing zeros. - In __format_float_fixed, removed limitation of number of trailing zeros added after decimal point, it is only limited by precision. - __format_float: Code to detect infinity or NaN has been moved before call to platform specific ecvt/fcvt functions. Thanks to this modification, this function is not template anymore. - Add _Stl_ecvt/_Stl_fcvt emulation functions when platform do not grant the necessary ecvt/fcvt functions for long double. Emulation is based on sprintf function using 'L' modifier. - In __write_floatT function, fix size of static buffer used by _Stl_ecvt/fcvt functions. Fix number of digits in calls to _Stl_fcvt/ecvt in both modes, fixed or scientific. * test/unit/num_put_get_test.cpp: Add some tests, somes with a really high precision that show problem with static buffer size. 2007-07-17 Petr Ovtchenkov * stlport/stl/_algo.c, stlport/stl/_algobase.c: search, the __tmp and __p1 iterators always point at the same position, hence one of them is redundant; * stlport/stl/_algobase.c: in the main-loop of search there are two successive while-loops doing exactly the same thing; one of them is redundant and, since it is inside the main-loop, it slows down the algorithm significantly; * stlport/stl/_algo.c, stlport/stl/_algobase.c: in the search the main-loop condition "while (__first1 != __last1)" is always true and consequently redundant; this is because the initial adn in-loop conditions virtually act as guards and will never let the main-loop condition to fail; since this condition is evaluated in every main-loop iteration, its removal will also improve the performance of the algorithm; thanks for Jim Xochellis for this suggestions. 2007-07-15 Petr Ovtchenkov * src/strstream.cpp: "get end" pointer should be initialized to the "begin of get + N" in obsolete strstream; bug #1536503, thanks for Jean-Eric Cuendet; * test/unit/strstream_buffer_read_test.cpp, build/test/unit/Makefile.inc: test for bug above; [submitted by Jean-Eric Cuendet]. 2007-07-05 Francois Dumont * build/Makefiles/nmake/vc8.mak: Removed _CRT_SECURE_NO_DEPRECATE when building STLport. Not secured version of functions _ecvt and _fcvt functions used for floating point numbers output are not reentrant. 2007-07-04 Petr Ovtchenkov * src/num_get_float.cpp: reorder code, one condition go away. 2007-07-03 Francois Dumont * src/num_put_float.cpp: _Stl_ecvtR, _Stl_fcvtR, _Stl_qecvtR, _Stl_qfcvtR functions, pass buffer size as a parameter when the platform functions need it rather than duplicating the size definition. This modification has been applied to the DECC platforms and when the GLibC is in use. Removed useless islong __format_float_scientific parameter. Removed useless x __format_float_fixed parameter, islong parameter replaced with direct specification of the maxfsig value. In __format_float function, first attempt in detection of NaN or infinity is done thanks to the std::numeric_limits and compiler support, _Stl_is_nan_or_inf do not correctly handled long double values. long double values larger than max double values were always displayed as Inf. * src/num_get_float.cpp: Removed useless null buffer checks in _Stl_atod functions, we know how this function is called. Replaced some hard coded constant with numeric_limits values. Add check that there is less than 64 digits before hiding hidden bits in vv.i64, for long double it was generating wrong long double value. * test/unit/num_put_get_test.cpp: Add numerous tests to check both long double input and output. 2007-06-29 Petr Ovtchenkov * stlport/memory: more forward declarations; fix typo; * stlport/functional: more tricks to compile with boost and tr1; * test/unit/boost_check.cpp: problems trace; set 1 in appropriate places to check presence of problem, but only use one case at a time. 2007-06-28 Francois Dumont * src/locale.cpp, locale_impl.h, stlport/stl/_locale.h, config/features.h: Runtime check system do not fully use the MSVC6 workaround anymore, it only use the locale workaround, not the basic_string one. * src/string.cpp: Fix wrong explicit instanciation. * test/unit/cppunit/cppunit_mini.h, file_reporter.h: Fix computation of test failure when both CPPUNIT_CHECK and CPPUNIT_ASSERT are used. 2007-06-28 Petr Ovtchenkov * stlport/stl/boost_type_traits.h: reread boost/config.h to force usage of stlport in boost and force read essential macros from boost/config/suffix.hpp; this is because boost included within stlport from one side, and stlport included within boost from another side; this make sense with _STLP_USE_BOOST_SUPPORT defined in user_config.h; checked for boost 1.34; * test/unit/boost_check.cpp, build/test/unit/Makefile.inc: test for problem above; this simulate problem when boost's header was included before any stlport's one; * stlport/stl/config/features.h: remove definition of BOOST_STDLIB_CONFIG, due to it unconditionally defined in boost. * stlport/memory: forward declarations for boost required, by the same reasons as described above. 2007-06-24 Petr Ovtchenkov * stlport/stl/_function.h, stlport/functional: fix import of boost::shared_ptr---moved from _function.h to functional; import mem_fn, bind, bad_function_call, function, swap from boost to std::tr1. 2007-06-23 Francois Dumont * stlport/stl/_string.h, _string_workaround.h: Some fix for gcc that is now expose to the VC6 workaround because of the runtime check mechanism under MinGW. 2007-06-21 Francois Dumont * test/unit/cstring_test.cpp, limits_test.cpp: Small modif to avoid MSVC compiler warning in release build. * stlport/stl/_cwchar.h: Replace a _STLP_MSVC check with a _STLP_MSVC_LIB check as WCHAR_MIN and WCHAR_MAX macros definition depends on library and not on compiler. 2007-06-20 Petr Ovtchenkov * stlport/memory: import shared_ptr from boost to std::tr1 namespace, if no _STLP_NO_EXTENSIONS and present _STLP_USE_BOOST_SUPPORT; see ISO/IEC DTR 19768, http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf * test/unit/shared_ptr_test.cpp: test for shared_ptr. 2007-06-19 Francois Dumont * stlport/stl/debug/_debug.h, _debug.c: Replace __in_range with stlp_in_range, __in_range is a macro in the Windows Vista PSDK. * src/locale.cpp, stlport_prefix.h, warning_disable.h, stlport/stl/_locale.h, _string.h, config/features.h: Fix some regression introduce with the improvment of the runtime compatibility check mecanism. * src/c_locale_glibc/c_locale_glibc2.c: Fix implementation of _Locale_strcmp and _Locale_strwcmp functions. * stlport/stl/_limits.c: Change technique used to generate NaN or infinity floating point numbers. No more reinterpret_cast of a buffer, we now use an union based technique. gcc prefer this cleaner method especially in release mode. * test/unit/limits_test.cpp: Small test modification as gcc was still performing some weird optimization in release mode resulting in unexpected behavior. 2007-06-19 Petr Ovtchenkov * stlport/stl/_function.h: import reference_wrapper from boost to std::tr1 namespace, if no _STLP_NO_EXTENSIONS and present _STLP_USE_BOOST_SUPPORT; see ISO/IEC DTR 19768, http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf * test/unit/reference_wrapper_test.cpp: test for reference_wrapper. 2007-06-15 Petr Ovtchenkov * build/test/unit/Makefile.inc: macro_checks.cpp instead of cwchar.cpp. 2007-06-14 Francois Dumont * src/dll_main.cpp, locale.cpp, locale_impl.h, locale_impl.cpp, stlport/stl/_locale.h, _rope.h, config/_windows.h, features.h: Enhance the runtime compatibility mecanism used to detect build inconsistency under Windows. We now use the locale class with the VC6 workaround coming with it to force a call to the compatibility check function. Inconsistency detection is activated if _DEBUG or _STLP_DEBUG is defined. If an inconsistency is detected it is reported by the linker thanks to an unresolved symbol building_for_up_to_windows95_but_library_built_for_at_least_windows98 or building_for_at_least_windows98_but_library_built_for_up_to_windows95 that are self describing. * test/unit/cwchar.cpp: Renamed in macro_checks.cpp, add many tests for all C Standard macros like CHAR_MIN, CHAR_MAX, INT_MIN, INT_MAX... * stlport/stl/_cwchar.h: Add MSVC compilers before Visual Studio 2005 as not defining WCHAR_MAX correctly. 2007-06-11 Francois Dumont * src/lock_free_list.h: Fix check of _WIN32_WINNT rather than _WIN32_WINDOWS. * stlport/stl/_threads.c: In the Win32 implementation, add a call to the SwitchToThread function to potentially avoid a costly call to Sleep(1) that can take more time than expected. If SwitchToThread fail we call Sleep(1) again. Based on Taras Overchuk bug report 1720635. 2007-06-11 Petr Ovtchenkov * src/fstream.cpp: integration file; code clean, three implementations sublimated, unix-emulation approach removed; this is reorganization changeset, functionality was not changed; * src/fstream_win32io.cpp: win32io-based implementation of _Filebuf_base, i.e. based on Windows calls CreateFile/CloseHandle/ReadFile/WriteFile + CreateFileMapping, MapViewOfFile; * src/fstream_unistd.cpp: unistdio-based implementation of _Filebuf_base, based on unistd open/close/read/write + mmap; * src/fstream_stdio.cpp: stdio-based implementation of _Filebuf_base, based on stdio fopen/flose/fread/fwrite; * stlport/stl/_fstream.h: detect of _Filebuf_base implementation moved into stlport/stl/config files; * stlport/stl/config/*.h: iostreams underline technique depends upon OE or user's preferences; * stlport/stl/config/features.h: some system-specific macro moved to system- or compiler-specific files; * stlport/stl/_rope.h: rewritten suspicion code, functionality not changed. 2007-06-08 Francois Dumont * stlport/stl/_complex.h: Clean unused _STLP_NO_COMPLEX_SPECIALIZATIONS macro and code coming with it. * build/lib/configure, configure.bat: Removed --windows95 option, it is useless now that STLport includes windows.h when building the libraries. * build/Makefiles/gmake/bcc.mak, dmc.mak, gcc.mak, nmake/vc-common.mak: Removed references to Windows 95 build, if STLport users want to target a specific Windows OS they will only have to use --extra-cxxflags to give WINVER, _WIN32_WINDOWS or _WIN32_WINNT values. 2007-06-05 Francois Dumont * stlport/stl/config/features.h: Removed unused _STLP_LDOUBLE_* macros giving real long double size. * stlport/stl/_limits.h, _limits.c: Major code upgrade, now computation of infinity and NaN is done thanks to some code extracted from the boost library (www.boost.org). This code is more portable as it adapts to compiler representation of float, double and long double and do not require many compiler macro checks. Additionaly STLport numeric_limits now handle real denorm_min values. * test/unit/limit_test.cpp: Add many test on dernomalized float and some other values of numeric_limits. * stlport/stl/config/_cray.h, _gcc.h, _msvc.h, stl_mycomp.h: Removed _STLP_NO_IEC559_SUPPORT macro, meaning was not clear and impact was localized to the _limits.h file so use of a global macro was rather useless. 2007-05-29 Francois Dumont * stlport/stl/_num_get_.c: Small refactoring, all num_get::do_get for float, double and long double are now calling the same __do_get_float function. Moreover, when __read_float failed, __sring_to_float is not called anymore. 2007-05-28 Francois Dumont * test/unit/limits_test.cpp: Add test checking that numeric_limits min is really min and max really max. * src/allocators.cpp, locales.cpp, stlport/stl/_threads.h, config/_windows.h: Fix detection of Windows OS having limited implementation of Interlocked[Increment,Decrement] Win32 API functions. _STLP_WIN95 macro has been rename _STLP_WIN95_LIKE as it do not only signal Windows 95 build context but also former OS versions. 2007-05-22 Francois Dumont * src/c_locale_win32/c_locale_win32.c: gcc MinGW has no thread locale storage intrisinc support so for this compiler, locale creation failure will always be reported with runtime_error exception. * stlport/stl/config/_msvc.h: Configuration fix, check that _STLP_MSVC is defined before activating MSVC6 workaround (_STLP_USE_MSVC6_MEM_T_BUG_WORKAROUND macro). 2007-05-21 Francois Dumont * src/c_locale.h, locale.cpp, locale_impl.cpp, c_locale_dummy/c_locale_dummy.c, c_locale_win32/c_locale_win32.c, c_locale_glic/c_locale_glibc.c, c_locale_glibc2.c: Add a _Locale_errno function to the small localization framework in order to report more accurate locale creation failure. For the moment there are 3 possible failure reasons, no more memory, unsupported locale, no platform support. In case of memory starvation, we throw a bad_alloc exception. 2007-05-19 Francois Dumont * stlport/stl/_valarray.h, _valarray.c: Add many assertion checks to track potential undefined behaviors mostly regarding invalid argument size. 2007-05-17 Francois Dumont * stlport/stl/_prolog.h: Hide _debug.h when including C standard headers. Some platforms (Win32) include C headers in an 'extern "C"' scope that do not accept templates exposed in _debug.h. 2007-05-16 Francois Dumont * stlport/stl/config/_auto_link.h, build/Makefiles/gmake/cygming/lib.mak, build/Makefiles/nmake/lib/macro.mak: Removed version information from static libs name for consistency among all supported compilers/ platform. 2007-05-15 Francois Dumont * stlport/stl/_range_errors.c, _stdexcept_base.c: New files containing codes that used to be duplicated in dll_main.cpp. * src/dll_main.cpp: Include _range_errors.c and _stdexcept_base.c when necessary. * stlport/stl/_stdexcept_base.h, _stdexcept_base.c: __Names_exception do not truncate anymore exception message when longer than internal static buffer, a dynamic buffer is allocated through malloc in this case. I haven't use __iostring class in this case as it would have introduce a cyclic dependency between classes. 2007-05-11 Francois Dumont * src/c_locale.h, c_locale_glibc/c_locale_glibc2.c: Some fixes to avoid gcc warnings when compiled with -Wall -Wmissing_prototypes. * stlport/stl/_num_put.c: Fix a cast to avoid a signed/unsigned comparison warning. * c_locale_glibc/c_locale_glibc2.c: Use __locale_t __names field rather than __locales to access to category names. Thanks to this modification we do not need the Glib internal locale_data struct definition anymore. * test/unit/fstream_test.cpp: Port the FstreamTest::null_stream for unixes platforms that use /dev/null, the test is not ignored anymore. * src/fstream.cpp: Under Windows, check that the file we are opening is a real file before trying to truncate it or move to the end. Allow use of special file like "NUL" with C++ fstream. 2007-05-10 Francois Dumont * src/stdio_streambuf.cpp: Add checks of error codes returned by ftell and fseek functions in stdio_istreambuf::showmanyc Windows CE special implementation. * test/unit/fstream_test.cpp: Add new test case to check file streams built from platform dependent null pipe (NUL under Windows, /dev/null under unixes). Ignored for the moment. 2007-05-04 Francois Dumont * src/locale.cpp, allocators.cpp, stlport/stl/_threads.h, config/_windows.h: Change macro checks to detect Windows 95 platform. Windows 95 and NT4 has both WINVER == 0x0400 but only Windows 95 has limitation impacting STLport code. Distinction between both platforms is done thanks to the _WIN32_WINNT macro only defined for NT4. New _STLP_WIN95 macro signals Windows 95 platform, it replaces _STLP_WIN32_VERSION. Thanks Jan Echternach patch 1707963. * src/c_locale_win32/c_locale_win32.c: Remove all code concerning the messages facet, Windows platform do not support it. * src/fstream.cpp: Fix use of fseek in _Filebuf_base::_M_seek in _STLP_USE_STDIO_IO mode. fseek do not return the position in file but a boolean value indicating if call has succeeded or not, and call to ftell to get file position. Thanks Marco Jez bug report 1704843. I have also integrated a number of small fixes to use _STLP_USE_STDIO_IO mode under MSVC or GCC MinGW, it shouldn't be really nececarry but it costs nothing and help testing this mode. 2007-05-03 Francois Dumont * stlport/stl/_numpunct.h, _time_facets.h, _ctype.h, _monetary.h, _messages_facets.h: Remove friend _Locale_extract_hint function declaration replace by the more simple friend class _Locale_impl expression. * src/locale_impl.cpp: Change implementation of _Locale_impl::insert_*_facets methods. Now only facets used internally for iostreams implementation are considered as mandatory when instanciating a locale from a name. Other facets like collate or messages won't generate a runtime_error exception if the platform is not able to grant an implementation. This will make STLport more flexible in regards of platform possibilities. * stlport/stl/_messages_facets.h, src/facets_byname.cpp, messages.cpp: Simplification of the messages facet implementation. _Messages class has no virtual method anymore, _Messages_Impl has been removed. Now messages class implementation is a dummy implementation that do not allow access to platform messages, real messages implementation is available thanks to the messages_byname class. * stlport/stl/_time_facets.h: _Locale_time instance is not kept anymore in the facet implementation, it is only used on construction to initiliaze _Time_Info struct instance. 2007-05-02 Francois Dumont * test/unit/codecvt_test.cpp: Fixed comparison with char_traits::eof to use eq_int_type in order to be compatible with platform having a default unsigned char built-in type. Thanks Marco Jez report. 2007-04-19 Francois Dumont * stlport/stl/_valarray.h: Integrate C++ Standard defect 253 signaling that slice_array, gslice_array, mask_array and indirect_array copy constructor cannot be private. * test/unit/valarray_test.cpp: Add compilation test to check that valarray operator[] taking a slice, gslice, valarray and valarray can be called. 2007-04-16 Francois Dumont * src/locale.cpp: Simplified locale::_M_throw_runtime_error implementation using std::string rather than C string functions. Also change exception message generation to make failure reason more obvious. * src/facets_byname.cpp: As, according Standard, *_byname facet constructor should behave as locale constructor taking a name STLport now throws a runtime_error instance when building a facet from a null name. * src/messages.cpp: Now contains all classes implementation involved in messages facet support. * stlport/stl/_messages_facets.h, src/messages_facets.h, messages.cpp: Simplification of the messages facet implementation. Major modification is that the C messages facet has now only one representation which is the one given by the _Message class. There used to be an other one based on _Messages_impl class using __acquire_messages("C"). * src/messages_facets.h: Internal classes _Messages and _Messages_impl are not exported anymore. * test/unit/locale_test.cpp: Facet tests has been moved to facet category test files. * test/unit/collate_facets_test.cpp, ctype_facets_test.cpp, messages_facets_test.cpp, money_facets_test.cpp, num_facets_test.cpp, time_facets_test.cpp, build/test/unit/Makefile.inc: New test cases for each facet category. * stlport/stl/config/features.h: Define _STLP_NO_TYPEINFO when _STLP_NO_RTTI is defined. 2007-04-15 Francois Dumont * src/dll_main.cpp: Removed useless _Atomic_swap_struct export that has already been removed from _threads.h and that was generating compilation error with MSVC 2005. 2007-04-10 Francois Dumont * stlport/stl/pointers/_deque.h, _list.h, _set.h, _slist.h: Eric Sanford DMC patch to allow pointer specialization feature. * test/unit/map_test.cpp, set_test.cpp, slist_test.cpp, unordered_test.cpp: Remove DMC check hiding pointer specialization tests. * build/Makefiles/gmake/dmc.mak, app/dmc.mak: Additional fixes from Eric Sanford. 2007-04-09 Francois Dumont * stlport/stl/_pair.h, _vector.h, config/_bc.h: Borland patch from Eric Sanford, remove move semantic for free compiler. * test/unit/mvctor_test.h: Eric Sanford patch to restore 2 tests that has been lost in a previous test modification, movable_declaration_assoc and movable_declaration_hash. * test/unit/mvctor_traits_test.cpp: Add some _STLP_NO_MOVE_SEMANTIC checks when using __move_traits. 2007-04-05 Francois Dumont * stlport/stl/config/_gcc.h: Removed undef of _STLP_NEW_PLATFORM_SDK, under MinGW, MinGW can use a new SDK and not the one coming with MinGW. * Merged with STLPORT_5_1 branch up to revision 2994. 2007-04-05 Petr Ovtchenkov * src/ctype.cpp: move declaration from loop; * stlport/stl/debug/_debug.c: stl/_cstdlib.h already included; * stlport/stl/_cprolog.h: prolog for C headers can't include files with C++ constructions; * stlport/*.h: C headers use prolog that don't include C++ constructions; * test/unit/stldbg_include.cpp, build/test/unit/Makefile.inc: test for problem with inclusion C++ constructions from C header. 2007-04-04 Francois Dumont * build/lib/configure.bat: Change advise command to build STLport after configuration, it is now 'clean all' rather than default build command. 2007-03-22 Francois Dumont * src/c_locale_dummy/c_locale_dummy.c: Fixed dummy definition for a number of localization functions that are now type safe. 2007-03-20 Francois Dumont * stlport/stl/_prolog.h, config/features.h, debug/_debug.h: Normalize the way STLport debug mode macros are defined. All debug macro definition are now coming from _debug.h and not anymore partially from features.h. _debug.h is now included from _prolog.h after all configuration has been completed. * stlport/stl/_alloc.h, _iterator_base.h, _valarray.h: Removed _debug.h references now fully integrated in STLport configuration phase. * stlport/stl/config/_windows.h: Add some Windows macro before inclusion of windows.h when building library to limit Windows pollution (NOMINMAX, STRICT). Moreover add definition of _STLP_OUTERMOST_HEADER_ID macro before windows.h inclusion to avoid indirect include of STLport stuff throught C Standard headers included in windows.h as at this moment STLport is not yet completely configured. * stlport/stl/config/_evc.h: Removed unjustified macro definition to limit inclusion from windows.h, it is a user decision not an STLport one. * build/Makefiles/nmake/vc8.mak: Fix definition of DEFS in this file to keep current DEFS value that might exist if configure --extra-cxxflag option has been used. * src/allocators.cpp: Add _STLP_NEW_PLATFORM_SDK macro check to perform necessary const_cast in _STLP_ATOMIC_ADD macro definition. 2007-03-17 Francois Dumont * build/Makefiles/gmake/bcc.mak, dmc.mak, gcc.mak, nmake/vc-common.mak: Add WINVER definition when building libraries to signal required OS compatibility, per default it is Windows 98 and later ones. * build/lib/configure, configure.bat: Add new configuration option --windows95 to signal that we want Windows 95 compatibility. * stlport/stl/_threads.h, config/_windows.h, src/allocators.cpp: Move _STLP_ATOMIC_ADD macro definition in source files where it is used. * stlport/stl/config/_windows.h: - When building the libraries we always include windows.h, when using the library we always use own function declaration to avoid windows.h inclusion. - InterlockedExchangeAdd is not declared anymore. - InterlockedExchangePointer is only used when detecting 64 bits platform thanks to the _WIN64 macro, otherwise InterlockedExchange is used. 2007-03-15 Francois Dumont * build/Makefiles/nmake/vc8.mak: Default MSVC 2005 build is now done without safe string functions for performance reasons. * stlport/stl/_locale.h, _alloc.h, _rope.h: Moved _STLP_CHECK_RUNTIME_COMPATIBILITY_AT_LINK_TIME invocation where problem might happen which is in the rope implementation for current use. A future use will need to guess where this function has to be invoked. * stlport/stl/config/feature.h: Fixed _STLP_USE_NO_IOSTREAMS check to undef _STLP_CHECK_RUNTIME_COMPATIBILITY_AT_LINK_TIME macro. * stlport/stl/config/_windows.h: For performance reason _STLP_CHECK_RUNTIME_COMPATIBILITY_AT_LINK_TIME system is only used in debug mode (detected thanks to _DEBUG macro). 2007-03-13 Francois Dumont * Merged with STLPORT_5_1 branch revision 2963. * src/locale_catalog.cpp: Use C cast for C struct like _Locale_ctype, it makes Borland compiler happier. * stlport/stl/_string.h: Made inheritance relation between basic_string and _String_base class public for DMC. * src/dll_main.cpp, stlport/stl/config/features.h, stlport/stl/_locale.h, _alloc.h: Add a new mecanism to detect library build/use inconsisteny at link time. _STLP_CHECK_RUNTIME_COMPATIBILITY_AT_LINK_TIME macro contains a function name declared in features.h and defined in dll_main.cpp. This function name depends on the build context. If, when using the library, this macro contains an other function name because of a different configuration context an unresolved symbol will appear at link time showing the missing function symbol. Function name should be chosen carefully to make problem as explicit as possible. For the moment function is called in arbitrary places, in std::use_facet function and std::allocator constructor. * stlport/stl/config/_windows.h: Use _STLP_CHECK_RUNTIME_COMPATIBILITY_AT_LINK_TIME macro to detect inconsistency when building STLport for Windows 95 and using it in Windows XP or opposite. Depending on targetted platform, _Refcount_Base has a different sizeof which lead to undefined behavior at runtime if we do not use this trick. 2007-03-13 Petr Ovtchenkov * test/unit/string_test.cpp: add test for trivial compare with plain char array; * test/unit/exception_test.cpp: add test for what(). 2007-03-10 Francois Dumont * stlport/stl/config/_windows.h: Major modification, when building STLport libs windows.h or afx.h, when _STLP_USE_MFC is defined, is systematically included in order to detect the SDK version used to the libraries. _windows.h is now the only place is the library where windows.h is included. * src/dll_main.cpp, fstream.cpp, lock_free_slist.h, c_locale_win32/c_locale_win32.c: Removed references to windows.h now included from _windows.h. * stlport/stl/_istream.c: Add parenthesis on a use_facet call to make VC6 happy when building the library. * test/unit: Disable tests checking instanciation and use of containers with an incomplete type when pointer specialization is enable. * stlport/stl/config/user_config.h: Add comment about limitation of pointer specialization. * stlport/stl/_string.h, _string_workaround.h: Now that _STLP_DEBUG mode do not use inheritance anymore, use private rather than protected members in basic_string implementation. Only exception is when using VC6 workaround, this is what _STLP_PRIVATE macro is for. * src/allocators.cpp, stlport/stl/config/features.h: Removed unjustified _STLP_PRIVATE macro. 2007-03-09 Petr Ovtchenkov * stlport/stl/config/_msvc.h: use MS's safe string functions only if _CRT_SECURE_NO_DEPRECATE not defined (see bug #1674974). Thanks Bronek Kozicki. 2007-03-08 Petr Ovtchenkov * src/num_get_float.cpp: experimental support of correct input of long doubles on Linuxes. * test/unit/num_put_get_test.cpp: test for correct input of float, double and long double, including values out of type range. * stlport/stl/config/_linux.h: mark that Alpha, PowerPC, 32-bit SPARC, 32-bit MIPS, ARM, SH4 has no long double. 2007-03-05 Francois Dumont * Synchronization with STLPORT_5_1 branch revision 2945. 2007-02-19 Francois Dumont * stlport/stl: swap workaround review, now when swap implementation detect that a STLport class is being swapped it calls the _M_swap_workaround member method. We do not use the swap method anymore because the way the workaround is implemented would have forces us to add a swap method to queue, priority_queue and stack containers that do not have a swap method according the C++ Standard. 2007-02-15 Francois Dumont * Synchronization with STLPORT_5_1 branch up to revision 2918. 2007-02-13 Francois Dumont * stlport/stl/config/features.h, _msvc.h, stl_mycomp.h: Removed _STLP_USING_NAMESPACE_BUG macro config. STLport private namespace is now always nested in stlport one. Makes namespace management easier. * stlport/stl/_algobase.h: Restore workaround for compilers not supporting template function partial ordering feature, was resulting in regression for a number of compilers, VC6, Borlands. A template class like _SwapImplemented do not have to be specialized to be useful, this class is used to detect types having a swap method. Detection is based on the class being flagged as STLport class thanks to the __stlport_class inheritance. * test/unit/swap_test.cpp: Add macro checks to ignore test for compilers we know not being able to support it. 2007-02-12 Francois Dumont * stlport/stl/config/features.h: Add necessary macro to work with tr1 namespace of the C++ technical report. * stlport/stl/_unordered_set.h, _unordered_map.h: Put unordered containers in tr1 namespace. * test/unit/unordered_test.cpp, mvctor_test.cpp, mvctor_declaration_test.cpp: Add necessary using directive to access tr1 namespace. 2007-02-12 Petr Ovtchenkov * Repository: revert back r2908; * test/unit/swap_test.cpp: test that swap( a, b ) has specialization a.swap( b ), when required; * stlport/stl/_algobase.h: _SwapImplemented useless, because it never specialized elsewhere---remove swap specialization here, use instead swap specialization from _relops_cont.h, when required. 2007-02-07 Francois Dumont * locale_impl.cpp, monetary.cpp, num_get.cpp, num_put.cpp, time_facets.cpp: Moved all _GetFacetId implementations in the same translation unit as the one where id are initialized. 2007-02-05 Francois Dumont * stlport/stl/_alloc.h, allocators.cpp: Moved _ALIGN and _ALIGN_SHIFT constant definition in source file where it is used _MAX_BYTES is used in deque implementation. Moreover those constant value now depends on sizeof(void*) to avoid preprocessor check like _WIN64. * stlport/stl/_vector.h, _vector.c: Moved __type_traits instanciations in methods that need it in order to be able to access nested types like iterator even if type used to instanciate the vector is not yet completely defined. * stlport/stl/_deque.h, _deque.c: Removed useless __type_traits instanciations. For the same reason than above, __buffer_size constant has been replaced by a function computing deque buffer size at runtime. * stlport/stl/_hashtable.h, _hashtable.c: For the same reason than above, hashtable do not contains anymore an instance of the _ExK type which is used to extract the key part from a value instance. This instance was not returned in any method of the hashtable type. An unused constructor taking an instance of this type has been removed. * test/unit/vector_test.cpp, deque_test.cpp, list_test.cpp, slist_test.cpp, map_test.cpp, set_test.cpp, hash_test.cpp, unordered_test.cpp: Add compilation tests to check that the container iterator nested type is accessible even if type used to instanciate the container is not yet completely defined. 2007-02-02 Francois Dumont * src/c_locale.h: Add type information for the following functions of the localization support API: - _Locale_*_create - _Locale_*_destroy - _Locale_*_name Also add some variable name to make associated documentation more explicit. * src/c_locale_win32/c_locale_win32.c, src/c_locale_glibc/c_locale_glibc.c, c_locale_glibc2.c: Adapted to conform to new localization API functions prototypes. Adaptation in glibc before 2.2 has been updated but compilation hasn't been completed because of the lack of the glibc required version. * src/locale_catalog.cpp: Now wrapper functions are used to offer a homogeneous prototype to type safe localization API functions. 2007-02-02 Petr Ovtchenkov * test/unit/hash_test.cpp: add test for hash_multimap, equivalent keys problem on some data sets [this is regression test, suggested by tef for 5.0.2, bug report #1606308]. 2007-01-29 Petr Ovtchenkov * stlport/stl/debug/_deque.h: typename required. * test/unit/sstream_test.cpp: test for seekp added. 2007-01-28 Francois Dumont * build/Makefiles/gmake: Borland patch from Eric Sanford to install .tds file for Borland debugger. * trunk synchronized with STLPORT_5_1 branch up to revision 2895. * stlport/stl/_threads.h: Changed way of including headers for _STLP_UITHREADS platform. We now include internal STLport headers rather than Standard ones. It was especially important for Sun Studio compiler that natively include Standard headers only once. 2007-01-25 Petr Ovtchenkov * src/facets_byname.cpp: we search within scope, specified by mask, so _Locale_wchar_ctype return can't be beyond of this mask. * src/c_locale_glibc/c_locale_glibc2.c: _Locale_wchar_ctype implemented. * test/unit/locale_test.cpp: test for ctype facet for wchar_t added. 2007-01-23 Francois Dumont * stlport/stl/_locale.h: Introduction of the _GetFacetId function to isolate access to facet id instance in one place. It guaranty that the facet id instances initialized in _Stl_loc_assign_ids function are the same as the ones used by streams to format output. Many compilers have problem with template class static variable and duplicate them arround the different shared library depending on STLport. * stlport/stl/_monetary.h, _num_get.h, _num_put.h, _time_facets.h: Add _GetFacetId overloads for money_get, money_put, num_get, num_put, time_get, time_put facets that are exposed as template facets. Other facets are fully specialized template classes whose id should be correctly handle by compilers like for any static variable in a non template class. * src/monetary.cpp, num_get.cpp, num_put.cpp, time_facets.cpp: Add _GetFacetId implementation. * stlport/stl/_collate.h: Use _GetFacetId in __locale_do_operator_call implementation, not required but more consistent. * stlport/stl/_monetary.c, _num_put.c, _num_get.c, _time_facets.c, src/locale_impl.cpp: Removed now useless gcc Cygwin or MinGW and Borland workarounds. * test/unit/locale_test.cpp: Removed facet_id test case, facet id indexes are STLport internal stuff that shouldn't be part of a unit test. Wrong facet id management will be shown by other tests. Moreover this test was failing for compilers duplicating template class static instances. 2007-01-20 Francois Dumont * stlport/stl/_cmath.h, _cstdlib.h, config/_watcom.h: Small evolution for Open Watcom support. * Synchronization of trunk from STLPORT_5_1 branch from revision 2750 to revision 2871. * stlport/stl/config/features.h, _gcc.h, _intel.h, _msvc.h, _sgi.h: Major exception policy modification, _STLP_NOTHROW default value is now throw() when exception support is activated. Compilers not supporting is should define this macro as empty. Configuration files of compilers already managing this feature have been updated. 2007-01-19 Petr Ovtchenkov * stlport/stl/config/host.h: define one of __SunOS_5_x macro for gcc (during installation?) on Solaris; note, that Solaris system may has patch with MATH_F and MATH_L functions. * stlport/stl/config/_solaris.h: reminder for __SunOS_5_x macro definition for gcc; turn on/off MATH_F/MATH_L functions present: see beacon that depends upon Solaris version and patch present, as defined by SunPro compilers or in host.h. Thanks to Graham Reed. * stlport/stl/config/_sunprocc.h: if use new-c-headers, SunPro include iso/stdlib_iso.h instead of stdlib.h; note, that this exclude usage of long double, long long, etc. functions, even when ones present in OS. Thanks to Graham Reed. Bugreport 1630943. 2007-01-18 Francois Dumont * stlport/stl/_num_put.c: Add cast to avoid gcc warning. * stlport/stl/_pair.h, _construct.h: Add _STLP_NO_MOVE_SEMANTIC before inclusion of _move_construct_fwk.h. * stlport/stl/_istream.c: Removed useless cast to num_get facet. * src/system_api.c: Move macro check to at least include math.h in order to avoid an empty translation unit which can generate compilation warning. 2007-01-17 Petr Ovtchenkov * stlport/stl/_cmath.h: move hypot in global namespace for SunSoft; suggested by Graham Reed. 2007-01-15 Francois Dumont * test/unit/locale_test.cpp: Upgrade Russian currency abbreviation 'RUR' to 'RUB'. Thanks Tiziano Muller, bug report 1634886. * test/unit/cstring_test.cpp: Fix test to avoid some gcc warnings. * stlport/stl/config/_gcc.h: Add _STLP_NOTHROW definition for this compiler for C++ Standard compliancy. It might also help the compiler not to emit false warning about potential use of uninitialized variable (-Wall mode). * build/lib/Makefile.inc, src/system_api.h, system_api.c: New source file used for platform exposing some features only to C compiler. for the moment used under Hp Unix for GNU compiler access to platform isfinite, isnan and isinf functions. * src/num_put_float.cpp: Replace a lot of unofficial Hp Unix specific code to access functions isfinite, isinf or isnan. Replaced by system_api.h. * build/Makefiles/gmake/hp-ux/sys.mak: Looks like install command on this platform is rather exotic, use cp instead. 2007-01-14 Francois Dumont * stlport/stl/config/_system.h: Add __SUNPRO_C macro check to detect Sun Pro C compiler. Thanks Graham Reed bug report 1630916. * stlport/stl/_cstdlib.h: Add __SUNPRO_CC macro check before defining abs(long) and div(long, long) as Sun pro already defined them. Thanks Graham Reed bug report 1630972. 2007-01-07 Francois Dumont * stlport/stl: Add _STLP_NO_MOVE_SEMANTIC macro checks to completely hide move semantic framework when not necessary. 2007-01-05 Francois Dumont * test/unit/bitset_test.cpp: Check _STLP_NON_TYPE_TMPL_PARAM_BUG macro before doing tests that depends on it. * stlport/stl/_list.h: Add assertion to signal potential stack overflow in recurssive calls to list::insert and list::splice thanks Aleksey Sanin idear. * build/Makefiles/gmake/lib/gcc.mak: Removed obsolete -C ld option on Hp Unix platform. * stlport/stl/_mbstate_t.h: Attempt to fix STLport config for compilers coming with a native lib defining mbstate_t only for C++ compilers. For those compilers native mbstate_t definition won't be used for the moment, STLport simply grant a dummy definition in C. Test under Hp Unix has shown that it works. 2006-12-29 Francois Dumont * src/iostream.cpp, stlport/stdio.h, stl/_cstdio.h: Eric Sanford patch to move a Borland workaround from cstdio to stdio.h. * stlport/stl/debug: Generalize _STLP_NO_MOVE_SEMANTIC check to hide move constructors like already done in non debug implementation. * stlport/stl/config/_msvc.h: Restore move semantic for MSVC6. AFAIR only MSVC .Net 2002 had problem with it. * test/unit/strstream_test.cpp: Made the tests for _STLP_LONG_LONG a little bit more portable. 2006-12-20 Francois Dumont * test/unit/strstream_test.cpp: New test case for sourceforge bug report 1615554. Not confirm for the moment. * test/unit/math_aux.h, mvctor_test.h, string_test.cpp: Fixes to correctly take into account _STLP_USE_NAMESPACES. 2006-12-19 Francois Dumont * test/unit/bvector_test.cpp: Fix macro check for namespace support. * test/unit/num_put_get_test.cpp: disable warning about float overflow for MSVC. 2006-12-17 Francois Dumont * test/unit: One more cleanup for compilers not supporting the namespace feature. This time we avoid namespace specification when doing template specialisation of Standard functor like less or allocator. 2006-12-15 Francois Dumont * stlport/stl/config/_dm.h, test/unit/map_test.cpp: Eric Sanford patch for DMC. 2006-12-13 Francois Dumont * test/unit/test_main.cpp: Clean up use of namespace feature. * test/unit: Clean up use of std namespace or ignore tests if necessary. 2006-12-13 Petr Ovtchenkov * stlport, src: Orphan code removed [Symantec without maintainance a long time; gcc prior 2.95 and 2.96 can't work with current code in any case; NetWare unsupported too] 2006-12-13 Francois Dumont * stlport/stl/config/feature.h: Fix and generalize the mutable workaround for compilers missing this feature. Replace _STLP_ASSIGN_MUTABLE with _STLP_MUTABLE macro that is more flexible as not limited to assignment. * stlport/stl/_istreambuf_iterator.h, _stream_iterator.h, _string_sum.h: Use _STLP_MUTABLE rather than manually handle _STLP_NEED_MUTABLE macro. * stlport/stl/_sstream.h: Removed useless mutable qualifier for basic_stringbuf _M_str member. * test/unit/bind_test.cpp: Use STLport mutable workaround. * src/message_facets.h, facets_byname.cpp: Limit use of the mutable qualified to one member in _Message_Impl class and use _STLP_MUTABLE in class implementation. 2006-12-11 Francois Dumont * test/unit/mvctor_test.cpp: Split in 2 other translation unit mvctor_declaration_test.cpp and mvctor_traits_test.cpp without impacting number of test case. It helps DMC to perform a correct link. * stlport/stl/type_manips.h: Check _STLP_DONT_USE_PRIV_NAMESPACE before importing __true_type and __false_type in private namespace. * stlport/stl/config/_dec.h, _apcc.h: Removed references to unused _STLP_HAS_NO_NEW_IOSTREAMS macro. 2006-12-11 Petr Ovtchenkov * src/fstream.cpp, stlport/stl/_fstream.h: non-template friend function of template class isn't good idea. Fixed. 2006-12-09 Francois Dumont * stlport/stl/_range_errors.h: To complete 2006-12-04 modification fix inclusion to access to string definition. In normal mode we include stlport/stl/_string.h rather than string header. There is a special case however if cumulating _STLP_NO_IOSTREAMS, _STLP_DONT_REDEFINE_STD and _STLP_WHOLE_NATIVE_STD then functions defined in _range_errors.h will throw exception from std namespace rather than from stlport. * stlport/stl/config/user_config.h: Documented above modification. * stlport/stl/config/features.h: Modify _STLP_VENDOR_STD definition. This internal macro do not have to use __std_alias, within STLport code std is not a macro and can be used as the vendor namespace. 2006-12-07 Francois Dumont * stlport/stl/_algobase.c, config/features.h: Removed unused _STLP_MPW_EXTRA_CONST macro. * stlport/stl/config/_watcom.h, _dm.h, feature.h: Add new _STLP_NO_CONST_IN_PAIR macro config to avoid instanciation of pair with a const qualified type. _STLP_CONST is defined based on _STLP_NO_CONST_IN_PAIR. * stlport/stl/_map.h, _hash_map.h, _unordered_map.h: Add use of _STLP_CONST. * stlport/stl/_num_put.c: Introduce __do_put_bool function containing all codes to render bool values. We do not use anymore __copy_integer_and_fill function that was difficult to instanciate for Open Watcom compiler. Moreover this function was not really adapted for being use in this context, code duplication is very limitated and absolute number of lines of code hasn't been modified. * stlport/stl/_fstream.h, src/fstream.cpp: Removed useless declaration of template specialization for _Noconv_input _Noconv_output and _Underflow. _Underflow template specialization now use a function __Underflow_doit to avoid the complex syntax of the implementation of a member method of a template class specialization in fstream.cpp. * src/message_facets.h: Add missing allocator parameter in hash_map instanciation, required for compiler lacking default template parameters support. * src/num_get_float.cpp: Add unsigned 64 bits support for Open Watcom. * stlport/stl/_cmath.h, _cstdlib.h: Signal that Open Watcom has already all math functions C++ overloads in global namespace. * Cleanup of all workarounds for MSVC before version 6. * build/Makefiles/gmake/gcc.mak: Hide -fvisibility option for windows as in this context we are not able to correctly detect gcc version in use. * stlport/stl/_fstream.h: Reorder member variables in _Filebuf_base to avoid gcc warning. 2006-12-06 Francois Dumont * STLport 5.1.0 released based on STLPORT_5_1 branch revision 2750. * Merge STLPORT_5_1 branch from revision 2711 to 2749. * stlport/stl/config/_hpux.h: Specify that Hp Unix is a unix platform _STLP_UNIX. This platform was already recognise as a unix platform but it is more clear to put it in Hp Unix configuration file. * src/num_put_float.cpp: Limit Hp Unix workaround to access isfinite isnan and some other system functions to the gcc compiler, aCC has natively access to it. Tests done by Boris Gubenko. 2006-12-04 Francois Dumont * stlport/fstream, iomanip, ios, iosfwd, iostream, istream, locale, ostream, sstream, streambuf, strstream: Allow use of iostream headers even when _STLP_NO_IOSTREAMS is defined if using _STLP_WHOLE_NATIVE_STD. 2006-12-02 Francois Dumont * stlport/stl/_string.c: Use find_end algo rather than internal __find_end function, find_end contains workaround for limited compilers. * stlport/stl/_algo.c: Avoid a useless default value for last parameter of __stable_partition_aux_aux function. * src/num_put.cpp: In __insert_grouping_aux, use template parameter Str to get iterator definition rather than getting definition from basic_string. * stlport/stl/_num_get.c, _num_put.c: Complete basic_string definition for compiler not supporting default template parameters. * stlport/cmath, cstdio, typeinfo: Modified to be reentrant once. * stlport/stl/_alloc.h, _bvector.h, _construct.h, _deque.h, _hash_map.h, _hash_set.h, _hashtable.h, _list.h, _map.h, _pair.h, _queue.h, _rope.h, _set.h, _slist.h, _stack.h, _string.h, _string_base.h, _string_workaround.h, _tree.h, _unordered_map.h, _unordered_set.h, _vector.h: Now _STLP_NO_MOVE_SEMANTIC hide all calls to _AsMoveSource function. 2006-11-30 Francois Dumont * test/unit/stack_allocator.h: Fixed StackAllocator implementation for Borland and DMC that required a workaround. * stlport/stl/config/_gcc.h: Starting with gcc 4, use visibility feature. * build/Makefiles/gmake/gcc.mak: Starting with gcc 4, add -fvisibility=hidden compilation option. 2006-11-28 Francois Dumont * stlport/stl/_alloc.h: Avoid explicit instanciation of template function _AsMoveSource. Replace internal allocator::allocate function with _M_allocate to avoid use of overloading. * stlport/utility: Fix header reentrancy. * stlport/stl/_ptrs_specialize.h: Fixed instanciation of __type_traits_aux. 2006-11-25 Francois Dumont * stlport/climits, iosfwd, mem.h, string.h, typeinfo.h, wchar.h, stl/char_traits: Eric Sanford patch to complete use of include_next with Borland compilers. * stlport/using/cstring: Fix macro check for Borland compiler. * test/unit/locale_test.cpp: Add test for Borland _fpclass. * src/num_put_float.cpp: Fix potential error in _Stl_is_neg_nan for Borland compiler after 0x581. 2006-11-24 Francois Dumont * Eric Sanford patch for DMC compiler, allow access to associative containers extension. * stlport/typeinfo.h, exception: Workaround for DMC that force inclusion of typeinfo.h at the begining of all translation units. 2006-11-23 Francois Dumont * test/unit/cstring_test.cpp: New test case to check import of all C functions from string.h in STLport namespace. * stlport/using/cstring: Fix import of strcmp and strcpy for Borland. 2006-11-20 Francois Dumont * stlport/iosfwd, stl/type_manips.h, config/_bc.h, pointers/_tools.h: Patch from Eric Sanford to remove useless Borland workaround for pointer specialisation and use include_next feature for versions after 0x580. 2006-11-20 Petr Ovtchenkov * src/monetary.cpp: template header not allowed in member definition of explicitly specialized class 2006-11-19 Francois Dumont * stlport/stl/_ios_base.h: Replace wrong external utility inclusion with internal _pair.h header. 2006-11-17 Francois Dumont * stlport/stl/config/features.h: Modification of the static constant workaround implementation to use something similar to the boost workaround. _STLP_STATIC_CONST_INIT_BUG macro change definition of newly introduce _STLP_STATIC_CONSTANT macro which use an enum or a real static const variable. Moreover the new _STLP_NO_STATIC_CONST_DEFINITION will hide static constant definition when defined. * src/ctype.cpp, ios.cpp, locale.cpp: Add check for _STLP_NO_STATIC_CONST_DEFITION. * src/monetary.cpp: Add intl static constant definitions. * stlport/stl/_ctype.h, _ios_base.h, _limits.h, _monetary.h: Use _STLP_STATIC_CONSTANT. * stlport/stl/_limits.h: Limits a workaround for long long and unsigned long long types that used to be applied for gcc after 2.96 up to version 3.0. * stlport/stl/_limits.c: Clean all static constant values duplicated from _limits.h that was not used in this file. Add static constant definition necessary for long long and unsigned long long types for gcc between 2.96 and 3.0 (see above). * stlport/stl/debug/_string.h: Removed npos static constant definition that is only necessary in stlport/stl/_string.c. * stlport/stl/config/_msvc.h: Use real static constant starting with VS .Net 2003 (_MSC_VER >= 1310). * test/unit/limits_test.cpp: Modified test to reveal potentially missing static constant definitions. 2006-11-13 Francois Dumont * stlport/stl/config/stl_confix.h: Add some STLport config options based on EDG version information using boost common_edg.hpp content. * stlport/stl/: Patch from Eric Sanford for Borland compiler. Allow associative container extension (member methods) and use of pointer specialization. 2006-11-07 Francois Dumont * stlport/stl/config/_hpacc.h, stl_confix.h: Thanks to additional info from Boris Gubenko STLport now check __EDG_VERSION__ to detect EDG based compilers. It use this macro to activate include_next feature. Moreover a workaround has been added for aCC6 that was not defining __EDG_VERSION__ as expected. _hpacc.h has also been cleaned of obsolete config. 2006-11-07 Francois Dumont * stlport: All C++ Standard headers are now using the same schema. If included from outside (_STLP_OUTERMOST_HEADER_ID not defined) it first included internal header (in stl folder) and then, if _STLP_WHOLE_NATIVE is defined, include the equivalent native Standard header. If included from inside, simply forward to native header include. This schema has several advantages: - Less dependancy on native library headers interdependancy. - Less code included as STLport code is only exposed if headers are included from the outside. - Restore _STLP_WHOLE_NATIVE_STD configuration (tested with gcc, msvc, bcc) The condition for this schema to work is that STLport never include Standard headers internaly when it wants to access some STLport code. * stlport/stl/_iomanip.h: New file containing all STLport code that used to be in stlport/iomanip. * stlport/stl/_complex.h, _rope.h, _stream_iterator.h, _string_fwd.h: Use stl/_iomanip.h rather than iomanip. * stlport/stl/_rope.c: Use stl/_ostream.h and stl/_istream.h rather than iostream. * stlport/stl/config/_kai.h, _msvc.h, feature.h: _STLP_MINIMUM_IMPORT_STD macro removed, it was only used in vector header to avoid include of native vector header even when _STLP_IMPORT_VENDOR_STD was defined. MSVC6 used to define it but removing it hasn't make compilation failed when importing all native std stuff. Looks like it was a workaround necessary when STLport was not as clean as it is now or for the former wrapper mode that has been removed. * stlport/stl/config/features.h: Add a #error to signal that _STLP_WHOLE_NATIVE_STD and _STLP_NO_OWN_NAMESPACE are incompatible options. * stlport/stl/config/stl_confix.h 2006-11-05 Francois Dumont * stlport/stl/_sstream.h, _sstream.c: Add 2 helper functions _S_start and _S_finish to hide complexity of code required to have read access to the aggregated string instance internal buffer. Those 2 functions help keeping basic_stringbuf implementation simple without requiring a friend declaration in basic_string class and use of inheritance in _STLP_DEBUG mode between the debug string and the non debug one. * stlport/stl/_string.h, debug/_string.h, _string_sum_methods.h: Removed friend declaration and inheritance (see above). This also avoids to restore some workarounds that used to be necessary when _STLP_DEBUG mode was using inheritance in all the debug containers. 2006-11-04 Francois Dumont * src/num_put_float.cpp: According C Standard number of digits in the exponent part of scientific output should be at least 2, C99 even says that we shouldn't add zeros if there are more than 3 significant digits. * test/unit/complete_digits.h: Modified according to above rules. 2006-11-02 Francois Dumont * Repository: Merged STLPORT_5_1_RC3 tag changes up to r2771 into the trunk. Now trunk is really in sync with STLPORT_5_1 branch. * etc/ChangeLog: Now contains only trunk modif, 5.1 changes are in ChangeLog-5.1. 2006-11-02 Petr Ovtchenkov * Repository: merged from 5.1 branch. 2006-11-01 Francois Dumont * stlport/stl/_stdexcept_base.h: Patch from Uli to simplify __Named_Exception implementation. 2006-10-31 Francois Dumont * build/test/unit/Makefile.inc: Restore STLport version information that had mysteriously disappeared in a previous modification. * stlport/stl/_num_put.c: Disable warning for MSVC that signal problem in cast from pointer to unsigned long. * src/num_put_float.cpp: Fix buffer overflow introduce by a previous modification. Now STLport appends '0' so that floating point scientific output has a constant size. MAXESIZ renamed in MAXEDIGITS to make macro signification more obvious. * test/unit/complete_digits.h: New file containing the function giving platform dependant number of digits in STLport scientific output of floating point types. * test/unit/num_put_get_test.cpp, locale_test.cpp: Adapt tests to latest STLport modifications. 2006-10-30 Francois Dumont * stlport/stl/_stlport_version.h: Upgrade STLport version information to reflect built libraries. 2006-10-24 Petr Ovtchenkov * stlport/stl/config/host.h, _linux.h: force usage malloc_alloc as default allocator on systems with glibc 2.3.x and later due to better performance. * stlport/stl/_alloc.h: remove _STLP_MALLOC_USABLE_SIZE dependant code---not really used. * stlport/stl/_alloc.c: remove recalculation of __n [Francois was right]; remove _STLP_MALLOC_USABLE_SIZE dependant code---not really used. * src/allocators.cpp: remove additional __malloc_alloc_impl class---not required; add mutex lock for custom __malloc_alloc oom handler change/use [in multi-threaded environment]. 2006-10-16 Petr Ovtchenkov * stlport/stl/c_locale.h, _mbstate_t.h, src/c_locale.h, c_locale.c: merge changes from STLPORT_5_1 branch, see 2006-10-12 [Francois Dumont]; may be problems on Solaris, and FreeBSD---more check required. 2006-10-13 Petr Ovtchenkov * Repository: merge changes [not all] 2006-10-12 from STLPORT_5_1 branch 2006-10-12 Petr Ovtchenkov * Repository: merge changes from STLPORT_5_1 branch (records from 2006-10-06 to 2006-10-04). * stlport/stl/_alloc.c: Hmm, looks like deallocation size in 2006-10-06 is wrong. * stlport/stl/_num_put.c: print pointer as in fix width form, and with base 0x, independent, zero pointer or not. * test/unit/num_put_get_test.cpp: test for issue above. * test/unit/string_test.cpp: test for overloaded operators and temporary string; inspired by problems with some compilers. * stlport/stl/_mbstate_t.h: revert back changes from STLPORT_5_1 branch; mbstate_t couple with wchar closely, and sometimes has compex and implicit dependance; include wchar.h first required! 2006-09-12 Petr Ovtchenkov * test/unit/string_test.cpp: add test for bug report #1541499, problem not detected; looks like gcc 4.1.1 can compile te_tmp test correctly [sum operations under class derived from string, with _STLP_USE_TEMPLATE_EXPRESSION]. 2006-09-08 Petr Ovtchenkov * stlport/stl/_sstream.h, _sstream.c: remove double buffering on write only underlying string as buffer. Use knowlege about string implementation, this should improve performance, and, at least simplify code and avoid logic that already present in string implementation. * stlport/stl/_string_base.h: basic_streambuf is friend, to access to internal function (access to storage pointers). * stlport/stl/debug/_string.h, _string_sum_methods.h: change usage of 'non-debug string', from 'use of' relation to 'inherit' releation. Useful for access basic_streambuf to string storage in _STLP_DEBUG mode too. * test/unit/sstream_test.cpp: test for tellp call; change test with inited ostringstream in accordance with another Standard treatment. * stlport/stl/_streambuf.h: remove ancient code, that can't work with present code in any case. * src/c_locale.c: ditto * build/lib/Makefile.inc: bump minor version (5.2.0) 2006-07-27 Francois Dumont * stlport: Adopt include_next GNU extension for the following reasons: - Standard headers do not have to be categorised anymore to be included, we could have a wrong include order if headers are not correctly categorized. - Package builder can use any folder structure they want for gcc, STLport won't have to be customized anymore. - Make STLport usable with other library that also use the shadow header trick to modify native headers content. * stlport/stl/config/_gcc.h: Add definition of _STLP_HAS_INCLUDE_NEXT macro to signal that this compiler preprocessor support include_next. Removed all definition of native headers path that are now useless. 2006-03-27 Petr Ovtchenkov * src/num_put_float.cpp: use buffers that at least longer than maximal double [or long double] exponent, so avoid potential vulnerabilities; this allow to read really long fix-float numbers [with lost of significant digits, of course]. * test/unit/floatio_test.cpp: add test for issue above 2006-03-23 Petr Ovtchenkov * src/cxa.c: remove wrong exclusion of lock for Solaris.