diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 654a557cfbc..2f87bd3e68b 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,6 +1,7 @@ 2001-02-05 Benjamin Kosnik * include/bits/locale_facets.h (class moneypunct): Fix typos. + * libsupc++/pure.cc: Revert. 2001-02-05 Benjamin Kosnik diff --git a/libstdc++-v3/libsupc++/pure.cc b/libstdc++-v3/libsupc++/pure.cc index e4f14d31b94..7ada0666856 100644 --- a/libstdc++-v3/libsupc++/pure.cc +++ b/libstdc++-v3/libsupc++/pure.cc @@ -1,5 +1,5 @@ // -*- C++ -*- -// Copyright (C) 2000, 2001 Free Software Foundation +// Copyright (C) 2000 Free Software Foundation // // This file is part of GNU CC. // @@ -28,7 +28,19 @@ // the GNU General Public License. #include -#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" { @@ -45,9 +57,8 @@ extern void __terminate(void) __attribute__ ((__noreturn__)); void PURE_VIRTUAL_NAME (void) { - std::fputs ("pure virtual method called\n", stderr); + writestr ("pure virtual method called\n"); __terminate (); } } -