* libsupc++/Makefile.am (sources): Add guard.cc.
* libsupc++/Makefile.in: Regenerated.
* libsupc++/cxxabi.h (__cxa_guard_acquire): New function.
(__cxa_guard_release): Likewise.
(__cxa_guard_abort): Likewise.
* libsupc++/guard.cc: New file.
From-SVN: r59475
+2002-11-25 Mark Mitchell <mark@codesourcery.com>
+
+ * libsupc++/Makefile.am (sources): Add guard.cc.
+ * libsupc++/Makefile.in: Regenerated.
+ * libsupc++/cxxabi.h (__cxa_guard_acquire): New function.
+ (__cxa_guard_release): Likewise.
+ (__cxa_guard_abort): Likewise.
+ * libsupc++/guard.cc: New file.
+
2002-11-25 Wolfgang Bangerth <bangerth@ticam.utexas.edu>
* include/std/std_complex.h
eh_terminate.cc \
eh_throw.cc \
eh_type.cc \
+ guard.cc \
new_handler.cc \
new_op.cc \
new_opnt.cc \
eh_terminate.cc \
eh_throw.cc \
eh_type.cc \
+ guard.cc \
new_handler.cc \
new_op.cc \
new_opnt.cc \
libsupc__convenience_la_OBJECTS = del_op.lo del_opnt.lo del_opv.lo \
del_opvnt.lo eh_alloc.lo eh_aux_runtime.lo eh_catch.lo eh_exception.lo \
eh_globals.lo eh_personality.lo eh_terminate.lo eh_throw.lo eh_type.lo \
-new_handler.lo new_op.lo new_opnt.lo new_opv.lo new_opvnt.lo pure.lo \
-tinfo.lo tinfo2.lo vec.lo cxa_demangle.lo dyn-string.lo
+guard.lo new_handler.lo new_op.lo new_opnt.lo new_opv.lo new_opvnt.lo \
+pure.lo tinfo.lo tinfo2.lo vec.lo cxa_demangle.lo dyn-string.lo
libsupc___la_LDFLAGS =
libsupc___la_LIBADD =
libsupc___la_OBJECTS = del_op.lo del_opnt.lo del_opv.lo del_opvnt.lo \
eh_alloc.lo eh_aux_runtime.lo eh_catch.lo eh_exception.lo eh_globals.lo \
-eh_personality.lo eh_terminate.lo eh_throw.lo eh_type.lo new_handler.lo \
-new_op.lo new_opnt.lo new_opv.lo new_opvnt.lo pure.lo tinfo.lo \
-tinfo2.lo vec.lo cxa_demangle.lo dyn-string.lo
+eh_personality.lo eh_terminate.lo eh_throw.lo eh_type.lo guard.lo \
+new_handler.lo new_op.lo new_opnt.lo new_opv.lo new_opvnt.lo pure.lo \
+tinfo.lo tinfo2.lo vec.lo cxa_demangle.lo dyn-string.lo
CXXFLAGS = @CXXFLAGS@
CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
__SIZE_TYPE__ __padding_size,
void (*__destructor) (void *),
void (*__dealloc) (void *, __SIZE_TYPE__));
+
+/* guard variables */
+
+/* The ABI requires a 64-bit type. */
+__extension__ typedef int __guard __attribute__((mode (__DI__)));
+
+extern "C"
+int __cxa_guard_acquire (__guard *);
+
+extern "C"
+void __cxa_guard_release (__guard *);
+
+extern "C"
+void __cxa_guard_abort (__guard *);
/* demangling routines */
--- /dev/null
+// Copyright (C) 2002 Free Software Foundation, Inc.
+//
+// This file is part of GCC.
+//
+// GCC is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// GCC is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License
+// along with GCC; see the file COPYING. If not, write to
+// the Free Software Foundation, 59 Temple Place - Suite 330,
+// Boston, MA 02111-1307, USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// Written by Mark Mitchell, CodeSourcery LLC, <mark@codesourcery.com>
+
+#include <cxxabi.h>
+
+namespace __cxxabiv1
+{
+ extern "C"
+ int __cxa_guard_acquire (__guard *g)
+ {
+ return !*(char *)(g);
+ }
+
+ extern "C"
+ void __cxa_guard_release (__guard *g)
+ {
+ *(char *)g = 1;
+ }
+
+ extern "C"
+ void __cxa_guard_abort (__guard *)
+ {
+ }
+}