Author: theraven
Date: Tue Mar 13 13:20:01 2012
New Revision: 232922
URL: http://svn.freebsd.org/changeset/base/232922

Log:
  Import new version of libcxxrt.
  
  Approved by:  dim (mentor)

Modified:
  vendor/libcxxrt/dist/auxhelper.cc
  vendor/libcxxrt/dist/cxxabi.h
  vendor/libcxxrt/dist/dwarf_eh.h
  vendor/libcxxrt/dist/dynamic_cast.cc
  vendor/libcxxrt/dist/exception.cc
  vendor/libcxxrt/dist/guard.cc
  vendor/libcxxrt/dist/memory.cc
  vendor/libcxxrt/dist/stdexcept.cc
  vendor/libcxxrt/dist/stdexcept.h
  vendor/libcxxrt/dist/terminate.cc
  vendor/libcxxrt/dist/typeinfo.cc
  vendor/libcxxrt/dist/typeinfo.h
  vendor/libcxxrt/dist/unwind-arm.h
  vendor/libcxxrt/dist/unwind.h

Modified: vendor/libcxxrt/dist/auxhelper.cc
==============================================================================
--- vendor/libcxxrt/dist/auxhelper.cc   Tue Mar 13 11:08:40 2012        
(r232921)
+++ vendor/libcxxrt/dist/auxhelper.cc   Tue Mar 13 13:20:01 2012        
(r232922)
@@ -1,3 +1,29 @@
+/* 
+ * Copyright 2010-2011 PathScale, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
+ * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 /**
  * aux.cc - Compiler helper functions. 
  *

Modified: vendor/libcxxrt/dist/cxxabi.h
==============================================================================
--- vendor/libcxxrt/dist/cxxabi.h       Tue Mar 13 11:08:40 2012        
(r232921)
+++ vendor/libcxxrt/dist/cxxabi.h       Tue Mar 13 13:20:01 2012        
(r232922)
@@ -1,3 +1,25 @@
+/* 
+ * Copyright 2012 David Chisnall. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */ 
+
 #ifndef __CXXABI_H_
 #define __CXXABI_H_
 #include <stdint.h>

