Return-Path: Delivered-To: apmail-stdcxx-commits-archive@www.apache.org Received: (qmail 80720 invoked from network); 24 Jan 2008 13:00:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jan 2008 13:00:22 -0000 Received: (qmail 7405 invoked by uid 500); 24 Jan 2008 13:00:12 -0000 Delivered-To: apmail-stdcxx-commits-archive@stdcxx.apache.org Received: (qmail 7384 invoked by uid 500); 24 Jan 2008 13:00:12 -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 7375 invoked by uid 99); 24 Jan 2008 13:00:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jan 2008 05:00:12 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jan 2008 13:00:06 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id BD12F1A9832; Thu, 24 Jan 2008 04:59:57 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r614868 - in /stdcxx/trunk: etc/config/src/ATOMIC_OPS.cpp include/rw/_config-msvcrt.h include/rw/_mutex.h Date: Thu, 24 Jan 2008 12:59:56 -0000 To: commits@stdcxx.apache.org From: faridz@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080124125957.BD12F1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: faridz Date: Thu Jan 24 04:59:49 2008 New Revision: 614868 URL: http://svn.apache.org/viewvc?rev=614868&view=rev Log: 2008-01-24 Farid Zaripov Merged 614864 from branches/4.2.x * etc/config/src/ATOMIC_OPS.cpp: Delete unused configuration test. * include/rw/_config-msvcrt.h: Don't #define _RWSTD_NO_LONG_LONG as __int64 if long long type is supported by compiler and _MSC_VER > 1300. * include/rw/_mutex.h: Use intrinsic interlocked functions on MSVC 7.1 and ICC. Declare the interlocked functions instead of #including . Remove unused declaration of the InterlockedXXX() Win32 API functions. Removed: stdcxx/trunk/etc/config/src/ATOMIC_OPS.cpp Modified: stdcxx/trunk/include/rw/_config-msvcrt.h stdcxx/trunk/include/rw/_mutex.h Modified: stdcxx/trunk/include/rw/_config-msvcrt.h URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/rw/_config-msvcrt.h?rev=614868&r1=614867&r2=614868&view=diff ============================================================================== --- stdcxx/trunk/include/rw/_config-msvcrt.h (original) +++ stdcxx/trunk/include/rw/_config-msvcrt.h Thu Jan 24 04:59:49 2008 @@ -89,7 +89,9 @@ #endif // _RWSTD_NO_STATIC_CONST_MEMBER_DEFINITION // enable iostream and locale support for long long integers -#define _RWSTD_LONG_LONG __int64 +#if _MSC_VER <= 1300 || defined (_RWSTD_NO_LONG_LONG) +# define _RWSTD_LONG_LONG __int64 +#endif // _MSC_VER <= 1300 || _RWSTD_NO_LONG_LONG #if defined (_WIN64) // FIXME: handle by forward declaring fuctions in Modified: stdcxx/trunk/include/rw/_mutex.h URL: http://svn.apache.org/viewvc/stdcxx/trunk/include/rw/_mutex.h?rev=614868&r1=614867&r2=614868&view=diff ============================================================================== --- stdcxx/trunk/include/rw/_mutex.h (original) +++ stdcxx/trunk/include/rw/_mutex.h Thu Jan 24 04:59:49 2008 @@ -141,24 +141,6 @@ __declspec (dllimport) void __stdcall DeleteCriticalSection (_RTL_CRITICAL_SECTION*); - -#if defined _RWSTD_INTERLOCKED_T && (!defined (_MSC_VER) || _MSC_VER < 1400) - -__declspec (dllimport) long __stdcall -InterlockedIncrement (_RWSTD_INTERLOCKED_T*); - -__declspec (dllimport) long __stdcall -InterlockedDecrement (_RWSTD_INTERLOCKED_T*); - -__declspec (dllimport) long __stdcall -InterlockedExchange (_RWSTD_INTERLOCKED_T*, long); - -# define _InterlockedIncrement InterlockedIncrement -# define _InterlockedDecrement InterlockedDecrement -# define _InterlockedExchange InterlockedExchange - -#endif // _RWSTD_INTERLOCKED_T && (!_MSC_VER || _MSC_VER < 1400) - } // extern "C" _RWSTD_NAMESPACE (__rw) { @@ -176,21 +158,35 @@ # endif // _RWSTD_NO_FWD_DECLARATIONS -# if defined (_MSC_VER) && _MSC_VER >= 1400 && !defined (__INTEL_COMPILER) -# include - -# pragma intrinsic (_InterlockedIncrement) -# pragma intrinsic (_InterlockedIncrement16) -# pragma intrinsic (_InterlockedDecrement) -# pragma intrinsic (_InterlockedDecrement16) -# pragma intrinsic (_InterlockedExchange) +# ifdef _MSC_VER +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 +# pragma intrinsic (_InterlockedIncrement) +# pragma intrinsic (_InterlockedDecrement) +# pragma intrinsic (_InterlockedExchange) +# endif // __INTEL_COMPILER + +# if _MSC_VER >= 1400 && !defined (__INTEL_COMPILER) +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 # ifdef _M_X64 -# pragma intrinsic (_InterlockedIncrement64) -# pragma intrinsic (_InterlockedDecrement64) -# pragma intrinsic (_InterlockedExchange64) -# endif -# endif // _MSC_VER >= 1400 && !__INTEL_COMPILER +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 +# pragma intrinsic (_InterlockedIncrement64) +# pragma intrinsic (_InterlockedDecrement64) +# pragma intrinsic (_InterlockedExchange64) +# endif // __INTEL_COMPILER +# endif // _M_X64 +# endif // _MSC_VER _RWSTD_NAMESPACE (__rw) {