You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2007/09/28 22:57:41 UTC
svn commit: r580483 [37/42] - in /incubator/stdcxx/branches/4.2.0: ./ bin/
doc/ doc/stdlibref/ doc/stdlibug/ etc/config/ etc/config/src/
etc/config/windows/ etc/nls/charmaps/ etc/nls/posix/charmaps/
etc/nls/posix/src/ etc/nls/src/ examples/manual/ exam...
Modified: incubator/stdcxx/branches/4.2.0/include/loc/_punct.c
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/loc/_punct.c?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/loc/_punct.c (original)
+++ incubator/stdcxx/branches/4.2.0/include/loc/_punct.c Fri Sep 28 13:55:52 2007
@@ -2,20 +2,27 @@
*
* loc/_punct.c
*
- * $Id: //stdlib/dev/include/loc/_punct.c#6 $
+ * $Id$
*
***************************************************************************
*
- * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave
- * Software division. 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. 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.
+ * 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
+ *
+ * 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.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
*
**************************************************************************/
Modified: incubator/stdcxx/branches/4.2.0/include/loc/_time_get.c
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/loc/_time_get.c?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/loc/_time_get.c (original)
+++ incubator/stdcxx/branches/4.2.0/include/loc/_time_get.c Fri Sep 28 13:55:52 2007
@@ -2,20 +2,27 @@
*
* loc/_time_get.c
*
- * $Id: //stdlib/dev/include/loc/_time_get.c#9 $
+ * $Id$
*
***************************************************************************
*
- * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave
- * Software division. 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. 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.
+ * 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
+ *
+ * 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.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
*
**************************************************************************/
Modified: incubator/stdcxx/branches/4.2.0/include/loc/_time_put.c
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/loc/_time_put.c?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/loc/_time_put.c (original)
+++ incubator/stdcxx/branches/4.2.0/include/loc/_time_put.c Fri Sep 28 13:55:52 2007
@@ -2,20 +2,27 @@
*
* loc/_time_put.c
*
- * $Id: //stdlib/dev/include/loc/_time_put.c#9 $
+ * $Id$
*
***************************************************************************
*
- * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave
- * Software division. 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. 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.
+ * 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
+ *
+ * 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.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
*
**************************************************************************/
Modified: incubator/stdcxx/branches/4.2.0/include/ostream.c
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/ostream.c?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/ostream.c (original)
+++ incubator/stdcxx/branches/4.2.0/include/ostream.c Fri Sep 28 13:55:52 2007
@@ -2,20 +2,27 @@
*
* ostream.c
*
- * $Id: //stdlib/dev/include/ostream.c#9 $
+ * $Id$
*
***************************************************************************
*
- * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave
- * Software division. 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. 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.
+ * 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
+ *
+ * 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.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
*
**************************************************************************/
Modified: incubator/stdcxx/branches/4.2.0/include/rw/_algobase.c
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/rw/_algobase.c?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/rw/_algobase.c (original)
+++ incubator/stdcxx/branches/4.2.0/include/rw/_algobase.c Fri Sep 28 13:55:52 2007
@@ -2,20 +2,27 @@
*
* rw/_algobase.c
*
- * $Id: //stdlib/dev/include/rw/_algobase.c#9 $
+ * $Id$
*
***************************************************************************
*
- * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave
- * Software division. 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. 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.
+ * 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
+ *
+ * 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.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
*
**************************************************************************/
Modified: incubator/stdcxx/branches/4.2.0/include/rw/_basic_ios.c
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/rw/_basic_ios.c?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/rw/_basic_ios.c (original)
+++ incubator/stdcxx/branches/4.2.0/include/rw/_basic_ios.c Fri Sep 28 13:55:52 2007
@@ -2,20 +2,27 @@
*
* rw/_basic_ios.c
*
- * $Id: //stdlib/dev/include/rw/_basic_ios.c#5 $
+ * $Id$
*
***************************************************************************
*
- * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave
- * Software division. 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. 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.
+ * 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
+ *
+ * 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.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
*
**************************************************************************/
Modified: incubator/stdcxx/branches/4.2.0/include/rw/_config-icc.h
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/rw/_config-icc.h?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/rw/_config-icc.h (original)
+++ incubator/stdcxx/branches/4.2.0/include/rw/_config-icc.h Fri Sep 28 13:55:52 2007
@@ -54,7 +54,7 @@
# endif // _RWSHARED
// disable "function was declared "deprecated"
-# pragma warning (disable: 1478)
+# pragma warning (disable: 1786)
// disable "dllexport/dllimport conflict with ... ; dllexport assumed"
# pragma warning (disable: 1740)
Modified: incubator/stdcxx/branches/4.2.0/include/rw/_defs.h
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/rw/_defs.h?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/rw/_defs.h (original)
+++ incubator/stdcxx/branches/4.2.0/include/rw/_defs.h Fri Sep 28 13:55:52 2007
@@ -91,7 +91,7 @@
#else // if defined (_RWSTD_NO_NEW_HEADER)
-# define _RWSTD_CASSERT <assert.h>
+# define _RWSTD_CASSERT "assert.h"
# define _RWSTD_CCTYPE <ctype.h>
# define _RWSTD_CERRNO "errno.h"
# define _RWSTD_CFLOAT <float.h>
@@ -99,7 +99,7 @@
# define _RWSTD_CLIMITS <limits.h>
# define _RWSTD_CLOCALE <locale.h>
# define _RWSTD_CMATH <math.h>
-# define _RWSTD_CSETJMP <setjmp.h>
+# define _RWSTD_CSETJMP "setjmp.h"
# define _RWSTD_CSIGNAL <signal.h>
# define _RWSTD_CSTDARG <stdarg.h>
# define _RWSTD_CSTDDEF <stddef.h>
@@ -135,7 +135,9 @@
#if defined (_M_IA64)
// IA64/Itanium SDK paths
# if !defined (_RWSTD_NO_ASSERT_H) && !defined (_RWSTD_ANSI_C_ASSERT_H)
-# define _RWSTD_ANSI_C_ASSERT_H <../include/crt/assert.h>
+ // pathname quoted in order to prevent the assert macro
+ // from expanding in the include directive
+# define _RWSTD_ANSI_C_ASSERT_H "../include/crt/assert.h"
# endif
# if !defined (_RWSTD_NO_CTYPE_H) && !defined (_RWSTD_ANSI_C_CTYPE_H)
# define _RWSTD_ANSI_C_CTYPE_H <../include/crt/ctype.h>
@@ -167,7 +169,9 @@
# define _RWSTD_ANSI_C_MATH_H <../include/crt/math.h>
# endif
# if !defined (_RWSTD_NO_SETJMP_H) && !defined (_RWSTD_ANSI_C_SETJMP_H)
-# define _RWSTD_ANSI_C_SETJMP_H <../include/crt/setjmp.h>
+ // pathname quoted in order to prevent the setjmp macro
+ // from expanding in the include directive
+# define _RWSTD_ANSI_C_SETJMP_H "../include/crt/setjmp.h"
# endif
# if !defined (_RWSTD_NO_SIGNAL_H) && !defined (_RWSTD_ANSI_C_SIGNAL_H)
# define _RWSTD_ANSI_C_SIGNAL_H <../include/crt/signal.h>
@@ -205,7 +209,9 @@
#elif !defined (_RWSTD_NO_FORCE_RELATIVE_PATHS)
# undef _RWSTD_ANSI_C_ASSERT_H
-# define _RWSTD_ANSI_C_ASSERT_H <../include/assert.h>
+ // pathname quoted in order to prevent the assert macro
+ // from expanding in the include directive
+# define _RWSTD_ANSI_C_ASSERT_H "../include/assert.h"
# undef _RWSTD_ANSI_C_CTYPE_H
# define _RWSTD_ANSI_C_CTYPE_H <../include/ctype.h>
# undef _RWSTD_ANSI_C_ERRNO_H
@@ -229,7 +235,9 @@
# undef _RWSTD_ANSI_C_MATH_H
# define _RWSTD_ANSI_C_MATH_H <../include/math.h>
# undef _RWSTD_ANSI_C_SETJMP_H
-# define _RWSTD_ANSI_C_SETJMP_H <../include/setjmp.h>
+ // pathname quoted in order to prevent the setjmp macro
+ // from expanding in the include directive
+# define _RWSTD_ANSI_C_SETJMP_H "../include/setjmp.h"
# undef _RWSTD_ANSI_C_SIGNAL_H
# define _RWSTD_ANSI_C_SIGNAL_H <../include/signal.h>
# undef _RWSTD_ANSI_C_STDARG_H
@@ -262,7 +270,9 @@
#elif defined (_RWSTD_USE_USR_INCLUDE_HEADERS)
# if !defined (_RWSTD_NO_ASSERT_H) && !defined (_RWSTD_ANSI_C_ASSERT_H)
-# define _RWSTD_ANSI_C_ASSERT_H </usr/include/assert.h>
+ // pathname quoted in order to prevent the assert macro
+ // from expanding in the include directive
+# define _RWSTD_ANSI_C_ASSERT_H "/usr/include/assert.h"
# endif
# if !defined (_RWSTD_NO_CTYPE_H) && !defined (_RWSTD_ANSI_C_CTYPE_H)
# define _RWSTD_ANSI_C_CTYPE_H </usr/include/ctype.h>
@@ -294,7 +304,9 @@
# define _RWSTD_ANSI_C_MATH_H </usr/include/math.h>
# endif
# if !defined (_RWSTD_NO_SETJMP_H) && !defined (_RWSTD_ANSI_C_SETJMP_H)
-# define _RWSTD_ANSI_C_SETJMP_H </usr/include/setjmp.h>
+ // pathname quoted in order to prevent the setjmp macro
+ // from expanding in the include directive
+# define _RWSTD_ANSI_C_SETJMP_H "/usr/include/setjmp.h"
# endif
# if !defined (_RWSTD_NO_SIGNAL_H) && !defined (_RWSTD_ANSI_C_SIGNAL_H)
# define _RWSTD_ANSI_C_SIGNAL_H </usr/include/signal.h>
@@ -332,7 +344,9 @@
#else // if !_WIN64 && !_RWSTD_USE_USR_INCLUDE_HEADERS
# if !defined (_RWSTD_NO_ASSERT_H) && !defined (_RWSTD_ANSI_C_ASSERT_H)
-# define _RWSTD_ANSI_C_ASSERT_H <../include/assert.h>
+ // pathname quoted in order to prevent the assert macro
+ // from expanding in the include directive
+# define _RWSTD_ANSI_C_ASSERT_H "../include/assert.h"
# endif
# if !defined (_RWSTD_NO_CTYPE_H) && !defined (_RWSTD_ANSI_C_CTYPE_H)
# define _RWSTD_ANSI_C_CTYPE_H <../include/ctype.h>
@@ -364,7 +378,9 @@
# define _RWSTD_ANSI_C_MATH_H <../include/math.h>
# endif
# if !defined (_RWSTD_NO_SETJMP_H) && !defined (_RWSTD_ANSI_C_SETJMP_H)
-# define _RWSTD_ANSI_C_SETJMP_H <../include/setjmp.h>
+ // pathname quoted in order to prevent the setjmp macro
+ // from expanding in the include directive
+# define _RWSTD_ANSI_C_SETJMP_H "../include/setjmp.h"
# endif
# if !defined (_RWSTD_NO_SIGNAL_H) && !defined (_RWSTD_ANSI_C_SIGNAL_H)
# define _RWSTD_ANSI_C_SIGNAL_H <../include/signal.h>
Modified: incubator/stdcxx/branches/4.2.0/include/rw/_heap.c
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/rw/_heap.c?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/rw/_heap.c (original)
+++ incubator/stdcxx/branches/4.2.0/include/rw/_heap.c Fri Sep 28 13:55:52 2007
@@ -2,20 +2,27 @@
*
* rw/_heap.c
*
- * $Id: //stdlib/dev/include/rw/_heap.c#2 $
+ * $Id$
*
***************************************************************************
*
- * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave
- * Software division. 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. 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.
+ * 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
+ *
+ * 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.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
*
**************************************************************************/
Modified: incubator/stdcxx/branches/4.2.0/include/rw/_ioinsert.c
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/rw/_ioinsert.c?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/rw/_ioinsert.c (original)
+++ incubator/stdcxx/branches/4.2.0/include/rw/_ioinsert.c Fri Sep 28 13:55:52 2007
@@ -2,20 +2,27 @@
*
* rw/_ioinsert.c
*
- * $Id: //stdlib/dev/include/rw/_ioinsert.c#4 $
+ * $Id$
*
***************************************************************************
*
- * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave
- * Software division. 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. 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.
+ * 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
+ *
+ * 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.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
*
**************************************************************************/
Modified: incubator/stdcxx/branches/4.2.0/include/rw/_iterbase.h
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/rw/_iterbase.h?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/rw/_iterbase.h (original)
+++ incubator/stdcxx/branches/4.2.0/include/rw/_iterbase.h Fri Sep 28 13:55:52 2007
@@ -22,22 +22,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.
*
**************************************************************************/
@@ -337,7 +338,7 @@
// 24.3.4, p4
template <class _ForwardIterator>
inline _TYPENAME iterator_traits<_ForwardIterator>::difference_type
-distance (const _ForwardIterator &__first, const _ForwardIterator &__last)
+distance (_ForwardIterator __first, _ForwardIterator __last)
{
_TYPENAME iterator_traits<_ForwardIterator>::difference_type __n = 0;
Modified: incubator/stdcxx/branches/4.2.0/include/rw/_mutex.h
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/rw/_mutex.h?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/rw/_mutex.h (original)
+++ incubator/stdcxx/branches/4.2.0/include/rw/_mutex.h Fri Sep 28 13:55:52 2007
@@ -140,6 +140,9 @@
__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*);
@@ -149,6 +152,12 @@
__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) {
@@ -166,6 +175,21 @@
# endif // _RWSTD_NO_FWD_DECLARATIONS
+# if defined (_MSC_VER) && _MSC_VER >= 1400 && !defined (__INTEL_COMPILER)
+# include <intrin.h>
+
+# pragma intrinsic (_InterlockedIncrement)
+# pragma intrinsic (_InterlockedIncrement16)
+# pragma intrinsic (_InterlockedDecrement)
+# pragma intrinsic (_InterlockedDecrement16)
+# pragma intrinsic (_InterlockedExchange)
+
+# ifdef _M_X64
+# pragma intrinsic (_InterlockedIncrement64)
+# pragma intrinsic (_InterlockedDecrement64)
+# pragma intrinsic (_InterlockedExchange64)
+# endif
+# endif // _MSC_VER >= 1400 && !__INTEL_COMPILER
_RWSTD_NAMESPACE (__rw) {
@@ -480,9 +504,9 @@
// up with multiple copies)
static volatile long __cntr /* = 0 */; // initialization counter
-#if defined (_WIN32) || defined (_WIN64)
+#if defined (_WIN32)
// MT safe
- if (0 == __cntr && 1 == InterlockedIncrement ((long*)&__cntr))
+ if (0 == __cntr && 1 == _InterlockedIncrement ((long*)&__cntr))
#else
// not so safe (volatile should help)
if (0 == __cntr && 1 == ++__cntr)
@@ -1161,19 +1185,20 @@
false);
}
-/********************** i386/gcc **************************************/
+/********************** i386/gcc || _M_IX86 *********************************/
-#elif defined (__i386__) && (defined (__GNUG__) || defined (__INTEL_COMPILER))
+#elif defined (__i386__) && (defined (__GNUG__) \
+ || defined (__INTEL_COMPILER)) || defined (_M_IX86)
extern "C" {
-char __rw_atomic_add8 (char*, int);
-short __rw_atomic_add16 (short*, short);
-int __rw_atomic_add32 (int*, int);
-
-char __rw_atomic_xchg8 (char*, char);
-short __rw_atomic_xchg16 (short*, short);
-int __rw_atomic_xchg32 (int*, int);
+_RWSTD_EXPORT char __rw_atomic_add8 (char*, int);
+_RWSTD_EXPORT short __rw_atomic_add16 (short*, short);
+_RWSTD_EXPORT int __rw_atomic_add32 (int*, int);
+
+_RWSTD_EXPORT char __rw_atomic_xchg8 (char*, char);
+_RWSTD_EXPORT short __rw_atomic_xchg16 (short*, short);
+_RWSTD_EXPORT int __rw_atomic_xchg32 (int*, int);
} // extern "C"
@@ -1206,7 +1231,12 @@
__rw_atomic_preincrement (short &__x, bool)
{
_RWSTD_COMPILE_ASSERT (2 == sizeof (short));
+
+#if defined (_MSC_VER) && _MSC_VER >= 1400 && !defined (__INTEL_COMPILER)
+ return _InterlockedIncrement16 (&__x);
+#else
return __rw_atomic_add16 (&__x, +1);
+#endif
}
@@ -1214,7 +1244,12 @@
__rw_atomic_preincrement (unsigned short &__x, bool)
{
_RWSTD_COMPILE_ASSERT (2 == sizeof (unsigned short));
+
+#if defined (_MSC_VER) && _MSC_VER >= 1400 && !defined (__INTEL_COMPILER)
+ return _InterlockedIncrement16 (_RWSTD_REINTERPRET_CAST (short*, &__x));
+#else
return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (short*, &__x), +1);
+#endif
}
@@ -1222,7 +1257,12 @@
__rw_atomic_preincrement (int &__x, bool)
{
_RWSTD_COMPILE_ASSERT (4 == sizeof (int));
+
+#ifdef _MSC_VER
+ return _InterlockedIncrement (_RWSTD_REINTERPRET_CAST (long*, &__x));
+#else
return __rw_atomic_add32 (&__x, 1);
+#endif
}
@@ -1230,7 +1270,12 @@
__rw_atomic_preincrement (unsigned int &__x, bool)
{
_RWSTD_COMPILE_ASSERT (4 == sizeof (unsigned int));
+
+#ifdef _MSC_VER
+ return _InterlockedIncrement (_RWSTD_REINTERPRET_CAST (long*, &__x));
+#else
return __rw_atomic_add32 (_RWSTD_REINTERPRET_CAST (int*, &__x), 1);
+#endif
}
@@ -1262,7 +1307,12 @@
__rw_atomic_predecrement (short &__x, bool)
{
_RWSTD_COMPILE_ASSERT (2 == sizeof (short));
+
+#if defined (_MSC_VER) && _MSC_VER >= 1400 && !defined (__INTEL_COMPILER)
+ return _InterlockedDecrement16 (&__x);
+#else
return __rw_atomic_add16 (&__x, -1);
+#endif
}
@@ -1270,7 +1320,12 @@
__rw_atomic_predecrement (unsigned short &__x, bool)
{
_RWSTD_COMPILE_ASSERT (2 == sizeof (unsigned short));
+
+#if defined (_MSC_VER) && _MSC_VER >= 1400 && !defined (__INTEL_COMPILER)
+ return _InterlockedDecrement16 (_RWSTD_REINTERPRET_CAST (short*, &__x));
+#else
return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (short*, &__x), -1);
+#endif
}
@@ -1278,7 +1333,12 @@
__rw_atomic_predecrement (int &__x, bool)
{
_RWSTD_COMPILE_ASSERT (4 == sizeof (int));
+
+#ifdef _MSC_VER
+ return _InterlockedDecrement (_RWSTD_REINTERPRET_CAST (long*, &__x));
+#else
return __rw_atomic_add32 (&__x, -1);
+#endif
}
@@ -1286,7 +1346,12 @@
__rw_atomic_predecrement (unsigned int &__x, bool)
{
_RWSTD_COMPILE_ASSERT (4 == sizeof (unsigned int));
+
+#ifdef _MSC_VER
+ return _InterlockedDecrement (_RWSTD_REINTERPRET_CAST (long*, &__x));
+#else
return __rw_atomic_add32 (_RWSTD_REINTERPRET_CAST (int*, &__x), -1);
+#endif
}
@@ -1337,7 +1402,13 @@
__rw_atomic_exchange (int &__x, int __y, bool)
{
_RWSTD_COMPILE_ASSERT (4 == sizeof (int));
+
+#ifdef _MSC_VER
+ return _InterlockedExchange (_RWSTD_REINTERPRET_CAST (long*, &__x),
+ _RWSTD_STATIC_CAST (long, __y));
+#else
return __rw_atomic_xchg32 (&__x, __y);
+#endif
}
@@ -1345,88 +1416,48 @@
__rw_atomic_exchange (unsigned int &__x, unsigned int __y, bool)
{
_RWSTD_COMPILE_ASSERT (4 == sizeof (unsigned int));
+
+#ifdef _MSC_VER
+ return _InterlockedExchange (_RWSTD_REINTERPRET_CAST (long*, &__x),
+ _RWSTD_STATIC_CAST (long, __y));
+#else
return __rw_atomic_xchg32 (_RWSTD_REINTERPRET_CAST (int*, &__x),
_RWSTD_STATIC_CAST (int, __y));
+#endif
}
+/********************** IA64/x86_64/_M_X64 *****************************/
-/********************** WIN 32/64 ************************************/
-
-#elif defined (_WIN32)
-
-// Interlocked[In|De]crement functions atomically modify their argument
-// and return the new value
-
-// InterlockedExchange atomically sets the value pointed to by the first
-// argument to that of the second argument and returns the original value
-
-inline int
-__rw_atomic_preincrement (int &__x, bool)
-{
- _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));
- return InterlockedIncrement (_RWSTD_REINTERPRET_CAST (long*, &__x));
-}
-
-
-inline unsigned int
-__rw_atomic_preincrement (unsigned int &__x, bool)
-{
- return __rw_atomic_preincrement (_RWSTD_REINTERPRET_CAST (long&, __x),
- false);
-}
-
-
-inline int
-__rw_atomic_predecrement (int &__x, bool)
-{
- _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));
- return InterlockedDecrement (_RWSTD_REINTERPRET_CAST (long*, &__x));
-}
-
-
-inline unsigned int
-__rw_atomic_predecrement (unsigned int &__x, bool)
-{
- return __rw_atomic_predecrement (_RWSTD_REINTERPRET_CAST (int&, __x),
- false);
-}
-
-
-inline int
-__rw_atomic_exchange (int &__x, int __y, bool)
-{
- _RWSTD_COMPILE_ASSERT (sizeof __x == sizeof (long));
- return InterlockedExchange (_RWSTD_REINTERPRET_CAST (long*, &__x),
- _RWSTD_STATIC_CAST (long, __y));
-}
+#elif defined (__ia64) || defined (__x86_64) || defined (_M_X64)
+extern "C" {
-inline unsigned int
-__rw_atomic_exchange (unsigned int &__x, unsigned int __y, bool)
-{
- return __rw_atomic_exchange (_RWSTD_REINTERPRET_CAST (int&, __x),
- _RWSTD_STATIC_CAST (int, __y), false);
-}
+_RWSTD_EXPORT _RWSTD_INT8_T
+__rw_atomic_xchg8 (_RWSTD_INT8_T*, _RWSTD_INT8_T);
-/********************** IA64/x86_64 ***********************************/
+_RWSTD_EXPORT _RWSTD_INT16_T
+__rw_atomic_xchg16 (_RWSTD_INT16_T*, _RWSTD_INT16_T);
-#elif defined (__ia64) || defined (__x86_64)
+_RWSTD_EXPORT _RWSTD_INT32_T
+__rw_atomic_xchg32 (_RWSTD_INT32_T*, _RWSTD_INT32_T);
-extern "C" {
-_RWSTD_INT8_T __rw_atomic_xchg8 (_RWSTD_INT8_T*, _RWSTD_INT8_T);
-_RWSTD_INT16_T __rw_atomic_xchg16 (_RWSTD_INT16_T*, _RWSTD_INT16_T);
-_RWSTD_INT32_T __rw_atomic_xchg32 (_RWSTD_INT32_T*, _RWSTD_INT32_T);
+_RWSTD_EXPORT _RWSTD_INT8_T
+__rw_atomic_add8 (_RWSTD_INT8_T*, _RWSTD_INT8_T);
+_RWSTD_EXPORT _RWSTD_INT16_T
+__rw_atomic_add16 (_RWSTD_INT16_T*, _RWSTD_INT16_T);
-_RWSTD_INT8_T __rw_atomic_add8 (_RWSTD_INT8_T*, _RWSTD_INT8_T);
-_RWSTD_INT16_T __rw_atomic_add16 (_RWSTD_INT16_T*, _RWSTD_INT16_T);
-_RWSTD_INT32_T __rw_atomic_add32 (_RWSTD_INT32_T*, _RWSTD_INT32_T);
+_RWSTD_EXPORT _RWSTD_INT32_T
+__rw_atomic_add32 (_RWSTD_INT32_T*, _RWSTD_INT32_T);
#ifdef _RWSTD_INT64_T
-_RWSTD_INT64_T __rw_atomic_xchg64 (_RWSTD_INT64_T*, _RWSTD_INT64_T);
-_RWSTD_INT64_T __rw_atomic_add64 (_RWSTD_INT64_T*, _RWSTD_INT64_T);
+_RWSTD_EXPORT _RWSTD_INT64_T
+__rw_atomic_xchg64 (_RWSTD_INT64_T*, _RWSTD_INT64_T);
+
+_RWSTD_EXPORT _RWSTD_INT64_T
+__rw_atomic_add64 (_RWSTD_INT64_T*, _RWSTD_INT64_T);
#endif // _RWSTD_INT64_T
@@ -1468,8 +1499,12 @@
{
_RWSTD_COMPILE_ASSERT (2 == sizeof (short));
+#if defined (_MSC_VER) && !defined (__INTEL_COMPILER)
+ return _InterlockedIncrement16 (&__x);
+#else
return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT16_T*, &__x),
+1);
+#endif
}
@@ -1478,8 +1513,12 @@
{
_RWSTD_COMPILE_ASSERT (2 == sizeof (unsigned short));
+#if defined (_MSC_VER) && !defined (__INTEL_COMPILER)
+ return _InterlockedIncrement16 (_RWSTD_REINTERPRET_CAST (short*, &__x));
+#else
return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT16_T*, &__x),
+1);
+#endif
}
@@ -1488,8 +1527,12 @@
{
_RWSTD_COMPILE_ASSERT (4 == sizeof (int));
+#ifdef _MSC_VER
+ return _InterlockedIncrement (_RWSTD_REINTERPRET_CAST (long*, &__x));
+#else
return __rw_atomic_add32 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT32_T*, &__x),
+1);
+#endif
}
@@ -1498,8 +1541,12 @@
{
_RWSTD_COMPILE_ASSERT (4 == sizeof (unsigned int));
+#ifdef _MSC_VER
+ return _InterlockedIncrement (_RWSTD_REINTERPRET_CAST (long*, &__x));
+#else
return __rw_atomic_add32 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT32_T*, &__x),
+1);
+#endif
}
@@ -1527,6 +1574,40 @@
#endif // _RWSTD_LONG_SIZE
+#ifdef _RWSTD_LONG_LONG
+# if _RWSTD_LLONG_SIZE > _RWSTD_LONG_SIZE
+
+inline _RWSTD_LONG_LONG
+__rw_atomic_preincrement (_RWSTD_LONG_LONG &__x, bool)
+{
+ _RWSTD_COMPILE_ASSERT (8 == sizeof (_RWSTD_LONG_LONG));
+
+#ifdef _MSC_VER
+ return _InterlockedIncrement64 (_RWSTD_REINTERPRET_CAST (__int64*, &__x));
+#else
+ return __rw_atomic_add64 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT64_T*, &__x),
+ +1);
+#endif
+}
+
+
+inline unsigned _RWSTD_LONG_LONG
+__rw_atomic_preincrement (unsigned _RWSTD_LONG_LONG &__x, bool)
+{
+ _RWSTD_COMPILE_ASSERT (8 == sizeof (unsigned _RWSTD_LONG_LONG));
+
+#ifdef _MSC_VER
+ return _InterlockedIncrement64 (_RWSTD_REINTERPRET_CAST (__int64*, &__x));
+#else
+ return __rw_atomic_add64 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT64_T*, &__x),
+ +1);
+#endif
+}
+
+# endif // _RWSTD_LLONG_SIZE > _RWSTD_LONG_SIZE
+#endif // _RWSTD_LONG_LONG
+
+
inline char
__rw_atomic_predecrement (char &__x, bool)
{
@@ -1562,8 +1643,12 @@
{
_RWSTD_COMPILE_ASSERT (2 == sizeof (short));
+#if defined (_MSC_VER) && !defined (__INTEL_COMPILER)
+ return _InterlockedDecrement16 (&__x);
+#else
return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT16_T*, &__x),
-1);
+#endif
}
@@ -1572,8 +1657,12 @@
{
_RWSTD_COMPILE_ASSERT (2 == sizeof (unsigned short));
+#if defined (_MSC_VER) && !defined (__INTEL_COMPILER)
+ return _InterlockedDecrement16 (_RWSTD_REINTERPRET_CAST (short*, &__x));
+#else
return __rw_atomic_add16 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT16_T*, &__x),
-1);
+#endif
}
@@ -1582,8 +1671,12 @@
{
_RWSTD_COMPILE_ASSERT (4 == sizeof (int));
+#ifdef _MSC_VER
+ return _InterlockedDecrement (_RWSTD_REINTERPRET_CAST (long*, &__x));
+#else
return __rw_atomic_add32 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT32_T*, &__x),
-1);
+#endif
}
@@ -1592,8 +1685,12 @@
{
_RWSTD_COMPILE_ASSERT (4 == sizeof (unsigned int));
+#ifdef _MSC_VER
+ return _InterlockedDecrement (_RWSTD_REINTERPRET_CAST (long*, &__x));
+#else
return __rw_atomic_add32 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT32_T*, &__x),
-1);
+#endif
}
@@ -1612,7 +1709,7 @@
inline unsigned long
__rw_atomic_predecrement (unsigned long &__x, bool)
{
- _RWSTD_COMPILE_ASSERT (8 == sizeof (long));
+ _RWSTD_COMPILE_ASSERT (8 == sizeof (unsigned long));
return __rw_atomic_add64 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT64_T*, &__x),
-1);
@@ -1621,6 +1718,40 @@
#endif // _RWSTD_LONG_SIZE
+#ifdef _RWSTD_LONG_LONG
+# if _RWSTD_LLONG_SIZE > _RWSTD_LONG_SIZE
+
+inline _RWSTD_LONG_LONG
+__rw_atomic_predecrement (_RWSTD_LONG_LONG &__x, bool)
+{
+ _RWSTD_COMPILE_ASSERT (8 == sizeof (_RWSTD_LONG_LONG));
+
+#ifdef _MSC_VER
+ return _InterlockedDecrement64 (_RWSTD_REINTERPRET_CAST (__int64*, &__x));
+#else
+ return __rw_atomic_add64 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT64_T*, &__x),
+ -1);
+#endif
+}
+
+
+inline unsigned _RWSTD_LONG_LONG
+__rw_atomic_predecrement (unsigned _RWSTD_LONG_LONG &__x, bool)
+{
+ _RWSTD_COMPILE_ASSERT (8 == sizeof (unsigned _RWSTD_LONG_LONG));
+
+#ifdef _MSC_VER
+ return _InterlockedDecrement64 (_RWSTD_REINTERPRET_CAST (__int64*, &__x));
+#else
+ return __rw_atomic_add64 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT64_T*, &__x),
+ -1);
+#endif
+}
+
+# endif // _RWSTD_LLONG_SIZE > _RWSTD_LONG_SIZE
+#endif // _RWSTD_LONG_LONG
+
+
inline char
__rw_atomic_exchange (char &__x, char __y, bool)
{
@@ -1676,8 +1807,13 @@
{
_RWSTD_COMPILE_ASSERT (4 == sizeof (int));
+#ifdef _MSC_VER
+ return _InterlockedExchange (_RWSTD_REINTERPRET_CAST (long*, &__x),
+ _RWSTD_STATIC_CAST (long, __y));
+#else
return __rw_atomic_xchg32 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT32_T*, &__x),
_RWSTD_STATIC_CAST (_RWSTD_INT32_T, __y));
+#endif
}
@@ -1686,8 +1822,13 @@
{
_RWSTD_COMPILE_ASSERT (4 == sizeof (unsigned int));
+#ifdef _MSC_VER
+ return _InterlockedExchange (_RWSTD_REINTERPRET_CAST (long*, &__x),
+ _RWSTD_STATIC_CAST (long, __y));
+#else
return __rw_atomic_xchg32 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT32_T*, &__x),
_RWSTD_STATIC_CAST (_RWSTD_INT32_T, __y));
+#endif
}
@@ -1713,6 +1854,44 @@
}
# endif // _RWSTD_LONG_SIZE == _RWSTD_INT_SIZE
+
+
+#ifdef _RWSTD_LONG_LONG
+# if _RWSTD_LLONG_SIZE > _RWSTD_LONG_SIZE
+
+inline _RWSTD_LONG_LONG
+__rw_atomic_exchange (_RWSTD_LONG_LONG &__x, _RWSTD_LONG_LONG __y, bool)
+{
+ _RWSTD_COMPILE_ASSERT (8 == sizeof (_RWSTD_LONG_LONG));
+
+#ifdef _MSC_VER
+ return _InterlockedExchange64 (_RWSTD_REINTERPRET_CAST (__int64*, &__x),
+ _RWSTD_STATIC_CAST (__int64, __y));
+#else
+ return __rw_atomic_xchg64 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT64_T*, &__x),
+ _RWSTD_STATIC_CAST (_RWSTD_INT64_T, __y));
+#endif
+}
+
+
+inline unsigned _RWSTD_LONG_LONG
+__rw_atomic_exchange (unsigned _RWSTD_LONG_LONG &__x,
+ unsigned _RWSTD_LONG_LONG __y, bool)
+{
+ _RWSTD_COMPILE_ASSERT (8 == sizeof (unsigned _RWSTD_LONG_LONG));
+
+#ifdef _MSC_VER
+ return _InterlockedExchange64 (_RWSTD_REINTERPRET_CAST (__int64*, &__x),
+ _RWSTD_STATIC_CAST (__int64, __y));
+#else
+ return __rw_atomic_xchg64 (_RWSTD_REINTERPRET_CAST (_RWSTD_INT64_T*, &__x),
+ _RWSTD_STATIC_CAST (_RWSTD_INT64_T, __y));
+#endif
+}
+
+# endif // _RWSTD_LLONG_SIZE > _RWSTD_LONG_SIZE
+#endif // _RWSTD_LONG_LONG
+
#elif !defined (_RWSTD_NO_ATOMIC_OPS)
# define _RWSTD_NO_ATOMIC_OPS
Modified: incubator/stdcxx/branches/4.2.0/include/rw/_traits.h
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/rw/_traits.h?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/rw/_traits.h (original)
+++ incubator/stdcxx/branches/4.2.0/include/rw/_traits.h Fri Sep 28 13:55:52 2007
@@ -406,8 +406,9 @@
// cast to const void* used to get around a gcc 2.95 bug
// that prevents a static_cast from void* --> const T*
// (only occurs if memchr() isn't overloaded on const)
- return _RWSTD_STATIC_CAST (const char_type*,
- (const void*)_RWSTD_MEMCHR (__s, __c, __n));
+ return _RWSTD_STATIC_CAST (
+ const char_type*, (const void*)_RWSTD_MEMCHR (
+ __s, _RWSTD_STATIC_CAST (unsigned char, __c), __n));
}
static _RWSTD_SIZE_T length (const char_type *__s) {
Modified: incubator/stdcxx/branches/4.2.0/include/rw/_tree.c
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/rw/_tree.c?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/rw/_tree.c (original)
+++ incubator/stdcxx/branches/4.2.0/include/rw/_tree.c Fri Sep 28 13:55:52 2007
@@ -2,20 +2,27 @@
*
* rw/_tree.c
*
- * $Id: //stdlib/dev/include/rw/_tree.c#9 $
+ * $Id$
*
***************************************************************************
*
- * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave
- * Software division. 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. 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.
+ * 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
+ *
+ * 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.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
*
**************************************************************************/
Modified: incubator/stdcxx/branches/4.2.0/include/sstream
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/sstream?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/sstream (original)
+++ incubator/stdcxx/branches/4.2.0/include/sstream Fri Sep 28 13:55:52 2007
@@ -177,28 +177,30 @@
void _C_catchup (char_type*);
};
+
template <class _CharT, class _Traits, class _Allocator>
inline basic_string<_CharT, _Traits, _Allocator>
basic_stringbuf<_CharT, _Traits, _Allocator>::
-str () const {
-
- const char_type * __first = 0;
- const char_type * __last = 0;
+str () const
+{
+ const char_type* __first = 0;
+ const char_type* __last = 0;
if (this->_C_is_out ()) {
// in out only or in|out mode
__first = this->pbase ();
- __last = this->egptr () < this->pptr () ?
+ __last = this->egptr () < this->pptr () ?
this->pptr () : this->egptr ();
}
else if (this->_C_is_in ()) {
// in in only mode
__first = this->eback ();
- __last = this->egptr ();
+ __last = this->egptr ();
}
return _C_string_type (__first, __last - __first);
}
+
template <class _CharT, class _Traits, class _Allocator>
inline _RWSTD_STREAMSIZE
Modified: incubator/stdcxx/branches/4.2.0/include/sstream.c
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/sstream.c?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/sstream.c (original)
+++ incubator/stdcxx/branches/4.2.0/include/sstream.c Fri Sep 28 13:55:52 2007
@@ -2,20 +2,27 @@
*
* sstream.c
*
- * $Id: //stdlib/dev/include/sstream.c#9 $
+ * $Id$
*
***************************************************************************
*
- * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave
- * Software division. 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. 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.
+ * 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
+ *
+ * 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.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
*
**************************************************************************/
Modified: incubator/stdcxx/branches/4.2.0/include/sstream.cc
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/sstream.cc?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/sstream.cc (original)
+++ incubator/stdcxx/branches/4.2.0/include/sstream.cc Fri Sep 28 13:55:52 2007
@@ -111,9 +111,6 @@
}
__buf = __alloc.allocate (__bufsize);
-
- // take ownsership of the allocated buffer
- this->_C_own_buf (true);
}
else if (0 < __bufsize) {
// requested capacity is the same or less than the current one
@@ -139,6 +136,9 @@
if (this->_C_buffer && this->_C_own_buf ())
__alloc.deallocate (this->_C_buffer, this->_C_bufsize);
+ // take ownership of the allocated buffer
+ this->_C_own_buf (true);
+
this->_C_buffer = __buf;
this->_C_bufsize = __bufsize;
}
@@ -185,9 +185,15 @@
const _RWSTD_SIZE_T __bufsize =
__n + (this->pptr () - this->pbase ());
+ // preserve current pptr() since str() would seek to end
+ const streamsize __cur = this->pptr () - this->pbase ();
+
// grow the buffer if necessary to accommodate the whole
// string plus the contents of the buffer up to pptr()
str (this->_C_buffer, __bufsize);
+
+ // restore pptr()
+ this->pbump (__cur - (this->pptr () - this->pbase ()));
_RWSTD_ASSERT (__n <= this->epptr () - this->pptr ());
}
Modified: incubator/stdcxx/branches/4.2.0/include/stdexcept
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/stdexcept?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/stdexcept (original)
+++ incubator/stdcxx/branches/4.2.0/include/stdexcept Fri Sep 28 13:55:52 2007
@@ -65,6 +65,8 @@
// extension
_EXPLICIT domain_error (const char *__s = 0)
: logic_error (__s) { }
+
+ virtual ~domain_error () _THROWS (());
};
@@ -77,6 +79,8 @@
// extension
_EXPLICIT invalid_argument (const char *__s = 0)
: logic_error (__s) { }
+
+ virtual ~invalid_argument () _THROWS (());
};
@@ -89,6 +93,8 @@
// extension
_EXPLICIT length_error (const char *__s = 0)
: logic_error (__s) { }
+
+ virtual ~length_error () _THROWS (());
};
@@ -101,6 +107,8 @@
// extension
_EXPLICIT out_of_range (const char *__s = 0)
: logic_error (__s) { }
+
+ virtual ~out_of_range () _THROWS (());
};
@@ -113,6 +121,8 @@
// extension
_EXPLICIT runtime_error (const char *__s = 0)
: _RW::__rw_exception (__s) { }
+
+ virtual ~runtime_error () _THROWS (());
};
@@ -125,6 +135,8 @@
// extension
_EXPLICIT range_error (const char *__s = 0)
: runtime_error (__s) { }
+
+ virtual ~range_error () _THROWS (());
};
@@ -137,6 +149,8 @@
// extension
_EXPLICIT overflow_error (const char *__s = 0)
: runtime_error (__s) { }
+
+ virtual ~overflow_error () _THROWS (());
};
@@ -149,6 +163,8 @@
// extension
_EXPLICIT underflow_error (const char *__s = 0)
: runtime_error (__s) { }
+
+ virtual ~underflow_error () _THROWS (());
};
Modified: incubator/stdcxx/branches/4.2.0/include/streambuf.c
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/streambuf.c?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/streambuf.c (original)
+++ incubator/stdcxx/branches/4.2.0/include/streambuf.c Fri Sep 28 13:55:52 2007
@@ -2,20 +2,27 @@
*
* streambuf.c
*
- * $Id: //stdlib/dev/include/streambuf.c#5 $
+ * $Id$
*
***************************************************************************
*
- * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave
- * Software division. 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. 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.
+ * 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
+ *
+ * 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.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
*
**************************************************************************/
Modified: incubator/stdcxx/branches/4.2.0/include/string
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/string?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/string (original)
+++ incubator/stdcxx/branches/4.2.0/include/string Fri Sep 28 13:55:52 2007
@@ -23,7 +23,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2007 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -289,19 +289,19 @@
}
basic_string& operator+= (value_type __c) {
- return append (size_type (1), __c);
+ return push_back (__c), *this;
}
basic_string& append (const basic_string&, size_type, size_type);
- basic_string& append (const basic_string&);
-
- basic_string& append (const_pointer __s, size_type __n) {
- return replace (size (), size_type (), __s, __n);
+ basic_string& append (const basic_string &__str) {
+ return append (__str.data (), __str.size ());
}
+ basic_string& append (const_pointer, size_type);
+
basic_string& append (const_pointer __s) {
- return replace (size (), size_type (), __s);
+ return append (__s, traits_type::length (__s));
}
#ifndef _RWSTD_NO_MEMBER_TEMPLATES
@@ -323,26 +323,21 @@
basic_string& append (size_type __n, value_type __c, int) {
// unnamed arg is used for overload resolution
- return replace (size (), size_type (), __n, __c);
+ return append (__n, __c);
}
#else // if defined (_RWSTD_NO_MEMBER_TEMPLATES)
basic_string& append (const_pointer __first, const_pointer __last) {
- replace (size (), size_type (), __first, __last - __first);
- return *this;
+ return append (__first, __last - __first);
}
#endif // _RWSTD_NO_MEMBER_TEMPLATES
- basic_string& append (size_type __n, value_type __c) {
- return replace (size (), size_type (), __n, __c);
- }
+ basic_string& append (size_type, value_type);
// lwg issue 7
- void push_back (value_type __c) {
- append (size_type (1), __c);
- }
+ void push_back (value_type);
basic_string& assign (const basic_string &__str) {
return *this = __str;
@@ -1087,6 +1082,26 @@
template <class _CharT, class _Traits , class _Allocator>
+inline void
+basic_string<_CharT, _Traits, _Allocator>::
+push_back (value_type __c)
+{
+ const size_type __size0 = size ();
+ const _RWSTD_SIZE_T __size1 = __size0 + 1;
+
+ if ( capacity () < __size1
+ || size_type (1) < size_type (_C_pref ()->_C_get_ref ())) {
+ replace (size (), size_type (), 1, __c);
+ }
+ else {
+ traits_type::assign (_C_data [__size0], __c);
+ traits_type::assign (_C_data [__size1], value_type ());
+ _C_pref ()->_C_size._C_size = __size1;
+ }
+}
+
+
+template <class _CharT, class _Traits , class _Allocator>
inline void basic_string<_CharT, _Traits, _Allocator>::
reserve (size_type __cap)
{
@@ -1108,16 +1123,16 @@
{
_RWSTD_REQUIRES (__pos1 <= size (),
(_RWSTD_ERROR_OUT_OF_RANGE,
- _RWSTD_FUNC ("basic_string::compare(size_type, "
+ _RWSTD_FUNC ("basic_string::replace(size_type, "
"size_type, const basic_string&, "
- "size_type, size_type) const"),
+ "size_type, size_type)"),
__pos1, size ()));
_RWSTD_REQUIRES (__pos2 <= __str.size (),
(_RWSTD_ERROR_OUT_OF_RANGE,
- _RWSTD_FUNC ("basic_string::compare(size_type, "
+ _RWSTD_FUNC ("basic_string::replace(size_type, "
"size_type, const basic_string&, "
- "size_type, size_type) const"),
+ "size_type, size_type)"),
__pos2, __str.size ()));
const size_type __rem = __str.size () - __pos2;
@@ -1178,16 +1193,55 @@
template <class _CharT, class _Traits, class _Allocator>
inline basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::
-append (const basic_string &__str)
+append (const basic_string &__str, size_type __pos, size_type __n)
{
- const size_type __size = size () + __str.size ();
+ _RWSTD_REQUIRES (__pos <= __str.size (),
+ (_RWSTD_ERROR_OUT_OF_RANGE,
+ _RWSTD_FUNC ("basic_string::append(const basic_string&,"
+ " size_type, size_type)"),
+ __pos, __str.size ()));
- if ( capacity () < __size
+ const size_type __rlen = _C_min (__str.size() - __pos, __n);
+
+ return append (__str.data () + __pos, __rlen);
+}
+
+
+template <class _CharT, class _Traits, class _Allocator>
+inline basic_string<_CharT, _Traits, _Allocator>&
+basic_string<_CharT, _Traits, _Allocator>::
+append (const_pointer __s, size_type __n)
+{
+ const size_type __size0 = size ();
+ const _RWSTD_SIZE_T __size1 = __size0 + __n;
+
+ if ( capacity () <= __size1
|| size_type (1) < size_type (_C_pref ()->_C_get_ref ()))
- return append (__str, size_type (), __str.size ());
+ return replace (size (), size_type (), __s, __n);
+
+ traits_type::copy (_C_data + __size0, __s, __n);
+ traits_type::assign (_C_data [__size1], value_type ());
+ _C_pref ()->_C_size._C_size = __size1;
+
+ return *this;
+}
+
+
+template <class _CharT, class _Traits, class _Allocator>
+inline basic_string<_CharT, _Traits, _Allocator>&
+basic_string<_CharT, _Traits, _Allocator>::
+append (size_type __n, value_type __c)
+{
+ const size_type __size0 = size ();
+ const _RWSTD_SIZE_T __size1 = __size0 + __n;
+
+ if ( capacity () < __size1
+ || size_type (1) < size_type (_C_pref ()->_C_get_ref ()))
+ return replace (size (), size_type (), __n, __c);
- traits_type::copy (_C_data + size (), __str.data (), __str.size () + 1);
- _C_pref ()->_C_size._C_size = __size;
+ traits_type::assign (_C_data + __size0, __n, __c);
+ traits_type::assign (_C_data [__size1], value_type ());
+ _C_pref ()->_C_size._C_size = __size1;
return *this;
}
Modified: incubator/stdcxx/branches/4.2.0/include/string.c
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/string.c?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/string.c (original)
+++ incubator/stdcxx/branches/4.2.0/include/string.c Fri Sep 28 13:55:52 2007
@@ -2,20 +2,27 @@
*
* string.c
*
- * $Id: //stdlib/dev/include/string.c#9 $
+ * $Id$
*
***************************************************************************
*
- * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave
- * Software division. 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. 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.
+ * 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
+ *
+ * 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.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
*
**************************************************************************/
Modified: incubator/stdcxx/branches/4.2.0/include/string.cc
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/string.cc?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/string.cc (original)
+++ incubator/stdcxx/branches/4.2.0/include/string.cc Fri Sep 28 13:55:52 2007
@@ -241,34 +241,6 @@
template <class _CharT, class _Traits, class _Allocator>
basic_string<_CharT, _Traits, _Allocator>&
basic_string<_CharT, _Traits, _Allocator>::
-append (const basic_string &__str, size_type __pos, size_type __n)
-{
- _RWSTD_REQUIRES (__pos <= __str.size (),
- (_RWSTD_ERROR_OUT_OF_RANGE,
- _RWSTD_FUNC ("basic_string::append(const basic_string&,"
- " size_type, size_type)"),
- __pos, __str.size ()));
-
- if (__n > __str.size () - __pos)
- __n = __str.size () - __pos;
-
- const size_type __rlen = _C_min (__str.size() - __pos, __n);
-
- _RWSTD_REQUIRES (size () <= max_size () - __rlen,
- (_RWSTD_ERROR_LENGTH_ERROR,
- _RWSTD_FUNC ("basic_string::append(const basic_string&,"
- " size_type, size_type)"),
- size (), max_size () - __rlen));
-
- replace (size (), size_type (), __str.c_str () + __pos, __n);
-
- return *this;
-}
-
-
-template <class _CharT, class _Traits, class _Allocator>
-basic_string<_CharT, _Traits, _Allocator>&
-basic_string<_CharT, _Traits, _Allocator>::
assign (const basic_string &__str, size_type __pos, size_type __n)
{
_RWSTD_REQUIRES (__pos <= __str.size (),
@@ -340,18 +312,22 @@
_RWSTD_REQUIRES (__pos1 <= __size0,
(_RWSTD_ERROR_OUT_OF_RANGE,
_RWSTD_FUNC ("basic_string::replace(size_type, size_type"
- ", const_pointer, size_type, size_type, "
- "size_type)"),
+ ", const_pointer, size_type)"),
__pos1, __size0 > __n2 ? __size0 : __n2));
// number of characters to delete
const size_type __xlen = _C_min (__n1, __size0 - __pos1);
+ _RWSTD_REQUIRES (__n2 <= max_size (),
+ (_RWSTD_ERROR_LENGTH_ERROR,
+ _RWSTD_FUNC ("basic_string::replace(size_type, size_type"
+ ", const_pointer, size_type)"),
+ __n2, max_size()));
+
_RWSTD_REQUIRES (__size0 - __xlen <= max_size () - __n2,
(_RWSTD_ERROR_LENGTH_ERROR,
_RWSTD_FUNC ("basic_string::replace(size_type, size_type"
- ", const_pointer, size_type, size_type, "
- "size_type)"),
+ ", const_pointer, size_type)"),
__size0 - __xlen, max_size() - __n2));
// compute the resulting string size
@@ -753,12 +729,6 @@
{
_RWSTD_ASSERT(__s != 0);
- _RWSTD_REQUIRES (__n <= max_size (),
- (_RWSTD_ERROR_LENGTH_ERROR,
- _RWSTD_FUNC ("basic_string::rfind(const_pointer, "
- "size_type, size_type) const"),
- __n, max_size ()));
-
if (size() < __n)
return npos;
@@ -782,12 +752,6 @@
{
_RWSTD_ASSERT(__s != 0);
- _RWSTD_REQUIRES (__n <= max_size (),
- (_RWSTD_ERROR_LENGTH_ERROR,
- _RWSTD_FUNC ("basic_string::find_first_of(const_pointer, "
- "size_type, size_type) const"),
- __n, max_size ()));
-
for (size_type __xpos = __pos; __xpos < size() ; __xpos++)
{
for (size_type __i = 0; __i < __n ; __i++)
@@ -806,12 +770,6 @@
{
_RWSTD_ASSERT(__s != 0);
- _RWSTD_REQUIRES (__n <= max_size (),
- (_RWSTD_ERROR_LENGTH_ERROR,
- _RWSTD_FUNC ("basic_string::find_last_of(const_pointer, "
- "size_type, size_type) const"),
- __n, max_size ()));
-
if (size())
{
size_type __slen = size() -1;
@@ -834,12 +792,6 @@
{
_RWSTD_ASSERT(__s != 0);
- _RWSTD_REQUIRES (__n <= max_size (),
- (_RWSTD_ERROR_LENGTH_ERROR,
- _RWSTD_FUNC ("basic_string::find_first_not_of("
- "const_pointer, size_type, size_type) const"),
- __n, max_size ()));
-
for (size_type __xpos = __pos; __xpos < size() ; __xpos++)
{
bool __found = false;
@@ -866,12 +818,6 @@
{
_RWSTD_ASSERT(__s != 0);
- _RWSTD_REQUIRES (__n <= max_size (),
- (_RWSTD_ERROR_LENGTH_ERROR,
- _RWSTD_FUNC ("basic_string::find_last_not_of("
- "const_pointer, size_type, size_type) const"),
- __n, max_size ()));
-
if (size())
{
size_type __slen = size() -1;
Modified: incubator/stdcxx/branches/4.2.0/include/tr1/cstdint
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/tr1/cstdint?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/tr1/cstdint (original)
+++ incubator/stdcxx/branches/4.2.0/include/tr1/cstdint Fri Sep 28 13:55:52 2007
@@ -324,8 +324,8 @@
#define SIZE_MAX _RWSTD_SIZE_MAX
-#define WCHAR_MIN _RWSTD_WCHAR_T_MIN
-#define WCHAR_MAX _RWSTD_WCHAR_T_MAX
+#define WCHAR_MIN _RWSTD_WCHAR_MIN
+#define WCHAR_MAX _RWSTD_WCHAR_MAX
#define WINT_MIN _RWSTD_WINT_MIN
#define WINT_MAX _RWSTD_WINT_MAX
Modified: incubator/stdcxx/branches/4.2.0/include/valarray
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/valarray?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/valarray (original)
+++ incubator/stdcxx/branches/4.2.0/include/valarray Fri Sep 28 13:55:52 2007
@@ -23,7 +23,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2007 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -1196,7 +1196,7 @@
template<class _TypeT>
inline valarray<_TypeT> atan2 (const valarray<_TypeT> &__x, const _TypeT &__y)
{
- _RW::__rw_array<_TypeT> __tmp (__x.size ());
+ _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __x.size ());
for (_RWSTD_SIZE_T __i = 0; __i != __tmp.size (); ++__i)
__tmp [__i] = _RWSTD_C::atan2 (__x [__i], __y);
@@ -1207,7 +1207,7 @@
template<class _TypeT>
inline valarray<_TypeT> atan2 (const _TypeT &__x, const valarray<_TypeT> &__y)
{
- _RW::__rw_array<_TypeT> __tmp (__y.size ());
+ _RW::__rw_array<_TypeT> __tmp (_TypeT (0), __y.size ());
for (_RWSTD_SIZE_T __i = 0; __i != __tmp.size (); ++__i)
__tmp [__i] = _RWSTD_C::atan2 (__x, __y [__i]);
@@ -1298,7 +1298,7 @@
slice_array (const slice_array &__rhs)
: _C_array(__rhs.get_ref_mem_array()),
- _C_slice(__rhs.get_slice())
+ _C_slice(__rhs._C_get_slice())
{ }
// implementation
@@ -1311,7 +1311,7 @@
return _C_array;
}
- slice get_slice () const {
+ slice _C_get_slice () const {
return _C_slice;
}
@@ -1464,7 +1464,7 @@
gslice_array (const gslice_array<value_type>& __rhs)
: _C_array (__rhs.get_ref_mem_array ()),
- _C_slice (__rhs.get_slice ())
+ _C_slice (__rhs._C_get_slice ())
{ }
gslice_array (_RW::__rw_array<value_type>* __a, const gslice & __s)
@@ -1478,7 +1478,7 @@
return _C_array;
}
- gslice get_slice () const {
+ gslice _C_get_slice () const {
return _C_slice;
}
@@ -1517,7 +1517,7 @@
mask_array (const mask_array<value_type> &__rhs)
: _C_array (__rhs.get_ref_mem_array ()),
- _C_valarray (__rhs.get_array ())
+ _C_valarray (__rhs._C_get_array ())
{ }
mask_array (_RW::__rw_array<value_type> *__a, const valarray<bool>& __val)
@@ -1529,11 +1529,11 @@
return _C_array;
}
- valarray<bool> get_array () const {
+ valarray<bool> _C_get_array () const {
return _C_valarray;
}
- const valarray<bool>* get_array_pt () const {
+ const valarray<bool>* _C_get_array_ptr () const {
return &_C_valarray;
}
@@ -1624,7 +1624,7 @@
indirect_array (const indirect_array<value_type>& __sl)
:_C_array (__sl.get_ref_mem_array ()),
- _C_valarray (__sl.get_array ())
+ _C_valarray (__sl._C_get_array ())
{ }
indirect_array (_RW::__rw_array<value_type> *__a,
@@ -1637,11 +1637,11 @@
return _C_array;
}
- valarray<_RWSTD_SIZE_T> get_array () const {
+ valarray<_RWSTD_SIZE_T> _C_get_array () const {
return _C_valarray;
}
- const valarray<_RWSTD_SIZE_T>* get_array_pt () const {
+ const valarray<_RWSTD_SIZE_T>* _C_get_array_ptr () const {
return &_C_valarray;
}
@@ -1734,7 +1734,7 @@
{
_RWSTD_ASSERT (0 != __lhs.get_ref_mem_array ());
- _STD::slice __slice = __lhs.get_slice ();
+ _STD::slice __slice = __lhs._C_get_slice ();
_RW::__rw_array<_TypeT> &__ar = *__lhs.get_ref_mem_array ();
for (_RWSTD_SIZE_T __i = __slice.start (), __j = 0;
@@ -1754,7 +1754,7 @@
{
_RWSTD_ASSERT (0 != __lhs.get_ref_mem_array ());
- _STD::slice __slice = __lhs.get_slice ();
+ _STD::slice __slice = __lhs._C_get_slice ();
_RW::__rw_array<_TypeT> &__ar = *__lhs.get_ref_mem_array ();
for (_RWSTD_SIZE_T __i = __slice.start (), __j = 0;
@@ -1775,7 +1775,7 @@
_RWSTD_ASSERT (0 != __lhs.get_ref_mem_array ());
_RW::__rw_array<_TypeT> &__ar = *__lhs.get_ref_mem_array ();
- const _STD::valarray<bool> &__vlray = *__lhs.get_array_pt ();
+ const _STD::valarray<bool> &__vlray = *__lhs._C_get_array_ptr ();
for (_RWSTD_SIZE_T __i = 0, __j = 0; __i != __vlray.size (); ++__i)
if (__vlray [__i])
@@ -1792,7 +1792,7 @@
_RWSTD_ASSERT (0 != __lhs.get_ref_mem_array ());
_RW::__rw_array<_TypeT> &__ar = *__lhs.get_ref_mem_array ();
- const _STD::valarray<bool> &__vlray = *__lhs.get_array_pt ();
+ const _STD::valarray<bool> &__vlray = *__lhs._C_get_array_ptr ();
for (_RWSTD_SIZE_T __i = 0, __j = 0; __i != __vlray.size (); ++__i)
if (__vlray [__i])
@@ -1809,7 +1809,7 @@
_RWSTD_ASSERT (0 != __lhs.get_ref_mem_array ());
_RW::__rw_array<_TypeT> &__ar = *__lhs.get_ref_mem_array ();
- const _STD::valarray<_RWSTD_SIZE_T> &__vlray = *__lhs.get_array_pt ();
+ const _STD::valarray<_RWSTD_SIZE_T> &__vlray = *__lhs._C_get_array_ptr ();
for (_RWSTD_SIZE_T __i = 0; __i != __vlray.size (); ++__i)
__ar [__vlray [__i]] = __fun (__rhs [__i]);
@@ -1826,7 +1826,7 @@
_RWSTD_ASSERT (0 != __lhs.get_ref_mem_array ());
_RW::__rw_array<_TypeT> &__ar = *__lhs.get_ref_mem_array ();
- const _STD::valarray<_RWSTD_SIZE_T> &__vlray = *__lhs.get_array_pt ();
+ const _STD::valarray<_RWSTD_SIZE_T> &__vlray = *__lhs._C_get_array_ptr ();
for (_RWSTD_SIZE_T __i = 0; __i != __vlray.size (); ++__i)
__ar [__vlray [__i]] = __fun (__ar [__vlray [__i]], __rhs [__i]);
@@ -2034,6 +2034,9 @@
inline _RWSTD_SIZE_T gslice::ind_numb() const
{
+ if (_C_length.size () == 0)
+ return 0;
+
_RWSTD_SIZE_T __inx = 1;
for(_RWSTD_SIZE_T __i = 0; __i < _C_length.size (); ++__i)
@@ -2074,15 +2077,15 @@
inline valarray<_TypeT>::valarray (const slice_array<_TypeT>& sl_ar)
{
_RW::__rw_array <_TypeT> __tmp =
- _RW::__rw_array <_TypeT>(_TypeT (), sl_ar.get_slice ().size());
+ _RW::__rw_array <_TypeT>(_TypeT (), sl_ar._C_get_slice ().size());
- _RWSTD_SIZE_T __i = sl_ar.get_slice().start();
+ _RWSTD_SIZE_T __i = sl_ar._C_get_slice().start();
_RWSTD_SIZE_T __cpt = 0;
- while( __cpt < sl_ar.get_slice().size() )
+ while( __cpt < sl_ar._C_get_slice().size() )
{
__tmp[__cpt] = (*(sl_ar.get_ref_mem_array()))[__i];
- __i+= sl_ar.get_slice().stride();
+ __i+= sl_ar._C_get_slice().stride();
__cpt++;
}
@@ -2095,15 +2098,15 @@
valarray<_TypeT>::operator= (const slice_array<_TypeT>& sl_ar)
{
_RW::__rw_array <_TypeT> __tmp =
- _RW::__rw_array <_TypeT>(_TypeT (), sl_ar.get_slice ().size());
+ _RW::__rw_array <_TypeT>(_TypeT (), sl_ar._C_get_slice ().size());
- _RWSTD_SIZE_T __i = sl_ar.get_slice().start();
+ _RWSTD_SIZE_T __i = sl_ar._C_get_slice().start();
_RWSTD_SIZE_T __cpt = 0;
- while( __cpt < sl_ar.get_slice().size() )
+ while( __cpt < sl_ar._C_get_slice().size() )
{
__tmp[__cpt] = (*(sl_ar.get_ref_mem_array()))[__i];
- __i+= sl_ar.get_slice().stride();
+ __i+= sl_ar._C_get_slice().stride();
__cpt++;
}
@@ -2141,18 +2144,18 @@
template <class _TypeT>
inline valarray<_TypeT>::valarray(const gslice_array<_TypeT>& sl_ar)
{
- gslice sl(sl_ar.get_slice());
+ gslice __sl(sl_ar._C_get_slice());
_RW::__rw_array <_TypeT> __tmp =
- _RW::__rw_array <_TypeT>(_TypeT (), sl.ind_numb());
+ _RW::__rw_array <_TypeT>(_TypeT (), __sl.ind_numb());
- _RWSTD_SIZE_T __i = sl.next_ind();
+ _RWSTD_SIZE_T __i = __sl.next_ind();
_RWSTD_SIZE_T __cpt = 0;
- while( !sl.is_reseted() )
+ while( !__sl.is_reseted() )
{
__tmp[__cpt] = (*(sl_ar.get_ref_mem_array()))[__i];
- __i= sl.next_ind();
+ __i= __sl.next_ind();
__cpt++;
}
@@ -2164,18 +2167,18 @@
inline valarray<_TypeT>&
valarray<_TypeT>::operator= (const gslice_array<_TypeT>& sl_ar)
{
- gslice sl(sl_ar.get_slice());
+ gslice __sl(sl_ar._C_get_slice());
_RW::__rw_array <_TypeT> __tmp =
- _RW::__rw_array <_TypeT>(_TypeT (), sl.ind_numb());
+ _RW::__rw_array <_TypeT>(_TypeT (), __sl.ind_numb());
- _RWSTD_SIZE_T __i = sl.next_ind();
+ _RWSTD_SIZE_T __i = __sl.next_ind();
_RWSTD_SIZE_T __cpt = 0;
- while( !sl.is_reseted() )
+ while( !__sl.is_reseted() )
{
__tmp[__cpt] = (*(sl_ar.get_ref_mem_array()))[__i];
- __i= sl.next_ind();
+ __i= __sl.next_ind();
__cpt++;
}
@@ -2212,20 +2215,20 @@
inline valarray<_TypeT>::valarray(const mask_array<_TypeT>& __rhs)
{
- mask_array<_TypeT> *msk = _RWSTD_CONST_CAST (mask_array<_TypeT>*, &__rhs);
- const valarray<bool>*sec = msk->get_array_pt();
+ mask_array<_TypeT> *__msk = _RWSTD_CONST_CAST (mask_array<_TypeT>*, &__rhs);
+ const valarray<bool>*__sec = __msk->_C_get_array_ptr();
_RWSTD_SIZE_T __i, __n = 0;
- for(__i = 0; __i < sec->size(); __i++)
- if ( (*sec)[__i]) __n++;
+ for(__i = 0; __i < __sec->size(); __i++)
+ if ( (*__sec)[__i]) __n++;
_RW::__rw_array <_TypeT> __tmp = _RW::__rw_array <_TypeT>(_TypeT (), __n);
_RWSTD_SIZE_T __cpt = 0;
- for( __i=0; __i < sec->size(); __i++ )
- if ( (*sec)[__i]) __tmp[__cpt++] = (*(__rhs.get_ref_mem_array()))[__i];
+ for( __i=0; __i < __sec->size(); __i++ )
+ if ( (*__sec)[__i]) __tmp[__cpt++] = (*(__rhs.get_ref_mem_array()))[__i];
_C_array.swap (__tmp);
}
@@ -2235,21 +2238,21 @@
inline valarray<_TypeT>&
valarray<_TypeT>::operator= (const mask_array<_TypeT>& __rhs)
{
- mask_array<_TypeT> *msk = _RWSTD_CONST_CAST (mask_array<_TypeT>*, &__rhs);
- const valarray<bool>*sec = msk->get_array_pt();
+ mask_array<_TypeT> *__msk = _RWSTD_CONST_CAST (mask_array<_TypeT>*, &__rhs);
+ const valarray<bool>*__sec = __msk->_C_get_array_ptr();
_RWSTD_SIZE_T __i, __n = 0;
- for (__i = 0; __i < sec->size(); __i++)
- if ((*sec)[__i])
+ for (__i = 0; __i < __sec->size(); __i++)
+ if ((*__sec)[__i])
__n++;
_RW::__rw_array <_TypeT> __tmp = _RW::__rw_array <_TypeT>(_TypeT (), __n);
_RWSTD_SIZE_T __cpt = 0;
- for( __i=0; __i < sec->size(); __i++ )
- if ( (*sec)[__i]) __tmp[__cpt++] = (*(__rhs.get_ref_mem_array()))[__i];
+ for( __i=0; __i < __sec->size(); __i++ )
+ if ( (*__sec)[__i]) __tmp[__cpt++] = (*(__rhs.get_ref_mem_array()))[__i];
if ( &_C_array == __rhs.get_ref_mem_array() )
_C_array.resize(0);
@@ -2291,7 +2294,7 @@
indirect_array<_TypeT> *__ia =
_RWSTD_CONST_CAST (indirect_array<_TypeT>*, &__rhs);
- const valarray<_RWSTD_SIZE_T> *__sec = __ia->get_array_pt();
+ const valarray<_RWSTD_SIZE_T> *__sec = __ia->_C_get_array_ptr();
_RW::__rw_array <_TypeT> __tmp =
_RW::__rw_array <_TypeT>(_TypeT (), __sec->size());
@@ -2312,7 +2315,7 @@
indirect_array<_TypeT> *__ia =
_RWSTD_CONST_CAST (indirect_array<_TypeT>*, &__rhs);
- const valarray<_RWSTD_SIZE_T> *__sec = __ia->get_array_pt();
+ const valarray<_RWSTD_SIZE_T> *__sec = __ia->_C_get_array_ptr();
_RW::__rw_array <_TypeT> __tmp =
_RW::__rw_array <_TypeT>(_TypeT (), __sec->size());
Modified: incubator/stdcxx/branches/4.2.0/include/valarray.c
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/valarray.c?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/valarray.c (original)
+++ incubator/stdcxx/branches/4.2.0/include/valarray.c Fri Sep 28 13:55:52 2007
@@ -2,20 +2,27 @@
*
* valarray.c
*
- * $Id: //stdlib/dev/include/valarray.c#9 $
+ * $Id$
*
***************************************************************************
*
- * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave
- * Software division. 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. 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.
+ * 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
+ *
+ * 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.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
*
**************************************************************************/
Modified: incubator/stdcxx/branches/4.2.0/include/vector
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/vector?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/vector (original)
+++ incubator/stdcxx/branches/4.2.0/include/vector Fri Sep 28 13:55:52 2007
@@ -23,7 +23,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 1994-2006 Rogue Wave Software.
+ * Copyright 1994-2007 Rogue Wave Software, Inc.
*
***************************************************************************
*
@@ -843,10 +843,17 @@
// On Sun, gcc 3.1 does generate an incorrect copy constructor
// that has as an effect an incompletely/incorrectly initialized
// iterator.
-#if defined (__sun__) && defined (__GNUG__)
+#if defined (__sun__) && defined (__GNUG__) \
+ || defined (__SUNPRO_CC) && defined (__amd64__)
+
+ // working around a gcc 3.1 bug on Solaris where the compiler
+ // generates bad code for the implicitly defined copy ctor
+ // also working around a Sun C++ 5.9 optimizer ICE on x86_64
+ // in wide (64-bit) mode (see STDCXX-551)
+
_C_iter (const _C_iter& __it)
: _C_p (__it._C_p), _C_offset (__it._C_offset) {}
-#endif // __GNUG__
+#endif // gcc 3.1/Solaris || Sun C++ 5.9/x86_64
void operator++ () {
if (_C_offset++ == _RWSTD_WORD_BIT - 1) {
Modified: incubator/stdcxx/branches/4.2.0/include/vector.c
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.0/include/vector.c?rev=580483&r1=580482&r2=580483&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.0/include/vector.c (original)
+++ incubator/stdcxx/branches/4.2.0/include/vector.c Fri Sep 28 13:55:52 2007
@@ -2,20 +2,27 @@
*
* vector.c
*
- * $Id: //stdlib/dev/include/vector.c#9 $
+ * $Id$
*
***************************************************************************
*
- * Copyright (c) 1994-2005 Quovadx, Inc., acting through its Rogue Wave
- * Software division. 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. 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.
+ * 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
+ *
+ * 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.
+ *
+ * Copyright 1994-2006 Rogue Wave Software.
*
**************************************************************************/