Modified: vendor/libcxxrt/dist/dwarf_eh.h
==============================================================================
--- vendor/libcxxrt/dist/dwarf_eh.h     Tue Mar 13 11:08:40 2012        
(r232921)
+++ vendor/libcxxrt/dist/dwarf_eh.h     Tue Mar 13 13:20:01 2012        
(r232922)
@@ -1,3 +1,28 @@
+/* 
+ * Copyright 2010-2011 PathScale, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
+ * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
 /**
  * dwarf_eh.h - Defines some helper functions for parsing DWARF exception
  * handling tables.

Modified: vendor/libcxxrt/dist/dynamic_cast.cc
==============================================================================
--- vendor/libcxxrt/dist/dynamic_cast.cc        Tue Mar 13 11:08:40 2012        
(r232921)
+++ vendor/libcxxrt/dist/dynamic_cast.cc        Tue Mar 13 13:20:01 2012        
(r232922)
@@ -1,3 +1,29 @@
+/* 
+ * Copyright 2010-2011 PathScale, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
+ * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #include "typeinfo.h"
 #include <stdio.h>
 

Modified: vendor/libcxxrt/dist/exception.cc
==============================================================================
--- vendor/libcxxrt/dist/exception.cc   Tue Mar 13 11:08:40 2012        
(r232921)
+++ vendor/libcxxrt/dist/exception.cc   Tue Mar 13 13:20:01 2012        
(r232922)
@@ -1,3 +1,29 @@
+/* 
+ * Copyright 2010-2011 PathScale, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
+ * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #include <stdlib.h>
 #include <dlfcn.h>
 #include <stdio.h>
@@ -12,12 +38,6 @@
 #pragma weak pthread_setspecific
 #pragma weak pthread_getspecific
 #pragma weak pthread_once
-#pragma weak pthread_once
-#pragma weak pthread_cond_signal
-#pragma weak pthread_cond_wait
-#pragma weak pthread_mutex_lock
-#pragma weak pthread_mutex_unlock
-
 
 using namespace ABI_NAMESPACE;
 
@@ -403,10 +423,7 @@ static char *emergency_malloc(size_t siz
        // Only 4 emergency buffers allowed per thread!
        if (info->emergencyBuffersHeld > 3) { return 0; }
 
-       if (pthread_mutex_lock)
-       {
-               pthread_mutex_lock(&emergency_malloc_lock);
-       }
+       pthread_mutex_lock(&emergency_malloc_lock);
        int buffer = -1;
        while (buffer < 0)
        {
@@ -417,10 +434,7 @@ static char *emergency_malloc(size_t siz
                void *m = calloc(1, size);
                if (0 != m)
                {
-                       if (pthread_mutex_unlock)
-                       {
-                               pthread_mutex_unlock(&emergency_malloc_lock);
-                       }
+                       pthread_mutex_unlock(&emergency_malloc_lock);
                        return (char*)m;
                }
                for (int i=0 ; i<16 ; i++)
@@ -437,24 +451,10 @@ static char *emergency_malloc(size_t siz
                // of the emergency buffers.
                if (buffer < 0)
                {
-                       // If we don't have pthread_cond_wait, then there is 
only one
-                       // thread and it's already used all of the emergency 
buffers, so we
-                       // have no alternative but to die.  Calling abort() 
instead of
-                       // terminate, because terminate can throw exceptions, 
which can
-                       // bring us back here and infinite loop.
-                       if (!pthread_cond_wait)
-                       {
-                               fputs("Terminating while out of memory trying 
to throw an exception",
-                                     stderr);
-                               abort();
-                       }
                        pthread_cond_wait(&emergency_malloc_wait, 
&emergency_malloc_lock);
                }
        }
-       if (pthread_mutex_unlock)
-       {
-               pthread_mutex_unlock(&emergency_malloc_lock);
-       }
+       pthread_mutex_unlock(&emergency_malloc_lock);
        info->emergencyBuffersHeld++;
        return emergency_buffer + (1024 * buffer);
 }
@@ -487,19 +487,13 @@ static void emergency_malloc_free(char *
        memset((void*)ptr, 0, 1024);
        // Signal the condition variable to wake up any threads that are 
blocking
        // waiting for some space in the emergency buffer
-       if (pthread_mutex_lock)
-       {
-               pthread_mutex_lock(&emergency_malloc_lock);
-       }
+       pthread_mutex_lock(&emergency_malloc_lock);
        // In theory, we don't need to do this with the lock held.  In practice,
        // our array of bools will probably be updated using 32-bit or 64-bit
        // memory operations, so this update may clobber adjacent values.
        buffer_allocated[buffer] = false;
-       if (pthread_cond_signal && pthread_mutex_unlock)
-       {
-               pthread_cond_signal(&emergency_malloc_wait);
-               pthread_mutex_unlock(&emergency_malloc_lock);
-       }
+       pthread_cond_signal(&emergency_malloc_wait);
+       pthread_mutex_unlock(&emergency_malloc_lock);
 }
 
 static char *alloc_or_die(size_t size)

Modified: vendor/libcxxrt/dist/guard.cc
==============================================================================
--- vendor/libcxxrt/dist/guard.cc       Tue Mar 13 11:08:40 2012        
(r232921)
+++ vendor/libcxxrt/dist/guard.cc       Tue Mar 13 13:20:01 2012        
(r232922)
@@ -1,3 +1,29 @@
+/* 
+ * Copyright 2010-2012 PathScale, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
+ * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 /**
  * guard.cc: Functions for thread-safe static initialisation.
  *
@@ -103,6 +129,10 @@ extern "C" int __cxa_guard_acquire(volat
        // the lock at the same time.
        while (!__sync_bool_compare_and_swap_4(lock, 0, 1))
        {
+               if (1 == ((*guard_object) >> 56))
+               {
+                       break;
+               }
                sched_yield();
        }
        // We have to test the guard again, in case another thread has performed

Modified: vendor/libcxxrt/dist/memory.cc
==============================================================================
--- vendor/libcxxrt/dist/memory.cc      Tue Mar 13 11:08:40 2012        
(r232921)
+++ vendor/libcxxrt/dist/memory.cc      Tue Mar 13 13:20:01 2012        
(r232922)
@@ -1,3 +1,29 @@
+/* 
+ * Copyright 2010-2011 PathScale, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
+ * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 /**
  * memory.cc - Contains stub definition of C++ new/delete operators.
  *
@@ -11,6 +37,10 @@
 #include <stdlib.h>
 #include "stdexcept.h"
 
+#ifndef __has_builtin
+#define __has_builtin(x) 0
+#endif
+
 #if !__has_builtin(__sync_swap)
 #define __sync_swap __sync_lock_test_and_set
 #endif

Modified: vendor/libcxxrt/dist/stdexcept.cc
==============================================================================
--- vendor/libcxxrt/dist/stdexcept.cc   Tue Mar 13 11:08:40 2012        
(r232921)
+++ vendor/libcxxrt/dist/stdexcept.cc   Tue Mar 13 13:20:01 2012        
(r232922)
@@ -1,3 +1,29 @@
+/* 
+ * Copyright 2010-2011 PathScale, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
+ * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 /**
  * stdexcept.cc - provides stub implementations of the exceptions required by 
the runtime.
  */

