stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r585998 - in /incubator/stdcxx/trunk/include/rw: _config.h _strref.h
Date Thu, 18 Oct 2007 15:03:37 GMT
Author: sebor
Date: Thu Oct 18 08:03:36 2007
New Revision: 585998

URL: http://svn.apache.org/viewvc?rev=585998&view=rev
Log:
2007-10-18  Martin Sebor  <sebor@roguewave.com>

	Merged rev 585996 from branches/4.2.0 disabling the fix for STDCXX-162
	for binary compatibility with stdcxx 4.1.x. This will automatically
	revert to the optimal solution once _RWSTD_VER_MAJOR reaches 5 or
	greater.
	* include/rw/_config.h (_RWSTD_NO_STRING_ATOMIC_OPS): New macro #defined
	on x86_64 Linux unless _RWSTD_USE_STRING_ATOMIC_OPS is #defined on the
	command line (or in the generated config.h header).
	* include/rw/_strref.h (_RWSTD_NO_STRING_MUTEX): Guarded by the new
	_RWSTD_NO_STRING_ATOMIC_OPS macro.

Modified:
    incubator/stdcxx/trunk/include/rw/_config.h
    incubator/stdcxx/trunk/include/rw/_strref.h

Modified: incubator/stdcxx/trunk/include/rw/_config.h
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/rw/_config.h?rev=585998&r1=585997&r2=585998&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/rw/_config.h (original)
+++ incubator/stdcxx/trunk/include/rw/_config.h Thu Oct 18 08:03:36 2007
@@ -133,6 +133,24 @@
 #if defined (__sparc__) || defined (__sparc)
 #endif   // SPARC
 
+/*** AMD64/Intel EM64T ****************************************************/
+
+#if    defined (__amd64__) || defined (__amd64) \
+    || defined (__x86_64__) || defined (__x86_64)
+
+#  if _RWSTD_VER_MAJOR < 5
+#    ifdef _RWSTD_OS_LINUX
+       // on Linux/AMD64, unless explicitly requested, disable the use
+       // of atomic operations in string for binary compatibility with
+       // stdcxx 4.1.x
+#      ifndef _RWSTD_USE_STRING_ATOMIC_OPS
+#        define _RWSTD_NO_STRING_ATOMIC_OPS
+#      endif   // _RWSTD_USE_STRING_ATOMIC_OPS
+#    endif   // _WIN32
+#  endif   // stdcxx < 5.0
+
+#endif   // AMD64/EM64T
+
 /**************************************************************************
  * COMPILER-SPECIFIC OVERRIDES                                            * 
  **************************************************************************/

Modified: incubator/stdcxx/trunk/include/rw/_strref.h
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/include/rw/_strref.h?rev=585998&r1=585997&r2=585998&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/rw/_strref.h (original)
+++ incubator/stdcxx/trunk/include/rw/_strref.h Thu Oct 18 08:03:36 2007
@@ -9,22 +9,23 @@
  *
  ***************************************************************************
  *
- * Copyright 2005-2006 The Apache Software Foundation or its licensors,
- * as applicable.
+ * Licensed to the Apache Software  Foundation (ASF) under one or more
+ * contributor  license agreements.  See  the NOTICE  file distributed
+ * with  this  work  for  additional information  regarding  copyright
+ * ownership.   The ASF  licenses this  file to  you under  the Apache
+ * License, Version  2.0 (the  "License"); you may  not use  this file
+ * except in  compliance with the License.   You may obtain  a copy of
+ * the License at
  *
- * Copyright 1994-2006 Rogue Wave Software.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * distributed under the  License is distributed on an  "AS IS" BASIS,
+ * WITHOUT  WARRANTIES OR CONDITIONS  OF ANY  KIND, either  express or
+ * implied.   See  the License  for  the  specific language  governing
+ * permissions and limitations under the License.
+ *
+ * Copyright 1994-2007 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -56,12 +57,13 @@
 #  define _RWSTD_STRING_REF_INT long
 #endif
 
-#ifndef _RWSTD_NO_ATOMIC_OPS
+#if !defined (_RWSTD_NO_ATOMIC_OPS) && !defined (_RWSTD_NO_STRING_ATOMIC_OPS)
    // disable string mutex when atomic operations are available
 #  ifndef _RWSTD_NO_STRING_MUTEX
 #    define _RWSTD_NO_STRING_MUTEX
 #  endif   // _RWSTD_NO_STRING_MUTEX
-#endif   // _RWSTD_NO_ATOMIC_OPS
+#endif   // _RWSTD_NO_ATOMIC_OPS && !_RWSTD_NO_STRING_ATOMIC_OPS
+
 
 _RWSTD_NAMESPACE (std) { 
 



Mime
View raw message