aboutsummaryrefslogtreecommitdiff
path: root/libstdc++/pure.c
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++/pure.c')
-rw-r--r--libstdc++/pure.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/libstdc++/pure.c b/libstdc++/pure.c
new file mode 100644
index 0000000..abaed59
--- /dev/null
+++ b/libstdc++/pure.c
@@ -0,0 +1,16 @@
+#include <stdio.h>
+
+#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
+
+#define MESSAGE "pure virtual method called\n"
+
+void
+__pure_virtual (void)
+{
+ write (2, MESSAGE, sizeof (MESSAGE) - 1);
+ __terminate ();
+}