From c97ddf45a6918547799f19f55398034d75336789 Mon Sep 17 00:00:00 2001
From: pixel <pixel>
Date: Wed, 22 Jan 2003 01:33:58 +0000
Subject: Cleaning out things

---
 configure.ac      | 2 ++
 lib/Exceptions.cc | 2 +-
 lib/Input.cc      | 2 ++
 lib/Output.cc     | 4 ++++
 4 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 16554f4..04b9d60 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,6 +77,8 @@ else
   AC_MSG_ERROR([no zlib found in the system.])
 fi
 
+AC_DEFINE([HOOK_STDS], 1, [Hook the standard input/outputs])
+
 if test x$ac_cv_wd_gzwrite != xyes ; then
   AC_MSG_WARN([You have a broken zconf.h.]
               [You should patch this using]
diff --git a/lib/Exceptions.cc b/lib/Exceptions.cc
index e9c5861..43b77f1 100644
--- a/lib/Exceptions.cc
+++ b/lib/Exceptions.cc
@@ -197,7 +197,7 @@ void * Base::calloc(size_t n, size_t s) {
 
 void * Base::operator new(size_t s) {
 #ifdef DEBUG
-    cerr << "Operator new(s) called. Allocating memory.\n";
+    std::cerr << "Operator new(s) called. Allocating memory.\n";
 #endif
     return xmalloc(s);
 }
diff --git a/lib/Input.cc b/lib/Input.cc
index ee36ded..999ebab 100644
--- a/lib/Input.cc
+++ b/lib/Input.cc
@@ -85,7 +85,9 @@ off_t Input::seek(off_t offset, int whence) throw (GeneralException) {
     return itell;
 }
 
+#ifdef HOOK_STDS
 Stdin_t::Stdin_t() { }
+#endif
 
 bool Stdin_t::CanSeek() const {
     return 0;
diff --git a/lib/Output.cc b/lib/Output.cc
index 296510d..e9016f9 100644
--- a/lib/Output.cc
+++ b/lib/Output.cc
@@ -76,7 +76,9 @@ String Output::GetName() const {
     return n;
 }
 
+#ifdef HOOK_STDS
 Stdout_t::Stdout_t() {}
+#endif
 
 bool Stdout_t::CanSeek() const {
     return 0;
@@ -86,7 +88,9 @@ String Stdout_t::GetName() const {
     return "Stdout";
 }
 
+#ifdef HOOK_STDS
 Stderr_t::Stderr_t() : Handle(dup(2)) {}
+#endif
 
 bool Stderr_t::CanWrite() const {
     return 1;
-- 
cgit v1.2.3