Modified: vendor/libcxxrt/dist/stdexcept.h
==============================================================================
--- vendor/libcxxrt/dist/stdexcept.h    Tue Mar 13 11:08:40 2012        
(r232921)
+++ vendor/libcxxrt/dist/stdexcept.h    Tue Mar 13 13:20:01 2012        
(r232922)
@@ -1,3 +1,29 @@
+/* 
+ * Copyright 2010-2011 PathScale, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
+ * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 /**
  * stdexcept.h - provides a stub version of <stdexcept>, which defines enough
  * of the exceptions for the runtime to use.  

Modified: vendor/libcxxrt/dist/terminate.cc
==============================================================================
--- vendor/libcxxrt/dist/terminate.cc   Tue Mar 13 11:08:40 2012        
(r232921)
+++ vendor/libcxxrt/dist/terminate.cc   Tue Mar 13 13:20:01 2012        
(r232922)
@@ -1,3 +1,29 @@
+/* 
+ * Copyright 2010-2011 PathScale, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
+ * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #include <stdlib.h>
 
 namespace std

Modified: vendor/libcxxrt/dist/typeinfo.cc
==============================================================================
--- vendor/libcxxrt/dist/typeinfo.cc    Tue Mar 13 11:08:40 2012        
(r232921)
+++ vendor/libcxxrt/dist/typeinfo.cc    Tue Mar 13 13:20:01 2012        
(r232922)
@@ -1,3 +1,29 @@
+/* 
+ * Copyright 2010-2012 PathScale, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
+ * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #include "typeinfo.h"
 #include <string.h>
 #include <stdlib.h>
@@ -65,18 +91,30 @@ extern "C" char* __cxa_demangle(const ch
                {
                        memcpy(buf, demangled, len);
                        buf[len] = 0;
-                       *n = len;
-                       *status = 0;
+                       if (n)
+                       {
+                               *n = len;
+                       }
+                       if (status)
+                       {
+                               *status = 0;
+                       }
                }
                else
                {
-                       *status = -1;
+                       if (status)
+                       {
+                               *status = -1;
+                       }
                }
                free(demangled);
        }
        else
        {
-               *status = -2;
+               if (status)
+               {
+                       *status = -2;
+               }
                return NULL;
        }
        return buf;

Modified: vendor/libcxxrt/dist/typeinfo.h
==============================================================================
--- vendor/libcxxrt/dist/typeinfo.h     Tue Mar 13 11:08:40 2012        
(r232921)
+++ vendor/libcxxrt/dist/typeinfo.h     Tue Mar 13 13:20:01 2012        
(r232922)
@@ -1,3 +1,29 @@
+/* 
+ * Copyright 2010-2011 PathScale, Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ *    this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ *    this list of conditions and the following disclaimer in the documentation
+ *    and/or other materials provided with the distribution.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
+ * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
 #include <stddef.h>
 #include "abi_namespace.h"
 #include "typeinfo"

Modified: vendor/libcxxrt/dist/unwind-arm.h
==============================================================================
--- vendor/libcxxrt/dist/unwind-arm.h   Tue Mar 13 11:08:40 2012        
(r232921)
+++ vendor/libcxxrt/dist/unwind-arm.h   Tue Mar 13 13:20:01 2012        
(r232922)
@@ -1,3 +1,25 @@
+/* 
+ * Copyright 2012 David Chisnall. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */ 
+
 /**
  * ARM-specific unwind definitions.  These are taken from the ARM EHABI
  * specification.

Modified: vendor/libcxxrt/dist/unwind.h
==============================================================================
--- vendor/libcxxrt/dist/unwind.h       Tue Mar 13 11:08:40 2012        
(r232921)
+++ vendor/libcxxrt/dist/unwind.h       Tue Mar 13 13:20:01 2012        
(r232922)
@@ -1,3 +1,25 @@
+/* 
+ * Copyright 2012 David Chisnall. All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ * 
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+ * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+ * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */ 
+
 #ifndef UNWIND_H_INCLUDED
 #define UNWIND_H_INCLUDED
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to