Return-Path: Delivered-To: apmail-stdcxx-commits-archive@www.apache.org Received: (qmail 58879 invoked from network); 24 Jun 2008 09:38:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jun 2008 09:38:40 -0000 Received: (qmail 61098 invoked by uid 500); 24 Jun 2008 09:38:41 -0000 Delivered-To: apmail-stdcxx-commits-archive@stdcxx.apache.org Received: (qmail 61087 invoked by uid 500); 24 Jun 2008 09:38:41 -0000 Mailing-List: contact commits-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list commits@stdcxx.apache.org Received: (qmail 61078 invoked by uid 99); 24 Jun 2008 09:38:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jun 2008 02:38:41 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Jun 2008 09:37:50 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9B5EE2388A02; Tue, 24 Jun 2008 02:37:39 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r671102 - in /stdcxx/trunk: etc/config/src/ examples/include/ include/ include/rw/ src/ src/i86/ tests/include/ tests/intro/ tests/iostream/ tests/localization/ tests/regress/ tests/src/ tests/utilities/ util/ Date: Tue, 24 Jun 2008 09:37:36 -0000 To: commits@stdcxx.apache.org From: faridz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080624093739.9B5EE2388A02@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: faridz Date: Tue Jun 24 02:37:33 2008 New Revision: 671102 URL: http://svn.apache.org/viewvc?rev=671102&view=rev Log: 2008-06-24 Farid Zaripov Merged r665723, r665734, r665784, r665796, r666064, r666101, r670570, r670621, r670734 from 4.2.x branch. 2008-06-09 Farid Zaripov * etc/config/src/LOCALE_NAME_FMAT.cpp: Simplified preprocessor condition (_WIN32 is always defined when _WIN64 is defined). * etc/config/src/NO_INT_TRAPS.cpp: Ditto. * etc/config/src/UNAME.cpp: Ditto. * etc/config/src/UNISTD_DECL.cpp: Ditto. * examples/include/stocks.h: Ditto. * include/rw/_config-icc.h: Ditto. * include/rw/_config.h: Ditto. * include/rw/_defs.h: Ditto. * include/rw/_mutex.h: Ditto. * src/catalog.h: Ditto. * src/file.cpp: Ditto. * src/memattr.cpp: Ditto. * src/num_put.cpp: Ditto. * tests/include/testdefs.h: Ditto. * tests/intro/17.names.cpp: Ditto. * tests/iostream/27.filebuf.cpp: Ditto. * tests/iostream/27.ios.members.static.cpp: Ditto. * tests/iostream/27.objects.cpp: Ditto. * tests/localization/22.locale.ctype.cpp: Ditto. * tests/localization/22.locale.ctype.is.cpp: Ditto. * tests/localization/22.locale.messages.cpp: Ditto. * tests/localization/22.locale.num.put.cpp: Ditto. * tests/regress/18.limits.stdcxx-436.cpp: Ditto. * tests/src/alarm.cpp: Ditto. * tests/src/alloc.cpp: Ditto. * tests/src/driver.cpp: Ditto. * tests/src/file.cpp: Ditto. * tests/src/locale.cpp: Ditto. * tests/src/thread.cpp: Ditto. * util/cmdopt.cpp: Ditto. * util/exec.cpp: Ditto. * util/iconv.cpp: Ditto. * util/memchk.cpp: Ditto. * util/path.cpp: Ditto. * util/runall.cpp: Ditto. * util/target.h: Ditto. * util/util.cpp: Ditto. 2008-06-09 Farid Zaripov * include/rw/_config.h: Add new macro _RWSTD_MSVC, defined as _MSC_VER, to simplify preprocessor conditions, that intended for MSVC only. * include/rw/_mutex.h: Simplify preprocessor condition using _RWSTD_MSVC. * include/string.cc: Ditto. * tests/utilities/20.auto.ptr.cpp: Ditto. * src/exception.cpp: Make exception(const exception&) consistent with exception(). 2008-06-09 Farid Zaripov * include/rw/_config-msvcrt.h: Move MSVC-specific #pragma from here... * include/rw/_config-msvc.h: ... to here. * include/rw/_defs.h: Use dllimport/dllexport attributes on MSVC and ICC/Windows only. * tests/include/testdefs.h: Ditto. * include/complex: Avoid disabling MSVC-specific warnings on ICC/Windows. * include/string.cc: Ditto. * include/valarray: Ditto. * src/file.cpp: Ditto. * src/iostream.cpp: Ditto. * src/num_get.cpp: Ditto. * src/punct.cpp: Ditto. * src/ti_filebuf.cpp: Ditto. * src/ti_stringbuf.cpp: Ditto. * src/ti_wfilebuf.cpp: Ditto. * src/ti_wstringbuf.cpp: Ditto. * src/time_put.cpp: Ditto. 2008-06-09 Farid Zaripov * src/num_put.cpp [__INTEL_COMPILER && _WIN64] (__rw_put_num): Disable icc warning "conversion may lose significant bits". * src/once.h [_RWSTD_MSVC] (__rw_once): Add exception specification to avoid MSVC warning "function assumed not to throw an exception but does". * src/once.cpp [_RWSTD_MSVC] (__rw_once): Ditto. 2008-06-10 Farid Zaripov * src/once.h [_RWSTD_MSVC] (__rw_once): Added comment about exception specifications. 2008-06-10 Farid Zaripov * etc/config/src/NO_INT_TRAPS.cpp: Call nodbg() to disable popups on MinGW. Use __try/__except on MSVC and ICC/Windows only. * src/i86/atomic.s: Prepend symbols by underscore on MinGW. * src/time_put.cpp (__rw_put_time): swprintf() on MinGW doesn't conform to the C standard. * tests/src/thread.cpp: On MinGW #include to define uintptr_t type. * tests/localization/22.locale.codecvt.cpp: Replace _MSC_VER to _WIN32 in preprocessor conditions to compile on MinGW. * tests/localization/22.locale.ctype.cpp: Ditto. * tests/localization/22.locale.ctype.is.cpp: Ditto. * tests/localization/22.locale.ctype.narrow.cpp: Ditto. * tests/localization/22.locale.ctype.scan.cpp: Ditto. * tests/localization/22.locale.ctype.tolower.cpp: Ditto. * tests/localization/22.locale.ctype.toupper.cpp: Ditto. * tests/localization/22.locale.messages.cpp: Ditto. * util/aliases.cpp: Ditto. * util/charmap.cpp: Ditto. * util/charmap.h: Ditto. * util/ctype.cpp: Ditto. * util/locale.cpp: Ditto. * util/localedef.cpp: Ditto. * util/memchk.cpp: Ditto. * util/path.cpp: Ditto. * util/scanner.cpp: Ditto. * tests/src/locale.cpp: Ditto. #include on MSVC only. 2008-06-23 Farid Zaripov STDCXX-972 * include/vector: Added definitions of the std::operator+() for vector::iterator and vector::const_iterator types. 2008-06-23 Farid Zaripov * src/once.h (__rw_once): Don't use exception specification on MSVC in single threaded builds. 2008-06-23 Martin Sebor * src/once.h: Corrected typos in comment and reworded. Modified: stdcxx/trunk/etc/config/src/LOCALE_NAME_FMAT.cpp stdcxx/trunk/etc/config/src/NO_INT_TRAPS.cpp stdcxx/trunk/etc/config/src/UNAME.cpp stdcxx/trunk/etc/config/src/UNISTD_DECL.cpp stdcxx/trunk/examples/include/stocks.h stdcxx/trunk/include/complex stdcxx/trunk/include/rw/_config-icc.h stdcxx/trunk/include/rw/_config-msvc.h stdcxx/trunk/include/rw/_config-msvcrt.h stdcxx/trunk/include/rw/_config.h stdcxx/trunk/include/rw/_defs.h stdcxx/trunk/include/rw/_mutex.h stdcxx/trunk/include/string.cc stdcxx/trunk/include/valarray stdcxx/trunk/include/vector stdcxx/trunk/src/catalog.h stdcxx/trunk/src/exception.cpp stdcxx/trunk/src/file.cpp stdcxx/trunk/src/i86/atomic.s stdcxx/trunk/src/iostream.cpp stdcxx/trunk/src/memattr.cpp stdcxx/trunk/src/num_get.cpp stdcxx/trunk/src/num_put.cpp stdcxx/trunk/src/once.cpp stdcxx/trunk/src/once.h stdcxx/trunk/src/punct.cpp stdcxx/trunk/src/ti_filebuf.cpp stdcxx/trunk/src/ti_stringbuf.cpp stdcxx/trunk/src/ti_wfilebuf.cpp stdcxx/trunk/src/ti_wstringbuf.cpp stdcxx/trunk/src/time_put.cpp stdcxx/trunk/tests/include/testdefs.h stdcxx/trunk/tests/intro/17.names.cpp stdcxx/trunk/tests/iostream/27.filebuf.cpp stdcxx/trunk/tests/iostream/27.ios.members.static.cpp stdcxx/trunk/tests/iostream/27.objects.cpp stdcxx/trunk/tests/localization/22.locale.codecvt.cpp stdcxx/trunk/tests/localization/22.locale.ctype.cpp stdcxx/trunk/tests/localization/22.locale.ctype.is.cpp stdcxx/trunk/tests/localization/22.locale.ctype.narrow.cpp stdcxx/trunk/tests/localization/22.locale.ctype.scan.cpp stdcxx/trunk/tests/localization/22.locale.ctype.tolower.cpp stdcxx/trunk/tests/localization/22.locale.ctype.toupper.cpp stdcxx/trunk/tests/localization/22.locale.messages.cpp stdcxx/trunk/tests/localization/22.locale.num.put.cpp stdcxx/trunk/tests/regress/18.limits.stdcxx-436.cpp stdcxx/trunk/tests/src/alarm.cpp stdcxx/trunk/tests/src/alloc.cpp stdcxx/trunk/tests/src/driver.cpp stdcxx/trunk/tests/src/file.cpp stdcxx/trunk/tests/src/locale.cpp stdcxx/trunk/tests/src/thread.cpp stdcxx/trunk/tests/utilities/20.auto.ptr.cpp stdcxx/trunk/util/aliases.cpp stdcxx/trunk/util/charmap.cpp stdcxx/trunk/util/charmap.h stdcxx/trunk/util/cmdopt.cpp stdcxx/trunk/util/ctype.cpp stdcxx/trunk/util/exec.cpp stdcxx/trunk/util/iconv.cpp stdcxx/trunk/util/locale.cpp stdcxx/trunk/util/localedef.cpp stdcxx/trunk/util/memchk.cpp stdcxx/trunk/util/path.cpp stdcxx/trunk/util/runall.cpp stdcxx/trunk/util/scanner.cpp stdcxx/trunk/util/target.h stdcxx/trunk/util/util.cpp Modified: stdcxx/trunk/etc/config/src/LOCALE_NAME_FMAT.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/src/LOCALE_NAME_FMAT.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/etc/config/src/LOCALE_NAME_FMAT.cpp (original) +++ stdcxx/trunk/etc/config/src/LOCALE_NAME_FMAT.cpp Tue Jun 24 02:37:33 2008 @@ -129,7 +129,7 @@ int print_locale_name_format (int, int, int, int, int, char, char); -#if !defined (_WIN32) && !defined (_WIN64) || defined (__CYGWIN__) +#if !defined (_WIN32) || defined (__CYGWIN__) char cat_seps[] = " \n\t/\\:;#%"; #else char cat_seps[] = "\n\t/\\:;#%"; Modified: stdcxx/trunk/etc/config/src/NO_INT_TRAPS.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/src/NO_INT_TRAPS.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/etc/config/src/NO_INT_TRAPS.cpp (original) +++ stdcxx/trunk/etc/config/src/NO_INT_TRAPS.cpp Tue Jun 24 02:37:33 2008 @@ -22,13 +22,16 @@ * **************************************************************************/ -#if (defined (_WIN32) || defined (_WIN64)) && !defined (__CYGWIN__) +#include "nodbg.h" + + +#if defined (_MSC_VER) # define TRY __try # define EXCEPT(expr) __except (expr) -#else // not Windows +#else // not MSVC # define TRY if (1) # define EXCEPT(ignore) else if (0) -#endif // _WIN{32,64} +#endif // _MSC_VER int get_int (int); @@ -40,6 +43,8 @@ int main (int argc, char*[]) { + nodbg (); + // test expects to be called with no command line arguments // i.e., (argc < 2) is expected to hold Modified: stdcxx/trunk/etc/config/src/UNAME.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/src/UNAME.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/etc/config/src/UNAME.cpp (original) +++ stdcxx/trunk/etc/config/src/UNAME.cpp Tue Jun 24 02:37:33 2008 @@ -24,7 +24,7 @@ #include -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 # include #else # include Modified: stdcxx/trunk/etc/config/src/UNISTD_DECL.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/etc/config/src/UNISTD_DECL.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/etc/config/src/UNISTD_DECL.cpp (original) +++ stdcxx/trunk/etc/config/src/UNISTD_DECL.cpp Tue Jun 24 02:37:33 2008 @@ -28,11 +28,11 @@ #include #include -#if (defined (_WIN32) || defined (_WIN64)) && !defined (__CYGWIN__) +#if defined (_WIN32) && !defined (__CYGWIN__) # include #else # include -#endif // _WIN32 || _WIN64 +#endif // _WIN32 // Windows defines the equivalent SSIZE_T in the platform SDK // as the signed equivalent of size_t which is defined as long @@ -108,9 +108,9 @@ #ifndef _RWSTD_NO_LONG_LONG # define LONG_LONG long long -#elif defined (_WIN32) || defined (_WIN64) +#elif defined (_WIN32) # define LONG_LONG __int64 -#endif // _RWSTD_NO_LONG_LONG, _WIN{32,64} +#endif // _RWSTD_NO_LONG_LONG, _WIN32 #if defined (LONG_LONG) Modified: stdcxx/trunk/examples/include/stocks.h URL: http://svn.apache.org/viewvc/stdcxx/trunk/examples/include/stocks.h?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/examples/include/stocks.h (original) +++ stdcxx/trunk/examples/include/stocks.h Tue Jun 24 02:37:33 2008 @@ -72,7 +72,7 @@ # define GERMAN_LOCALE "De" # define FRENCH_LOCALE "Fr_FR.850" # define JAPANESE_LOCALE "Ja_JP.932" -#elif defined (_WIN32) || defined (_WIN64) +#elif defined (_WIN32) # define US_LOCALE "us" # define GERMAN_LOCALE "german_germany.1252" # define FRENCH_LOCALE "french_france.1252" Modified: stdcxx/trunk/include/complex URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/complex?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/include/complex (original) +++ stdcxx/trunk/include/complex Tue Jun 24 02:37:33 2008 @@ -38,13 +38,13 @@ #include _RWSTD_CMATH -#ifdef _MSC_VER +#ifdef _RWSTD_MSVC # pragma warning (push) // disable conversion from 'double' to 'float', possible loss of data // until a conforming header with float and long double overloads // for the C functions is provided # pragma warning (disable: 4244) -#endif // _MSC_VER +#endif // _RWSTD_MSVC _RWSTD_NAMESPACE (std) { @@ -854,9 +854,9 @@ } // namespace std -#ifdef _MSC_VER +#ifdef _RWSTD_MSVC # pragma warning (pop) -#endif // _MSC_VER +#endif // _RWSTD_MSVC #if _RWSTD_DEFINE_TEMPLATE (_COMPLEX) Modified: stdcxx/trunk/include/rw/_config-icc.h URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/rw/_config-icc.h?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/include/rw/_config-icc.h (original) +++ stdcxx/trunk/include/rw/_config-icc.h Tue Jun 24 02:37:33 2008 @@ -29,7 +29,7 @@ * **************************************************************************/ -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 // enable the form of libc headers // we can only use the rw version in include/ansi @@ -53,7 +53,7 @@ # endif // _RWSTD_NO_EXCEPTIONS # endif -#else // if defined (_WIN{32,64}) +#else // ifdef _WIN32 # include "_config-msvcrt.h" @@ -69,4 +69,4 @@ // disable "dllexport/dllimport conflict with ... ; dllexport assumed" # pragma warning (disable: 1740) -#endif // (_WIN{32,64}) +#endif // _WIN32 Modified: stdcxx/trunk/include/rw/_config-msvc.h URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/rw/_config-msvc.h?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/include/rw/_config-msvc.h (original) +++ stdcxx/trunk/include/rw/_config-msvc.h Tue Jun 24 02:37:33 2008 @@ -73,6 +73,10 @@ // disable "decorated name length exceeded" #pragma warning (disable: 4503) +// convert warning "'identifier' used on polymorphic type 'type' with /GR-;" +// "unpredictable behavior may result" to error +#pragma warning (error: 4541) + // disable "'identifier' : no suitable definition" // "provided for explicit template instantiation request" #pragma warning (disable: 4661) Modified: stdcxx/trunk/include/rw/_config-msvcrt.h URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/rw/_config-msvcrt.h?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/include/rw/_config-msvcrt.h (original) +++ stdcxx/trunk/include/rw/_config-msvcrt.h Tue Jun 24 02:37:33 2008 @@ -132,7 +132,6 @@ # define _RWSTD_NO_DYNAMIC_CAST #endif // _CPPRTTI -#pragma warning (error: 4541) #ifndef _NATIVE_WCHAR_T_DEFINED // define wchar_t if it is not a keyword recognized by the compiler // (use the /Zc:wchar_t compiler option to enable wchar_t as a keyword) Modified: stdcxx/trunk/include/rw/_config.h URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/rw/_config.h?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/include/rw/_config.h (original) +++ stdcxx/trunk/include/rw/_config.h Tue Jun 24 02:37:33 2008 @@ -237,6 +237,7 @@ /*** MSVC *****************************************************************/ #if defined (_MSC_VER) && !defined (__INTEL_COMPILER) +# define _RWSTD_MSVC _MSC_VER # include "_config-msvc.h" #endif // _MSC_VER && !__INTEL_COMPILER @@ -274,7 +275,7 @@ /*** Win{32,64} ***********************************************************/ -#if defined (_WIN32) || defined (_WIN64) +#ifdef _WIN32 # define _RWSTD_NO_STATIC_MUTEX_INIT # define _RWSTD_PATH_SEP '\\' #endif // _WIN32 @@ -303,9 +304,9 @@ // default to POSIX threads except on Win32 or Win64 -# if !defined (_WIN32) && !defined (_WIN64) +# ifndef _WIN32 # define _RWSTD_POSIX_THREADS -# endif // _WIN{32,64} +# endif // _WIN32 # endif // _RWSTD_*_THREADS #endif // _RWSTD_REENTRANT Modified: stdcxx/trunk/include/rw/_defs.h URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/rw/_defs.h?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/include/rw/_defs.h (original) +++ stdcxx/trunk/include/rw/_defs.h Tue Jun 24 02:37:33 2008 @@ -466,12 +466,11 @@ _RW::__rw_new_capacity(from, what) #endif // HP aCC -// set up Win32/64 DLL export/import directives +// set up MSVC DLL export/import directives // _DLL - defined by the compiler when either -MD or -MDd is used // RWDLL - defined for all Rogue Wave(R) products built as shared libs // _RWSHARED - defined for libstd built/used as a shared lib -#if (defined (_WIN32) || defined (_WIN64)) && \ - (defined (RWDLL) || defined (_RWSHARED)) +#if defined (_MSC_VER) && (defined (RWDLL) || defined (_RWSHARED)) # ifdef _RWSTD_LIB_SRC # define _RWSTD_EXPORT __declspec (dllexport) @@ -482,11 +481,11 @@ # define _RWSTD_CLASS_EXPORT _RWSTD_EXPORT # define _RWSTD_MEMBER_EXPORT /* empty */ #else - // disable Windows hacks + // disable MSVC hacks # define _RWSTD_EXPORT /* empty */ # define _RWSTD_CLASS_EXPORT /* empty */ # define _RWSTD_MEMBER_EXPORT /* empty */ -#endif // _WIN32 || _WIN64 +#endif // _MSC_VER #ifdef _RWSTD_NO_BOOL # define bool int Modified: stdcxx/trunk/include/rw/_mutex.h URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/rw/_mutex.h?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/include/rw/_mutex.h (original) +++ stdcxx/trunk/include/rw/_mutex.h Tue Jun 24 02:37:33 2008 @@ -120,7 +120,7 @@ # define _RWSTD_MUTEX_UNLOCK(mutex) pthread_mutex_unlock (&mutex) # define _RWSTD_MUTEX_T pthread_mutex_t -#elif defined (_WIN32) || defined (_WIN64) +#elif defined (_WIN32) # ifdef _RWSTD_NO_FWD_DECLARATIONS @@ -175,29 +175,29 @@ extern "C" long __cdecl _InterlockedIncrement (volatile long*); extern "C" long __cdecl _InterlockedDecrement (volatile long*); extern "C" long __cdecl _InterlockedExchange (volatile long*, long); -# ifndef __INTEL_COMPILER +# ifdef _RWSTD_MSVC # pragma intrinsic (_InterlockedIncrement) # pragma intrinsic (_InterlockedDecrement) # pragma intrinsic (_InterlockedExchange) -# endif // __INTEL_COMPILER +# endif // _RWSTD_MSVC -# if _MSC_VER >= 1400 && !defined (__INTEL_COMPILER) +# if defined (_RWSTD_MSVC) && _RWSTD_MSVC >= 1400 extern "C" short __cdecl _InterlockedIncrement16 (volatile short*); extern "C" short __cdecl _InterlockedDecrement16 (volatile short*); # pragma intrinsic (_InterlockedIncrement16) # pragma intrinsic (_InterlockedDecrement16) -# endif // _MSC_VER >= 1400 && !__INTEL_COMPILER +# endif // _RWSTD_MSVC >= 1400 # ifdef _M_X64 extern "C" long long __cdecl _InterlockedIncrement64 (volatile long long*); extern "C" long long __cdecl _InterlockedDecrement64 (volatile long long*); extern "C" long long __cdecl _InterlockedExchange64 (volatile long long*, long long); -# ifndef __INTEL_COMPILER +# ifdef _RWSTD_MSVC # pragma intrinsic (_InterlockedIncrement64) # pragma intrinsic (_InterlockedDecrement64) # pragma intrinsic (_InterlockedExchange64) -# endif // __INTEL_COMPILER +# endif // _RWSTD_MSVC # endif // _M_X64 # endif // _MSC_VER @@ -1242,7 +1242,7 @@ { _RWSTD_COMPILE_ASSERT (2 == sizeof (short)); -#if defined (_MSC_VER) && _MSC_VER >= 1400 && !defined (__INTEL_COMPILER) +#if defined (_RWSTD_MSVC) && _RWSTD_MSVC >= 1400 return _InterlockedIncrement16 (&__x); #else return __rw_atomic_add16 (&__x, +1); @@ -1255,7 +1255,7 @@ { _RWSTD_COMPILE_ASSERT (2 == sizeof (unsigned short)); -#if defined (_MSC_VER) && _MSC_VER >= 1400 && !defined (__INTEL_COMPILER) +#if defined (_RWSTD_MSVC) && _RWSTD_MSVC >= 1400 return _InterlockedIncrement16 (_RWSTD_REINTERPRET_CAST (short*, &__x)); #else return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (short*, &__x), +1); @@ -1318,7 +1318,7 @@ { _RWSTD_COMPILE_ASSERT (2 == sizeof (short)); -#if defined (_MSC_VER) && _MSC_VER >= 1400 && !defined (__INTEL_COMPILER) +#if defined (_RWSTD_MSVC) && _RWSTD_MSVC >= 1400 return _InterlockedDecrement16 (&__x); #else return __rw_atomic_add16 (&__x, -1); @@ -1331,7 +1331,7 @@ { _RWSTD_COMPILE_ASSERT (2 == sizeof (unsigned short)); -#if defined (_MSC_VER) && _MSC_VER >= 1400 && !defined (__INTEL_COMPILER) +#if defined (_RWSTD_MSVC) && _RWSTD_MSVC >= 1400 return _InterlockedDecrement16 (_RWSTD_REINTERPRET_CAST (short*, &__x)); #else return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (short*, &__x), -1); @@ -1509,7 +1509,7 @@ { _RWSTD_COMPILE_ASSERT (2 == sizeof (short)); -#if defined (_MSC_VER) && !defined (__INTEL_COMPILER) +#if defined (_RWSTD_MSVC) && _RWSTD_MSVC >= 1400 return _InterlockedIncrement16 (&__x); #else return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT16_T*, &__x), @@ -1523,7 +1523,7 @@ { _RWSTD_COMPILE_ASSERT (2 == sizeof (unsigned short)); -#if defined (_MSC_VER) && !defined (__INTEL_COMPILER) +#if defined (_RWSTD_MSVC) && _RWSTD_MSVC >= 1400 return _InterlockedIncrement16 (_RWSTD_REINTERPRET_CAST (short*, &__x)); #else return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT16_T*, &__x), @@ -1653,7 +1653,7 @@ { _RWSTD_COMPILE_ASSERT (2 == sizeof (short)); -#if defined (_MSC_VER) && !defined (__INTEL_COMPILER) +#if defined (_RWSTD_MSVC) && _RWSTD_MSVC >= 1400 return _InterlockedDecrement16 (&__x); #else return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT16_T*, &__x), @@ -1667,7 +1667,7 @@ { _RWSTD_COMPILE_ASSERT (2 == sizeof (unsigned short)); -#if defined (_MSC_VER) && !defined (__INTEL_COMPILER) +#if defined (_RWSTD_MSVC) && _RWSTD_MSVC >= 1400 return _InterlockedDecrement16 (_RWSTD_REINTERPRET_CAST (short*, &__x)); #else return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT16_T*, &__x), Modified: stdcxx/trunk/include/string.cc URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/string.cc?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/include/string.cc (original) +++ stdcxx/trunk/include/string.cc Tue Jun 24 02:37:33 2008 @@ -26,20 +26,20 @@ * **************************************************************************/ -#ifdef _MSC_VER +#ifdef _RWSTD_MSVC // shut up the dumb MSVC warning C4345: // behavior change: an object with POD type constructed with // an initializer of the form () will be default-initialized # pragma warning (push) # pragma warning (disable: 4345) -#endif // _MSC_VER +#endif // _RWSTD_MSVC _RWSTD_NAMESPACE (std) { #ifndef _RWSTD_NO_STATIC_CONST_MEMBER_INIT -# if !defined (_MSC_VER) || _MSC_VER > 1300 || defined (__INTEL_COMPILER) +# if !defined (_RWSTD_MSVC) || _RWSTD_MSVC > 1300 // MSVC 7.0 allows initializers for static const integral members // but out-of-line definitions cause multiply defined symbol errors // (see PR #26562) @@ -921,6 +921,6 @@ } // namespace std -#ifdef _MSC_VER +#ifdef _RWSTD_MSVC # pragma warning (pop) -#endif // _MSC_VER +#endif // _RWSTD_MSVC Modified: stdcxx/trunk/include/valarray URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/valarray?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/include/valarray (original) +++ stdcxx/trunk/include/valarray Tue Jun 24 02:37:33 2008 @@ -39,13 +39,13 @@ #include _RWSTD_CMATH -#ifdef _MSC_VER +#ifdef _RWSTD_MSVC # pragma warning (push) // disable conversion from 'double' to 'float', possible loss of data // until a conforming header with float and long double overloads // for the C functions is provided # pragma warning (disable: 4244) -#endif // _MSC_VER +#endif // _RWSTD_MSVC _RWSTD_NAMESPACE (std) { @@ -2374,9 +2374,9 @@ #endif -#ifdef _MSC_VER +#ifdef _RWSTD_MSVC # pragma warning (pop) -#endif // _MSC_VER +#endif // _RWSTD_MSVC #endif // _RWSTD_VALARRAY_INCLUDED Modified: stdcxx/trunk/include/vector URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/vector?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/include/vector (original) +++ stdcxx/trunk/include/vector Tue Jun 24 02:37:33 2008 @@ -956,6 +956,11 @@ reference operator[] (difference_type __i) { return *(*this + __i); } + + friend iterator operator+ (difference_type __i, + const iterator &__x) { + return __x + __i; + } }; class const_iterator @@ -1025,6 +1030,11 @@ const_reference operator[] (difference_type __i) { return *(*this + __i); } + + friend const_iterator operator+ (difference_type __i, + const const_iterator &__x) { + return __x + __i; + } }; #ifndef _RWSTD_NO_CLASS_PARTIAL_SPEC Modified: stdcxx/trunk/src/catalog.h URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/catalog.h?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/src/catalog.h (original) +++ stdcxx/trunk/src/catalog.h Tue Jun 24 02:37:33 2008 @@ -37,7 +37,7 @@ #include -#if defined (_WIN32) || defined (_WIN64) +#ifdef _WIN32 # define _RWSTD_USE_RC 1 # include #endif Modified: stdcxx/trunk/src/exception.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/exception.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/src/exception.cpp (original) +++ stdcxx/trunk/src/exception.cpp Tue Jun 24 02:37:33 2008 @@ -304,15 +304,15 @@ exception::exception (const exception&) _THROWS (()) { -#if defined (__INTEL_COMPILER) - - _C_name = ""; - -#elif defined (_MSC_VER) +#if defined (_MSC_VER) _C_name = 0; _C_flag = 0; +#elif defined (__INTEL_COMPILER) + + _C_name = ""; + #endif // _MSC_VER } Modified: stdcxx/trunk/src/file.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/file.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/src/file.cpp (original) +++ stdcxx/trunk/src/file.cpp Tue Jun 24 02:37:33 2008 @@ -43,15 +43,15 @@ #include // for isalpha(), isspace(), toupper() -#if (defined (_WIN32) || defined (_WIN64)) && !defined (__CYGWIN__) +#if defined (_WIN32) && !defined (__CYGWIN__) # include # include #else # include # include -#endif // _WIN32 || _WIN64 +#endif // _WIN32 -#if defined (_WIN32) || defined (_WIN64) +#ifdef _WIN32 # define _BINARY _O_BINARY #else # define _BINARY 0 @@ -62,11 +62,11 @@ #include -#ifdef _MSC_VER +#ifdef _RWSTD_MSVC // shut up the braindead warning C4146: unary minus operator // applied to unsigned type, result still unsigned # pragma warning (disable: 4146) -#endif // _MSC_VER +#endif // _RWSTD_MSVC #if defined (_RWSTD_NO_MKSTEMP) && !defined (_RWSTD_NO_MKSTEMP_IN_LIBC) \ @@ -267,7 +267,7 @@ modebits |= _RWSTD_O_EXCL | _RWSTD_O_CREAT; -#if defined (_WIN32) || defined (_WIN64) +#ifdef _WIN32 // tempnam(const char *dir, const char *prefix) will generate // a unique file name for a directory chosen by the following rules: @@ -305,7 +305,7 @@ // deallocate storage allocated by tempnam() free (fname); -# else // if !(defined (_WIN32) || defined (_WIN64)) +# else // ifndef _WIN32 char tmpbuf [L_tmpnam]; @@ -321,7 +321,7 @@ if (fd >= 0) unlink (fname); -# endif // _WIN{32,64} +# endif // _WIN32 #endif // _RWSTD_NO_MKSTEMP return fd; @@ -429,14 +429,14 @@ __rw_fdmode (int fd) { // FIXME -- need to have equivalent of fcntl() on win32. -#if defined (_WIN32) || defined (_WIN64) +#ifdef _WIN32 return fd == _RWSTD_STDIN_FILENO ? _RWSTD_IOS_IN : fd == _RWSTD_STDOUT_FILENO || fd == _RWSTD_STDERR_FILENO ? _RWSTD_IOS_OUT : _RWSTD_IOS_OUT | _RWSTD_IOS_IN; -#else // if !defined (_WIN{32,64}) +#else // ifndef _WIN32 const int m = fcntl (fd, _RWSTD_F_GETFL); @@ -472,7 +472,7 @@ } -#ifdef _WIN64 +#if defined (_RWSTD_MSVC) && defined (_WIN64) // disable MSVC warning: conversion from '__int64' to 'long', possible loss of data #pragma warning (disable: 4244) #endif @@ -525,7 +525,7 @@ return write (fd, buf, size); } -#ifdef _WIN64 +#if defined (_RWSTD_MSVC) && defined (_WIN64) // restore MSVC warning: conversion from '__int64' to 'long', possible loss of data #pragma warning (default: 4244) #endif Modified: stdcxx/trunk/src/i86/atomic.s URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/i86/atomic.s?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/src/i86/atomic.s (original) +++ stdcxx/trunk/src/i86/atomic.s Tue Jun 24 02:37:33 2008 @@ -33,7 +33,7 @@ # define TYPE_DIR(ign1, ign2) #endif -#if defined (__CYGWIN__) +#if defined (__CYGWIN__) || defined (__MINGW32__) /* on cygwin used COFF object file format C-functions names should prepended by '_' */ # define SYMNAME(name) _##name Modified: stdcxx/trunk/src/iostream.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/iostream.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/src/iostream.cpp (original) +++ stdcxx/trunk/src/iostream.cpp Tue Jun 24 02:37:33 2008 @@ -73,7 +73,9 @@ // force early intitalization of Standard Iostream Objects // gives warning C4073: initializers put in library initialization // area; disable it -# pragma warning (disable: 4073) +# ifdef _RWSTD_MSVC +# pragma warning (disable: 4073) +# endif # pragma init_seg (lib) #endif // _MSC_VER Modified: stdcxx/trunk/src/memattr.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/memattr.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/src/memattr.cpp (original) +++ stdcxx/trunk/src/memattr.cpp Tue Jun 24 02:37:33 2008 @@ -41,7 +41,7 @@ # define _WIN32 #endif -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 # ifdef __SUNPRO_CC // working around SunOS bug #568 # include @@ -69,7 +69,7 @@ # endif // _SC_PAGE_SIZE #else # include // for everything (ugh) -#endif // _WIN{32,64} +#endif // _WIN32 #include @@ -104,7 +104,7 @@ // of the three, in addition to 0 (PROT_NONE) _RWSTD_UNUSED (attr); -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 const int errno_save = errno; @@ -232,7 +232,7 @@ return _RWSTD_STATIC_CAST (_RWSTD_SSIZE_T, nbytes); -#else // if defined (_WIN{32,64}) +#else // ifdef _WIN32 LPVOID const ptr = _RWSTD_CONST_CAST (LPVOID, addr); Modified: stdcxx/trunk/src/num_get.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/num_get.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/src/num_get.cpp (original) +++ stdcxx/trunk/src/num_get.cpp Tue Jun 24 02:37:33 2008 @@ -72,11 +72,11 @@ #endif // NO_STRTOLD && !NO_STRTOLD_IN_LIBC -#ifdef _MSC_VER +#ifdef _RWSTD_MSVC // shut up useless MSVC warning: unary minus operator // applied to unsigned type, result still unsigned # pragma warning (disable: 4146) -#endif // _MSC_VER +#endif // _RWSTD_MSVC _RWSTD_NAMESPACE (__rw) { Modified: stdcxx/trunk/src/num_put.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/num_put.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/src/num_put.cpp (original) +++ stdcxx/trunk/src/num_put.cpp Tue Jun 24 02:37:33 2008 @@ -622,7 +622,7 @@ __rw_fix_flt (char *&end, _RWSTD_SIZE_T &len, unsigned flags, _RWSTD_STREAMSIZE prec) { -#if defined (_WIN32) || defined (_WIN64) +#ifdef _WIN32 char* beg = end - len; @@ -772,7 +772,7 @@ if (sgn) ++len; -#endif // _WIN{32,64} +#endif // _WIN32 } @@ -806,7 +806,13 @@ case __rw_facet::_C_short: case __rw_facet::_C_int: case __rw_facet::_C_long: +#if defined (__INTEL_COMPILER) && defined (_WIN64) +# pragma warning (disable: 810) +#endif len = __rw_itoa (buf, _RWSTD_REINTERPRET_CAST (long, pval), flags); +#if defined (__INTEL_COMPILER) && defined (_WIN64) +# pragma warning (default: 810) +#endif break; case __rw_facet::_C_ushort: @@ -817,8 +823,14 @@ // sign is only used in signed conversions; 7.19 6.1, p6 // of C99: The result of a signed conversion always begins // with a plus or minus sign.) +#if defined (__INTEL_COMPILER) && defined (_WIN64) +# pragma warning (disable: 810) +#endif len = __rw_itoa (buf, _RWSTD_REINTERPRET_CAST (unsigned long, pval), flags & ~_RWSTD_IOS_SHOWPOS); +#if defined (__INTEL_COMPILER) && defined (_WIN64) +# pragma warning (default: 810) +#endif break; #ifdef _RWSTD_LONG_LONG Modified: stdcxx/trunk/src/once.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/once.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/src/once.cpp (original) +++ stdcxx/trunk/src/once.cpp Tue Jun 24 02:37:33 2008 @@ -111,8 +111,13 @@ // implementation that uses atomic operations +#ifndef _RWSTD_MSVC _RWSTD_EXPORT int __rw_once (__rw_once_t *once, void (*func)()) +#else +_RWSTD_EXPORT int +__rw_once (__rw_once_t *once, void (*func)() throw (...)) throw (...) +#endif { _RWSTD_ASSERT (0 != once && 0 != func); Modified: stdcxx/trunk/src/once.h URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/once.h?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/src/once.h (original) +++ stdcxx/trunk/src/once.h Tue Jun 24 02:37:33 2008 @@ -133,9 +133,28 @@ extern "C" { +#if !defined (_RWSTD_MSVC) || !defined (_RWSTD_REENTRANT) + _RWSTD_EXPORT int __rw_once (__rw_once_t*, void (*)()); +#else // _RWSTD_MSVC && _RWSTD_REENTRANT + +// MSVC by default assumes that functions with C linkage don't +// throw exceptions and issues warning "function assumed not +// to throw an exception but does". Specifying an exception +// specification using the throw(...) extension prevents this +// problem. +// Note: functions with C linkage passed as an argument to +// __rw_once() should also be declared with the appropriate +// exception specification if it throws an exception in order +// to avoid resource leaks due to destructors of objects with +// auto storage duration not being run otherwise. +_RWSTD_EXPORT int +__rw_once (__rw_once_t*, void (*)() throw (...)) throw (...); + +#endif // !_RWSTD_MSVC || !_RWSTD_REENTRANT + } // extern "C" Modified: stdcxx/trunk/src/punct.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/punct.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/src/punct.cpp (original) +++ stdcxx/trunk/src/punct.cpp Tue Jun 24 02:37:33 2008 @@ -49,7 +49,7 @@ #include "punct.h" -#if defined (_MSC_VER) && defined (_WIN64) +#if defined (_RWSTD_MSVC) && defined (_WIN64) // shut up MSVC/Win64 complaints about possible loss of data # pragma warning (disable: 4244) #endif // MSVC/Win64 Modified: stdcxx/trunk/src/ti_filebuf.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/ti_filebuf.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/src/ti_filebuf.cpp (original) +++ stdcxx/trunk/src/ti_filebuf.cpp Tue Jun 24 02:37:33 2008 @@ -37,11 +37,11 @@ #undef _RWSTD_NO_TEMPLATE_DEFINITIONS -#ifdef _MSC_VER +#ifdef _RWSTD_MSVC // shut up the bogus MSVC warning C4661: no suitable definition // provided for explicit template instantiation request # pragma warning (disable: 4661) -#endif // _MSC_VER +#endif // _RWSTD_MSVC // include to define the extended member functions that // take a FILE* argument Modified: stdcxx/trunk/src/ti_stringbuf.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/ti_stringbuf.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/src/ti_stringbuf.cpp (original) +++ stdcxx/trunk/src/ti_stringbuf.cpp Tue Jun 24 02:37:33 2008 @@ -37,10 +37,10 @@ #undef _RWSTD_NO_TEMPLATE_DEFINITIONS -#ifdef _MSC_VER +#ifdef _RWSTD_MSVC // shut up the bogus MSVC warning C4661: no suitable definition // provided for explicit template instantiation request # pragma warning (disable: 4661) -#endif // _MSC_VER +#endif // _RWSTD_MSVC #include Modified: stdcxx/trunk/src/ti_wfilebuf.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/ti_wfilebuf.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/src/ti_wfilebuf.cpp (original) +++ stdcxx/trunk/src/ti_wfilebuf.cpp Tue Jun 24 02:37:33 2008 @@ -37,11 +37,11 @@ #undef _RWSTD_NO_TEMPLATE_DEFINITIONS -#ifdef _MSC_VER +#ifdef _RWSTD_MSVC // shut up the bogus MSVC warning C4661: no suitable definition // provided for explicit template instantiation request # pragma warning (disable: 4661) -#endif // _MSC_VER +#endif // _RWSTD_MSVC // include to define the extended member functions that // take a FILE* argument Modified: stdcxx/trunk/src/ti_wstringbuf.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/ti_wstringbuf.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/src/ti_wstringbuf.cpp (original) +++ stdcxx/trunk/src/ti_wstringbuf.cpp Tue Jun 24 02:37:33 2008 @@ -37,10 +37,10 @@ #undef _RWSTD_NO_TEMPLATE_DEFINITIONS -#ifdef _MSC_VER +#ifdef _RWSTD_MSVC // shut up the bogus MSVC warning C4661: no suitable definition // provided for explicit template instantiation request # pragma warning (disable: 4661) -#endif // _MSC_VER +#endif // _RWSTD_MSVC #include Modified: stdcxx/trunk/src/time_put.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/src/time_put.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/src/time_put.cpp (original) +++ stdcxx/trunk/src/time_put.cpp Tue Jun 24 02:37:33 2008 @@ -65,7 +65,7 @@ # include // for nl_langinfo() # endif #else // if defined (_MSC_VER) -# ifdef _WIN64 +# if defined (_RWSTD_MSVC) && defined (_WIN64) // shut up MSVC/Win64 complaints about possible loss of data # pragma warning (disable: 4244) # endif @@ -2815,7 +2815,7 @@ const wchar_t *fmtstr = 'z' == fmt ? L"%+*.*d" : L"%*.*d"; res = swprintf (wbuf, -#if !defined (_MSC_VER) || 1400 <= _MSC_VER +#if !defined (__MINGW32__) && (!defined (_MSC_VER) || 1400 <= _MSC_VER) // MSVC 8.0 changed swprintf() to conform // to the C standard signature bufsize, Modified: stdcxx/trunk/tests/include/testdefs.h URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/include/testdefs.h?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/include/testdefs.h (original) +++ stdcxx/trunk/tests/include/testdefs.h Tue Jun 24 02:37:33 2008 @@ -43,8 +43,7 @@ #endif // _RWSTD_TEST_SRC -#if (defined (_WIN32) || defined (_WIN64)) \ - && (defined (RWDLL) || defined (_RWSHARED)) +#if defined (_MSC_VER) && (defined (RWDLL) || defined (_RWSHARED)) # ifndef _RWSTD_TEST_SRC // using a shared lib, import names # define _TEST_EXPORT __declspec (dllimport) Modified: stdcxx/trunk/tests/intro/17.names.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/intro/17.names.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/intro/17.names.cpp (original) +++ stdcxx/trunk/tests/intro/17.names.cpp Tue Jun 24 02:37:33 2008 @@ -77,7 +77,7 @@ // include system headers included by the library #include -#if defined (_WIN32) || defined (_WIN64) +#ifdef _WIN32 # include #else # include Modified: stdcxx/trunk/tests/iostream/27.filebuf.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/iostream/27.filebuf.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/iostream/27.filebuf.cpp (original) +++ stdcxx/trunk/tests/iostream/27.filebuf.cpp Tue Jun 24 02:37:33 2008 @@ -34,7 +34,7 @@ #include -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 # ifdef __SUNPRO_CC // working around a SunOS/SunPro bug (PR #26255) @@ -50,7 +50,7 @@ #else # include // for O_XXX constants # include // for open() -#endif // _WIN{32,64} +#endif // _WIN32 #ifndef SIGPIPE # define SIGPIPE 13 /* HP-UX, Linux, and SunOS value */ @@ -927,7 +927,7 @@ } -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 ////////////////////////////////////////////////////////////////// // exercise open (..., ios::ate) @@ -1049,7 +1049,7 @@ REMOVE_FILE (tmpfname); } -#endif // _WIN{32,64} +#endif // _WIN32 } Modified: stdcxx/trunk/tests/iostream/27.ios.members.static.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/iostream/27.ios.members.static.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/iostream/27.ios.members.static.cpp (original) +++ stdcxx/trunk/tests/iostream/27.ios.members.static.cpp Tue Jun 24 02:37:33 2008 @@ -43,7 +43,7 @@ #include #include -#if !defined _WIN32 && !defined _WIN64 +#ifndef _WIN32 # include # include @@ -52,7 +52,7 @@ # define DEV_TTY "/dev/tty" -#else // if defined _WIN32 || defined _WIN64 +#else // ifdef _WIN32 # include # include @@ -65,7 +65,7 @@ # define DEV_TTY "CON:" -#endif // _WIN{32,64} +#endif // _WIN32 // use buffers larger than L_tmpnam with rw_tmpnam() @@ -405,7 +405,7 @@ return 1; } -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 // create three child process and have each redirect // its stdout, stderr, and both, respectively, to @@ -443,7 +443,7 @@ } } -#endif // _WIN{32,64} +#endif // _WIN32 do_test (); Modified: stdcxx/trunk/tests/iostream/27.objects.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/iostream/27.objects.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/iostream/27.objects.cpp (original) +++ stdcxx/trunk/tests/iostream/27.objects.cpp Tue Jun 24 02:37:33 2008 @@ -61,7 +61,7 @@ } lifetime_check; -#if defined (_WIN32) | defined (_WIN64) +#ifdef _WIN32 // bring in as a compilation test to exercise // any potential collisions with our declarations # include Modified: stdcxx/trunk/tests/localization/22.locale.codecvt.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.codecvt.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/localization/22.locale.codecvt.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.codecvt.cpp Tue Jun 24 02:37:33 2008 @@ -46,7 +46,7 @@ #include #include -#ifndef _MSC_VER +#ifndef _WIN32 # include // for iconv(), iconv_open(), iconv_close() # include // for CODESET, nl_langinfo() # include @@ -847,7 +847,7 @@ /****************************************************************************/ -#if !defined _MSC_VER +#if !defined _WIN32 static unsigned int endian_test = 1; static bool big_endian = *(unsigned char*)&endian_test == 0; @@ -908,7 +908,7 @@ out_sz = (tmp + 1 - out_sz) / sizeof (wchar_t); } -#endif // defined _MSC_VER +#endif // defined _WIN32 enum InternalEncoding { @@ -936,12 +936,12 @@ switch (conv) { -#ifdef _MSC_VER +#ifdef _WIN32 case use_UCS2: // fall through... -#endif // _MSC_VER +#endif // _WIN32 case use_libc: { @@ -952,7 +952,7 @@ break; } -#ifndef _MSC_VER +#ifndef _WIN32 case use_UCS2: case use_UCS4: { @@ -977,7 +977,7 @@ break; } -#endif // _MSC_VER +#endif // _WIN32 } @@ -2462,10 +2462,10 @@ { "fr_FR", "ISO-8859-1", "fr_FR.ISO-8859-1", 3920, 3920, 1, 1 }, // multi-byte encodings (variable width, and max_length > 1) { "ja_JP", "Shift_JIS" , "ja_JP.Shift_JIS", 25115, 13001, 0, 2 }, -#if !defined _MSC_VER +#if !defined _WIN32 { "ja_JP", "EUC-JP" , "ja_JP.EUC-JP", 20801, 14299, 0, 3 }, { "ja_JP", "UTF-8" , "ja_JP.UTF-8", 25056, 12000, 0, 6 }, -#endif // !defined _MSC_VER +#endif // !defined _WIN32 // terminate the array { 0, 0, 0, 0, 0, 0, 0 } @@ -2608,3 +2608,4 @@ run_test, "", 0); } + Modified: stdcxx/trunk/tests/localization/22.locale.ctype.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.ctype.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/localization/22.locale.ctype.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.ctype.cpp Tue Jun 24 02:37:33 2008 @@ -58,12 +58,12 @@ #include // for iswxxx() -#if !defined (_MSC_VER) +#if !defined (_WIN32) # if !defined (LC_MESSAGES) # define LC_MESSAGES _RWSTD_LC_MESSAGES # endif // LC_MESSAGES # include -#endif // _MSC_VER +#endif // _WIN32 #include #include // for SLASH @@ -1111,7 +1111,7 @@ "{ %s}, got { %s}", uch, locname, is_C, is_CXX2); -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 // exercise POSIX requirements only on POSIX platforms Modified: stdcxx/trunk/tests/localization/22.locale.ctype.is.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.ctype.is.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/localization/22.locale.ctype.is.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.ctype.is.cpp Tue Jun 24 02:37:33 2008 @@ -58,12 +58,12 @@ #include // for iswxxx() -#if !defined (_MSC_VER) +#if !defined (_WIN32) # if !defined (LC_MESSAGES) # define LC_MESSAGES _RWSTD_LC_MESSAGES # endif // LC_MESSAGES # include -#endif // _MSC_VER +#endif // _WIN32 #include #include // for SLASH @@ -593,7 +593,7 @@ "{ %s}, got { %s}", uch, locname, is_C, is_CXX2); -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 // exercise POSIX requirements only on POSIX platforms Modified: stdcxx/trunk/tests/localization/22.locale.ctype.narrow.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.ctype.narrow.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/localization/22.locale.ctype.narrow.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.ctype.narrow.cpp Tue Jun 24 02:37:33 2008 @@ -59,12 +59,12 @@ #include // for iswxxx() -#if !defined (_MSC_VER) +#if !defined (_WIN32) # if !defined (LC_MESSAGES) # define LC_MESSAGES _RWSTD_LC_MESSAGES # endif // LC_MESSAGES # include -#endif // _MSC_VER +#endif // _WIN32 #include #include // for SLASH Modified: stdcxx/trunk/tests/localization/22.locale.ctype.scan.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.ctype.scan.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/localization/22.locale.ctype.scan.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.ctype.scan.cpp Tue Jun 24 02:37:33 2008 @@ -58,12 +58,12 @@ #include // for iswxxx() -#if !defined (_MSC_VER) +#if !defined (_WIN32) # if !defined (LC_MESSAGES) # define LC_MESSAGES _RWSTD_LC_MESSAGES # endif // LC_MESSAGES # include -#endif // _MSC_VER +#endif // _WIN32 #include #include // for SLASH Modified: stdcxx/trunk/tests/localization/22.locale.ctype.tolower.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.ctype.tolower.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/localization/22.locale.ctype.tolower.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.ctype.tolower.cpp Tue Jun 24 02:37:33 2008 @@ -58,12 +58,12 @@ #include // for iswxxx() -#if !defined (_MSC_VER) +#if !defined (_WIN32) # if !defined (LC_MESSAGES) # define LC_MESSAGES _RWSTD_LC_MESSAGES # endif // LC_MESSAGES # include -#endif // _MSC_VER +#endif // _WIN32 #include #include // for SLASH Modified: stdcxx/trunk/tests/localization/22.locale.ctype.toupper.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.ctype.toupper.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/localization/22.locale.ctype.toupper.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.ctype.toupper.cpp Tue Jun 24 02:37:33 2008 @@ -58,12 +58,12 @@ #include // for iswxxx() -#if !defined (_MSC_VER) +#if !defined (_WIN32) # if !defined (LC_MESSAGES) # define LC_MESSAGES _RWSTD_LC_MESSAGES # endif // LC_MESSAGES # include -#endif // _MSC_VER +#endif // _WIN32 #include #include // for SLASH Modified: stdcxx/trunk/tests/localization/22.locale.messages.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.messages.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/localization/22.locale.messages.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.messages.cpp Tue Jun 24 02:37:33 2008 @@ -42,7 +42,7 @@ #include // for mbsinit() #ifndef _RWSTD_NO_NEW_HEADER -# if defined (_MSC_VER) +# if defined (_WIN32) # include // for _open() # include // for getcwd() # else @@ -570,13 +570,13 @@ #endif // _RWSTD_NO_EXCEPTIONS // Bad set id -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 // When we use resource files for the message catalogs // the set ids are ignored. rw_assert (msgs.get (cat, 777, 1, def) == def, 0, __LINE__, "messages<%s>::get(%d, 777, 1, %{#*Ac}) == %{#*Ac}", cname, cat, int (sizeof *def), def, int (sizeof *def), def); -#endif // !defined (_WIN32) && !defined (_WIN64) +#endif // _WIN32 // Bad message id rw_assert (msgs.get (cat, 1, 777, def) == def, 0, __LINE__, Modified: stdcxx/trunk/tests/localization/22.locale.num.put.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/localization/22.locale.num.put.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/localization/22.locale.num.put.cpp (original) +++ stdcxx/trunk/tests/localization/22.locale.num.put.cpp Tue Jun 24 02:37:33 2008 @@ -358,7 +358,7 @@ std::sprintf (cbuf, str, val); str = cbuf; -#if defined (_WIN32) || defined (_WIN64) +#ifdef _WIN32 std::size_t len = std::strlen (str); @@ -370,7 +370,7 @@ cbuf [len - 1] = cbuf [len]; } -#endif // _WIN{32,64} +#endif // _WIN32 } // compare output produced by num_put with that produced by printf() Modified: stdcxx/trunk/tests/regress/18.limits.stdcxx-436.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/regress/18.limits.stdcxx-436.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/regress/18.limits.stdcxx-436.cpp (original) +++ stdcxx/trunk/tests/regress/18.limits.stdcxx-436.cpp Tue Jun 24 02:37:33 2008 @@ -32,10 +32,10 @@ #undef __PURE_CNAME #include // for popen(), fscanf(), pclose(), ... -#if defined(_WIN32) || defined(_WIN64) +#ifdef _WIN32 # define popen _popen # define pclose _pclose -#endif // defined(_WIN32) || defined(_WIN64) +#endif // _WIN32 int main () { Modified: stdcxx/trunk/tests/src/alarm.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/src/alarm.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/src/alarm.cpp (original) +++ stdcxx/trunk/tests/src/alarm.cpp Tue Jun 24 02:37:33 2008 @@ -61,7 +61,7 @@ _rw_alarm_handler; -#if defined (_WIN32) || defined (_WIN64) +#ifdef _WIN32 #include @@ -121,7 +121,7 @@ } -#else // if !defined (_WIN{32,64} +#else // ifndef _WIN32 # include // for SIGALRM, signal() # include // for alarm(), write() @@ -225,4 +225,4 @@ } -#endif // _WIN{32,64} +#endif // _WIN32 Modified: stdcxx/trunk/tests/src/alloc.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/src/alloc.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/src/alloc.cpp (original) +++ stdcxx/trunk/tests/src/alloc.cpp Tue Jun 24 02:37:33 2008 @@ -39,7 +39,7 @@ # define _WIN32 #endif -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 # ifdef __SUNPRO_CC // working around SunOS bug #568 # include @@ -64,7 +64,7 @@ // still declare the functions to take char* (aliased as caddr_t) typedef _RWSTD_MUNMAP_ARG1_T CaddrT; -#else // defined (_WIN32) || defined (_WIN64) +#else // ifdef _WIN32 # include // for everything (ugh) # include // for off_t @@ -160,7 +160,7 @@ return -1; } -#endif // _WIN{32,64} +#endif // _WIN32 #ifndef MAP_PRIVATE # define MAP_PRIVATE 0 Modified: stdcxx/trunk/tests/src/driver.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/src/driver.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/src/driver.cpp (original) +++ stdcxx/trunk/tests/src/driver.cpp Tue Jun 24 02:37:33 2008 @@ -53,7 +53,7 @@ # include // for _CrtSetReportMode(), _CrtSetDbgFlag() #endif // _MSC_VER -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 # include // for isatty() # include // for setlimit() @@ -75,7 +75,7 @@ #else // if Windows // no isatty on Windoze # define _RWSTD_NO_ISATTY -#endif // _WIN{32,64} +#endif // _WIN32 // expand _TEST_EXPORT macros #define _RWSTD_TEST_SRC Modified: stdcxx/trunk/tests/src/file.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/src/file.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/src/file.cpp (original) +++ stdcxx/trunk/tests/src/file.cpp Tue Jun 24 02:37:33 2008 @@ -45,7 +45,7 @@ #include #include -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 # include // for CODESET # include // for close(), open() #else @@ -167,12 +167,12 @@ } else { -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 const char* const codeset = nl_langinfo (CODESET); #else // FIXME: determine the current code page const char* const codeset = "UTF-8"; -#endif // _WIN{32,64} +#endif // _WIN32 fprintf (fp, " \"%s\"\n", codeset); fprintf (fp, " 1\n"); @@ -248,7 +248,7 @@ # undef TMP_TEMPLATE #else // if defined (_RWSTD_NO_MKSTEMP) -# if defined (_WIN32) || defined (_WIN64) +# ifdef _WIN32 // create a temporary file name char* fname = tempnam (P_tmpdir, ".rwtest-tmp"); @@ -294,7 +294,7 @@ fprintf (stderr, "%s:%d: tmpnam(\"%s\") failed: %s\n", __FILE__, __LINE__, buf, strerror (errno)); -# endif // _WIN{32,64} +# endif // _WIN32 #endif // _RWSTD_NO_MKSTEMP return fname; @@ -304,7 +304,7 @@ _TEST_EXPORT size_t rw_fsize (const char *fname) { -#if defined (_WIN32) || defined (_WIN64) +#ifdef _WIN32 // note: both method of obtaining the size of a file // just written by a process may fail (i.e., the size @@ -342,7 +342,7 @@ # endif // 0/1 -#else // if !defined (_WIN{32,64}) +#else // ifndef _WIN32 struct stat sb; @@ -351,7 +351,7 @@ return sb.st_size; -#endif // _WIN{32,64} +#endif // _WIN32 } @@ -481,7 +481,7 @@ *count = 0; -#if defined (_WIN32) || defined (_WIN64) +#ifdef _WIN32 # ifdef _MSC_VER // save the report mode and disable "Invalid file descriptor" @@ -510,7 +510,7 @@ ++*count; } -#endif // WIN{32,64} +#endif // _WIN32 } Modified: stdcxx/trunk/tests/src/locale.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/src/locale.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/src/locale.cpp (original) +++ stdcxx/trunk/tests/src/locale.cpp Tue Jun 24 02:37:33 2008 @@ -54,12 +54,14 @@ #include #include // for stat -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 # include # include // for WIFEXITED(), WIFSIGNALED(), WTERMSIG() #else # include -# include // for _malloc_dbg() +# ifdef _MSC_VER +# include // for _malloc_dbg() +# endif #endif #include // for ios::* @@ -76,16 +78,16 @@ #include #include // for wcslen, ... -#ifndef _MSC_VER +#ifndef _WIN32 # include # ifndef LC_MESSAGES # define LC_MESSAGES _RWSTD_LC_MESSAGES # endif // LC_MESSAGES # define EXE_SUFFIX "" -#else // if MSVC +#else // if Windows # define _RWSTD_NO_LANGINFO # define EXE_SUFFIX ".exe" -#endif // _MSC_VER +#endif // _WIN32 #ifndef _RWSTD_NO_LANGINFO # include @@ -339,13 +341,13 @@ // remove temporary file if mkstemp() rw_tmpnam() called mkstemp() if (rw_system (SHELL_RM_RF " %s", locale_root)) { -#if defined (_WIN32) || defined (_WIN64) +#ifdef _WIN32 // ignore errors on WIN32 where the stupid DEL command // fails even with /Q /S when the files don't exist #else // assume a sane implementation of SHELL_RM_RF return 0; -#endif // _WIN{32,64} +#endif // _WIN32 } if (rw_system ("mkdir %s", locale_root)) @@ -1677,5 +1679,3 @@ return true; } - - Modified: stdcxx/trunk/tests/src/thread.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/src/thread.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/src/thread.cpp (original) +++ stdcxx/trunk/tests/src/thread.cpp Tue Jun 24 02:37:33 2008 @@ -264,6 +264,9 @@ /**************************************************************************/ #elif defined (_WIN32) && defined (_MT) +# ifdef __MINGW32__ +# include // for uintptr_t +# endif # include // for _beginthreadex() _TEST_EXPORT int @@ -356,7 +359,7 @@ # define ENOTSUP 99 # elif defined (_RWSTD_OS_SUNOS) # define ENOTSUP 48 -# elif defined (_WIN32) || defined (_WIN64) +# elif defined (_WIN32) # define ENOTSUP ENOSYS # else # define ENOTSUP 9999 Modified: stdcxx/trunk/tests/utilities/20.auto.ptr.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/tests/utilities/20.auto.ptr.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/tests/utilities/20.auto.ptr.cpp (original) +++ stdcxx/trunk/tests/utilities/20.auto.ptr.cpp Tue Jun 24 02:37:33 2008 @@ -208,7 +208,7 @@ // and a conversion operator (see PR #24476) # if !defined (__SUNPRO_CC) || __SUNPRO_CC > 0x540 -# if !defined (_MSC_VER) || _MSC_VER > 1310 || defined (__INTEL_COMPILER) +# if !defined (_RWSTD_MSVC) || _RWSTD_MSVC > 1310 FUN (std::auto_ptr_ref, Derived, operator std::auto_ptr_ref, () _PTR_THROWS (())); Modified: stdcxx/trunk/util/aliases.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/aliases.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/util/aliases.cpp (original) +++ stdcxx/trunk/util/aliases.cpp Tue Jun 24 02:37:33 2008 @@ -55,11 +55,11 @@ #include -#ifndef _MSC_VER +#ifndef _WIN32 # ifndef _RWSTD_NO_NL_LANGINFO # include # endif -#endif // _MSC_VER +#endif // _WIN32 #include "aliases.h" @@ -292,7 +292,7 @@ { 0, { 0 } } }; -#ifdef _MSC_VER +#ifdef _WIN32 struct codepage_t { @@ -322,10 +322,10 @@ { 0, 0 } }; -#endif // _MSC_VER +#endif // _WIN32 /****************************************************************************/ -#ifdef _MSC_VER +#ifdef _WIN32 unsigned int get_codepage (const std::string& cname) { @@ -336,7 +336,7 @@ return 0; } -#endif // _MSC_VER +#endif // _WIN32 /*****************************************************************************/ @@ -414,7 +414,7 @@ aliases.push_back (name); } -#ifndef _MSC_VER +#ifndef _WIN32 void get_lname_aliases (const std::string& name, StringVector& aliases) @@ -673,4 +673,4 @@ return slocname; } -#endif // _MSC_VER +#endif // _WIN32 Modified: stdcxx/trunk/util/charmap.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/charmap.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/util/charmap.cpp (original) +++ stdcxx/trunk/util/charmap.cpp Tue Jun 24 02:37:33 2008 @@ -31,14 +31,14 @@ // On Compaq Tru64 UNIX if included after assert.h, the definition of // _XOPEN_SOURCE macro in assert.h selects a different declaration for // iconv than the one used in comp test. -#ifndef _MSC_VER +#ifndef _WIN32 # ifndef _RWSTD_NO_ICONV # include # endif # include _RWSTD_CERRNO #else # include -#endif // _MSC_VER +#endif // _WIN32 #include #include @@ -664,7 +664,7 @@ bool Charmap::convert_to_ucs (const std::string &sym_name, const std::string &encoding, wchar_t& wc) { -#ifndef _MSC_VER +#ifndef _WIN32 if (in_utf8_) { wc = utf8_decode (encoding.c_str (), &*(encoding.end () - 1)); @@ -709,7 +709,7 @@ wc = convert_sym_to_ucs (sym_name); return true; -#endif // _MSC_VER +#endif // _WIN32 } @@ -1045,7 +1045,7 @@ #else // if defined (_RWSTD_NO_ICONV) -# ifdef _MSC_VER +# ifdef _WIN32 codepage_ = get_codepage (code_set_name_); if (codepage_ == 0) { issue_diag (W_ICONV, false, 0, @@ -1053,7 +1053,7 @@ code_set_name_.c_str()); } -# endif // _MSC_VER +# endif // _WIN32 #endif // _RWSTD_NO_ICONV scanner_.ignore_line (); Modified: stdcxx/trunk/util/charmap.h URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/charmap.h?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/util/charmap.h (original) +++ stdcxx/trunk/util/charmap.h Tue Jun 24 02:37:33 2008 @@ -195,9 +195,9 @@ // the name of the codeset std::string code_set_name_; -#if defined (_MSC_VER) +#if defined (_WIN32) int codepage_; -#endif // _MSC_VER +#endif // _WIN32 // n_cmap maps the symbolic name to a narrow character value // rn_cmap does the opposite @@ -262,3 +262,4 @@ #endif // _RWSTD_CHARMAP_H_INCLUDED + Modified: stdcxx/trunk/util/cmdopt.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/cmdopt.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/util/cmdopt.cpp (original) +++ stdcxx/trunk/util/cmdopt.cpp Tue Jun 24 02:37:33 2008 @@ -35,7 +35,7 @@ #include /* for *printf, fputs */ #include /* for exit */ #include /* for str* */ -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 # include /* for sleep */ # if defined (_XOPEN_UNIX) @@ -44,7 +44,7 @@ #else # include /* for Sleep */ -#endif /* _WIN{32,64} */ +#endif /* _WIN32 */ #include "exec.h" #include "target.h" Modified: stdcxx/trunk/util/ctype.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/ctype.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/util/ctype.cpp (original) +++ stdcxx/trunk/util/ctype.cpp Tue Jun 24 02:37:33 2008 @@ -690,7 +690,7 @@ if (next.token != Scanner::tok_string) issue_diag (E_SYNTAX, true, &next, "expected string following \"copy\" directive\n"); -#ifndef _MSC_VER +#ifndef _WIN32 ctype_symlink_ = true; @@ -712,7 +712,7 @@ continue; } -#endif // _MSC_VER +#endif // _WIN32 // bump up the nesting level nesting_level++; @@ -891,7 +891,7 @@ } -#ifndef _MSC_VER +#ifndef _WIN32 if (ctype_symlink_) { @@ -909,6 +909,6 @@ return; } -#endif // _MSC_VER +#endif // _WIN32 } Modified: stdcxx/trunk/util/exec.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/exec.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/util/exec.cpp (original) +++ stdcxx/trunk/util/exec.cpp Tue Jun 24 02:37:33 2008 @@ -37,7 +37,7 @@ #include #include /* for str*, mem* */ -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 # include /* for close, dup, exec, fork */ # include # include /* for times - is this XSI? */ @@ -419,7 +419,7 @@ return def; } -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 /** Callback used to set the alarm_timeout flag in response to recieving the signal SIGALRM @@ -891,7 +891,7 @@ warn ("Failed to retrieve start times: %s", strerror (errno)); } } -#else /* _WIN{32,64} */ +#else /* _WIN32 */ // map between NT_STATUS value and corresponding UNIX signal static const struct { @@ -1236,4 +1236,4 @@ } } -#endif /* _WIN{32,64} */ +#endif /* _WIN32 */ Modified: stdcxx/trunk/util/iconv.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/iconv.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/util/iconv.cpp (original) +++ stdcxx/trunk/util/iconv.cpp Tue Jun 24 02:37:33 2008 @@ -26,7 +26,7 @@ * **************************************************************************/ -#if defined (_WIN32) || defined (_WIN64) +#ifdef _WIN32 #include #include @@ -348,4 +348,4 @@ return 0; } -#endif // _WIN{32,64} +#endif // _WIN32 Modified: stdcxx/trunk/util/locale.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/locale.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/util/locale.cpp (original) +++ stdcxx/trunk/util/locale.cpp Tue Jun 24 02:37:33 2008 @@ -50,7 +50,7 @@ # define LS_1 "dir /B /A:D " #endif -#ifndef _MSC_VER +#ifndef _WIN32 # include // for mmap() # include // for close () # ifndef _RWSTD_NO_ICONV @@ -62,7 +62,7 @@ #else # include // for open() # include -#endif // _MSC_VER +#endif // _WIN32 #include // for INT_MAX, INT_MIN #include @@ -256,7 +256,7 @@ // map the file to a pointer and if it succeeds // return the pointer, otherwise return 0 -#ifndef _MSC_VER +#ifndef _WIN32 void* const ret = mmap (0, st.st_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); if (MAP_FAILED == ret) @@ -274,7 +274,7 @@ void* const ret = MapViewOfFile (mapping, FILE_MAP_READ, 0, 0, st.st_size); -#endif // _MSC_VER +#endif // _WIN32 return ret; } @@ -442,7 +442,7 @@ static const char* set_locale (int lc_cat, const char *locname, const std::string &charmap_name) { -#ifndef _MSC_VER +#ifndef _WIN32 assert (0 != locname); @@ -476,7 +476,7 @@ } } -#endif // _MSC_VER +#endif // _WIN32 return 0; } @@ -593,7 +593,7 @@ // search for a C library locale that uses the same encoding std::string std_encoding (charmap); -# if !defined(_MSC_VER) +# if !defined (_WIN32) std::string C_locale (get_C_encoding_locale (std_encoding)); # else std::string C_locale (""); Modified: stdcxx/trunk/util/localedef.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/localedef.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/util/localedef.cpp (original) +++ stdcxx/trunk/util/localedef.cpp Tue Jun 24 02:37:33 2008 @@ -140,9 +140,9 @@ // the vector of corresponding C locales StringVector C_locales; -#ifndef _MSC_VER +#ifndef _WIN32 get_same_encoding_C_locale (lname, cname, C_locales); -#endif // _MSC_VER +#endif // _WIN32 // C library locale using same encoding std::string enc_C_locale; @@ -256,18 +256,18 @@ issue_diag (I_STAGE, false, 0, "generating LC_COLLATE database\n"); def.write_collate (locale_dir); -#ifndef _MSC_VER +#ifndef _WIN32 issue_diag (I_STAGE, false, 0, "generating LC_MESSAGES database\n"); def.write_messages (locale_dir); -#endif // _MSC_VER +#endif // _WIN32 // no C library locales equivalents if (C_locales.empty ()) return; -#if !defined (_MSC_VER) +#if !defined (_WIN32) if (link_aliases == false) return; @@ -283,7 +283,7 @@ // pointing to our locale database create_symlink (outdir, std_locale, *it); } -#endif // _MSC_VER +#endif // _WIN32 } Modified: stdcxx/trunk/util/memchk.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/memchk.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/util/memchk.cpp (original) +++ stdcxx/trunk/util/memchk.cpp Tue Jun 24 02:37:33 2008 @@ -26,14 +26,14 @@ * **************************************************************************/ -#ifndef _MSC_VER +#ifndef _WIN32 # include // for open() # include // for getpagesize(), write() -#else // if MSVC +#else // if Windows # include // for POSIX compatibility APIs # include // ditto # include // for all of Win32 junk -#endif // MSVC +#endif // _WIN32 #include // for errno, EINTR #include // for size_t @@ -85,7 +85,7 @@ if (0 == size) { -#if defined (_WIN32) || defined (_WIN64) +#ifdef _WIN32 SYSTEM_INFO info; @@ -97,7 +97,7 @@ size = getpagesize (); -#endif // WIN{32,64} +#endif // _WIN32 } @@ -116,7 +116,7 @@ // operation away (as SunOS does, for instance) // fd = open ("/dev/null", O_WRONLY); -#if defined (_WIN32) || defined (_WIN64) +#ifdef _WIN32 char* const fname = tempnam (P_tmpdir, ".rwmemchk.tmp"); @@ -135,7 +135,7 @@ return size_t (-1); } -#else // !_WIN{32,64} +#else // !_WIN32 # define TMP_TEMPLATE P_tmpdir "/rwmemchk-XXXXXX" @@ -150,7 +150,7 @@ unlink (fname_buf); -#endif // _WIN{32,64} +#endif // _WIN32 } Modified: stdcxx/trunk/util/path.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/path.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/util/path.cpp (original) +++ stdcxx/trunk/util/path.cpp Tue Jun 24 02:37:33 2008 @@ -26,7 +26,7 @@ * **************************************************************************/ -#ifndef _MSC_VER +#ifndef _WIN32 # ifdef __linux__ // for symlink() # ifndef _XOPEN_SOURCE @@ -45,7 +45,7 @@ # include // for _getcwd() # include # include // for struct stat, stat() -#endif // _MSC_VER +#endif // _WIN32 #include "path.h" @@ -69,7 +69,7 @@ } -#ifndef _MSC_VER +#ifndef _WIN32 void create_symlink (const std::string &dir, @@ -112,7 +112,7 @@ } } -#endif // _MSC_VER +#endif // _WIN32 inline int @@ -130,7 +130,7 @@ const std::string &other /* = std::string () */) { // use absolute path as given by fname -#if !defined (_MSC_VER) +#if !defined (_WIN32) if (fname.size () && _RWSTD_PATH_SEP == fname [0]) #else if (fname.size () && @@ -144,7 +144,7 @@ other.substr (0,other.rfind (_RWSTD_PATH_SEP) + 1)); // OR use the path given through "other", be it relative or absolute -#if !defined (_MSC_VER) +#if !defined (_WIN32) if (other.size () && _RWSTD_PATH_SEP == other [0]) { #else if (other.size () && @@ -235,7 +235,7 @@ int makedir (const char *name) { -#if defined (_WIN32) || defined (_WIN64) +#ifdef _WIN32 if ( 0 == CreateDirectory (name, NULL) && GetLastError () != ERROR_ALREADY_EXISTS) { @@ -257,7 +257,7 @@ return -1; } -#else // if !defined (_WIN{32,64}) +#else // ifndef _WIN32 if (-1 == mkdir (name, 0755)) { @@ -274,7 +274,7 @@ } -#endif // _WIN{32,64} +#endif // _WIN32 return 0; } Modified: stdcxx/trunk/util/runall.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/runall.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/util/runall.cpp (original) +++ stdcxx/trunk/util/runall.cpp Tue Jun 24 02:37:33 2008 @@ -34,7 +34,7 @@ #include /* for PATH_MAX */ #include #include -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 # include /* for WIFEXITED(), ... */ #endif @@ -397,11 +397,11 @@ assert (0 != path); for (mark = pos = path; '\0' != *pos; ++pos) -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 mark = (default_path_sep == *pos) ? pos + 1 : mark; #else mark = (default_path_sep == *pos || '/' == *pos) ? pos + 1 : mark; -#endif /* _WIN{32,64} */ +#endif /* _WIN32 */ return mark; } Modified: stdcxx/trunk/util/scanner.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/scanner.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/util/scanner.cpp (original) +++ stdcxx/trunk/util/scanner.cpp Tue Jun 24 02:37:33 2008 @@ -74,7 +74,7 @@ for (; it != s.end (); it++) if (*it == '/' || *it == '\\') { -#if defined (_MSC_VER) +#if defined (_WIN32) *it = '\\'; #else *it = '/'; Modified: stdcxx/trunk/util/target.h URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/target.h?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/util/target.h (original) +++ stdcxx/trunk/util/target.h Tue Jun 24 02:37:33 2008 @@ -29,7 +29,7 @@ #include /* for clock_t */ -#if !defined (_WIN32) && !defined (_WIN64) +#ifndef _WIN32 # include /* For _XOPEN_UNIX */ #endif Modified: stdcxx/trunk/util/util.cpp URL: http://svn.apache.org/viewvc/stdcxx/trunk/util/util.cpp?rev=671102&r1=671101&r2=671102&view=diff ============================================================================== --- stdcxx/trunk/util/util.cpp (original) +++ stdcxx/trunk/util/util.cpp Tue Jun 24 02:37:33 2008 @@ -39,7 +39,7 @@ # include /* for sleep() */ #else # include /* for Sleep() */ -#endif /* _WIN{32,64} */ +#endif /* _WIN32 */ #include "cmdopt.h" /* for exe_name, target_name */ @@ -297,7 +297,7 @@ # endif /* __cplusplus */ # endif /* _RWSTD_EDG_ECCP */ -#else /* if defined (_WIN32) || defined (_WIN64) */ +#else /* ifdef _WIN32 */ void rw_sleep (int seconds)