diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 2e7c3442cf1..b2d9121c150 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2000-10-09 Richard Henderson + + * libsupc++/pure.cc: New file. + * libsupc++/Makefile.am (INCLUDES): Add top_builddir. + (sources): Add pure.cc. + * libsupc++/Makefile.in: Regenerate. + 2000-10-09 Benjamin Kosnik * docs/configopts.html: Edit. diff --git a/libstdc++-v3/libsupc++/Makefile.am b/libstdc++-v3/libsupc++/Makefile.am index 87693567137..fe6ecea62a8 100644 --- a/libstdc++-v3/libsupc++/Makefile.am +++ b/libstdc++-v3/libsupc++/Makefile.am @@ -47,7 +47,7 @@ LIBSUPCXX_INCLUDES = -I$(top_srcdir)/libsupc++/include INCLUDES = \ -I$(top_srcdir)/../gcc -I$(top_srcdir)/../include \ $(LIBSUPCXX_INCLUDES) -I$(GLIBCPP_INCLUDES) \ - $(CONFIG_INCLUDES) + $(CONFIG_INCLUDES) -I$(top_builddir) headers = \ include/cxxabi.h \ @@ -67,6 +67,7 @@ sources = \ new_opnt.cc \ new_opv.cc \ new_opvnt.cc \ + pure.cc \ tinfo.cc \ tinfo2.cc \ vec.cc diff --git a/libstdc++-v3/libsupc++/Makefile.in b/libstdc++-v3/libsupc++/Makefile.in index 526843b1bec..4a71cdb20e4 100644 --- a/libstdc++-v3/libsupc++/Makefile.in +++ b/libstdc++-v3/libsupc++/Makefile.in @@ -115,13 +115,13 @@ noinst_LTLIBRARIES = libsupc++convenience.la LIBSUPCXX_INCLUDES = -I$(top_srcdir)/libsupc++/include -INCLUDES = -I$(top_srcdir)/../gcc -I$(top_srcdir)/../include $(LIBSUPCXX_INCLUDES) -I$(GLIBCPP_INCLUDES) $(CONFIG_INCLUDES) +INCLUDES = -I$(top_srcdir)/../gcc -I$(top_srcdir)/../include $(LIBSUPCXX_INCLUDES) -I$(GLIBCPP_INCLUDES) $(CONFIG_INCLUDES) -I$(top_builddir) headers = include/cxxabi.h include/exception include/new include/new.h include/typeinfo -sources = del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc exception.cc new_handler.cc new_op.cc new_opnt.cc new_opv.cc new_opvnt.cc tinfo.cc tinfo2.cc vec.cc +sources = del_op.cc del_opnt.cc del_opv.cc del_opvnt.cc exception.cc new_handler.cc new_op.cc new_opnt.cc new_opv.cc new_opvnt.cc pure.cc tinfo.cc tinfo2.cc vec.cc libsupc___la_SOURCES = $(sources) @@ -169,12 +169,12 @@ libsupc__convenience_la_LDFLAGS = libsupc__convenience_la_LIBADD = libsupc__convenience_la_OBJECTS = del_op.lo del_opnt.lo del_opv.lo \ del_opvnt.lo exception.lo new_handler.lo new_op.lo new_opnt.lo \ -new_opv.lo new_opvnt.lo tinfo.lo tinfo2.lo vec.lo +new_opv.lo new_opvnt.lo pure.lo tinfo.lo tinfo2.lo vec.lo libsupc___la_LDFLAGS = libsupc___la_LIBADD = libsupc___la_OBJECTS = del_op.lo del_opnt.lo del_opv.lo del_opvnt.lo \ exception.lo new_handler.lo new_op.lo new_opnt.lo new_opv.lo \ -new_opvnt.lo tinfo.lo tinfo2.lo vec.lo +new_opvnt.lo pure.lo tinfo.lo tinfo2.lo vec.lo CXXFLAGS = @CXXFLAGS@ CXXLD = $(CXX) DIST_COMMON = Makefile.am Makefile.in configure configure.in diff --git a/libstdc++-v3/libsupc++/pure.cc b/libstdc++-v3/libsupc++/pure.cc new file mode 100644 index 00000000000..56e2f06da8c --- /dev/null +++ b/libstdc++-v3/libsupc++/pure.cc @@ -0,0 +1,27 @@ +#include + +#ifdef _GLIBCPP_HAVE_UNISTD_H +#include +#define writestr(str) write(2, str, sizeof(str) - 1) +#ifdef __GNU_LIBRARY__ + /* Avoid forcing the library's meaning of `write' on the user program + by using the "internal" name (for use within the library). */ +#define write(fd, buf, n) __write((fd), (buf), (n)) +#endif +#else +#include +#define writestr(str) fputs(str, stderr) +#endif + +extern "C" { + +extern void __terminate(void) __attribute__ ((__noreturn__)); + +void +__pure_virtual (void) +{ + writestr ("pure virtual method called\n"); + __terminate (); +} + +}