Fix warnings on FreeBSD
[oweals/cde.git] / cde / programs / ttsnoop / ttsnoop_stubs.C.src
index 3abc2eb021bc25c6fc9da2f29c61aaebcd0f169b..ce7305275722ef58ee0ee4db6f4bae61fe08d3d9 100644 (file)
@@ -37,7 +37,7 @@
 
 #include <unistd.h>
 
-#if defined(linux)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
 #include <fstream>
 #include <strstream>
 #else
@@ -50,7 +50,7 @@
 
 extern "C" { const char *_tt_lib_version; };
 
-extern ofstream                snoopStream;
+extern std::ofstream   snoopStream;
 extern unsigned int    globalSaveLines;
 extern char *          traceScript;
 extern const char *    globalVersionString;
@@ -93,7 +93,7 @@ fork_tttrace(
     
     /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
     DtbTtsnoopTtsnoopWinInfo instance = (DtbTtsnoopTtsnoopWinInfo)clientData;
-    ostrstream tttraceCmd;
+    std::ostrstream tttraceCmd;
     tttraceCmd << "unset TT_TRACE_SCRIPT; dtterm -sb -sl ";
     tttraceCmd << globalSaveLines;
     tttraceCmd << " -title tttrace -geometry 120x24 -e tttrace &";
@@ -659,7 +659,7 @@ libcPause(
     
     /*** DTB_USER_CODE_START vvv Add C code below vvv ***/
     DtbTtsnoopTtsnoopWinInfo instance = (DtbTtsnoopTtsnoopWinInfo)clientData;
-    ostrstream advice;
+    std::ostrstream advice;
     advice << "pause(); /* kill -CONT " << getpid() << " */";
     DtTtSetLabel( instance->ttsnoopWin_label, advice.str() );
     delete advice.str();
@@ -667,7 +667,7 @@ libcPause(
     //
     // run "(if dterror.ds blah blah; then kill -CONT pid; fi)&"
     //
-    ostrstream script;
+    std::ostrstream script;
     script << "(if dterror.ds ";
     // arg 1: text
     script << "\"kill -CONT " << getpid() << "\" ";
@@ -1343,7 +1343,7 @@ toggleSnooping(
     if (! tt_is_err( status )) {
            snoopPatIsRegistered = ! snoopPatIsRegistered;
     }
-    ostrstream stream;
+    std::ostrstream stream;
     stream << func << (void *)snoopPat << ")" << ends;
     DtTtSetLabel( instance->ttsnoopWin_label, stream.str(), status );
     delete stream.str();