use #if instead of #ifdef
[catagits/fcgi2.git] / examples / echo-cpp.cpp
index 697e529..e6fd8f9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *  A simple FastCGI application example in C++.
  *
- *  $Id: echo-cpp.cpp,v 1.8 2002/02/01 19:43:27 robs Exp $
+ *  $Id: echo-cpp.cpp,v 1.10 2002/02/25 00:46:17 robs Exp $
  *
  *  Copyright (c) 2001  Rob Saccoccio and Chelsea Networks
  *  All rights reserved.
@@ -40,6 +40,8 @@ extern char ** environ;
 #include "fcgio.h"
 #include "fcgi_config.h"  // HAVE_IOSTREAM_WITHASSIGN_STREAMBUF
 
+using namespace std;
+
 // Maximum number of bytes allowed to be read from stdin
 static const unsigned long STDIN_MAX = 1000000;
 
@@ -117,7 +119,7 @@ int main (void)
         fcgi_streambuf cout_fcgi_streambuf(request.out);
         fcgi_streambuf cerr_fcgi_streambuf(request.err);
 
-#ifdef HAVE_IOSTREAM_WITHASSIGN_STREAMBUF
+#if HAVE_IOSTREAM_WITHASSIGN_STREAMBUF
         cin  = &cin_fcgi_streambuf;
         cout = &cout_fcgi_streambuf;
         cerr = &cerr_fcgi_streambuf;
@@ -159,7 +161,7 @@ int main (void)
         // have to be flushed here.
     }
 
-#ifdef HAVE_IOSTREAM_WITHASSIGN_STREAMBUF
+#if HAVE_IOSTREAM_WITHASSIGN_STREAMBUF
     cin  = cin_streambuf;
     cout = cout_streambuf;
     cerr = cerr_streambuf;