Fix warnings on FreeBSD
[oweals/cde.git] / cde / programs / ttsnoop / ttsnoop.C.src
index e63e20684bde4c86b9e675b5c16a67ed73ac48b5..fc1495b1b2a22479acab40607ebc5bc48a54abee 100644 (file)
@@ -63,7 +63,7 @@
 #include <sys/stat.h>
 #include <time.h>
 
-#if defined(linux)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
 #include <iostream>
 #include <strstream>
 #include <fstream>
@@ -112,8 +112,8 @@ unsigned int        snoopedArgsCount        = 0;
 char *         optTraceScript          = 0;
 String         apiTracerArgv[ 10 ];
 String         snooperArgv[ 10 ];
-ostrstream     tttraceCmd;
-ofstream       snoopStream;
+std::ostrstream        tttraceCmd;
+std::ofstream  snoopStream;
 
 // Xt squats on -tf ?! XXX
 const char Usage[] =
@@ -196,7 +196,7 @@ signalHandler(
        }
 }
 
-#if defined(SVR4) || defined(aix) || defined(hpux) || defined(__osf__) || defined(linux)
+#if defined(SVR4) || defined(aix) || defined(hpux) || defined(__linux__) || defined(CSRG_BASED)
 #if !defined(SIG_PF)
 typedef void (*sig_pf_t)(int);
 #define SIG_PF sig_pf_t
@@ -208,7 +208,7 @@ _tt_sigset(
        int     sig,
        SIG_PF  handler )
 {
-#if defined(hpux) || defined(linux)
+#if defined(hpux) || defined(__linux__) || defined(CSRG_BASED)
        struct sigaction act;
        act.sa_handler = handler;
        sigemptyset(&act.sa_mask);
@@ -340,8 +340,8 @@ main(int argc, char **argv)
     XtAppContext       app;
     Atom               save_yourself_atom;
 
-    Pixmap     icon_pixmap = NULL;
-    Pixmap     icon_mask_pixmap = NULL;
+    Pixmap     icon_pixmap = 0;
+    Pixmap     icon_mask_pixmap = 0;
     
     /**************************************************************************
      *** DTB_USER_CODE_START
@@ -670,7 +670,7 @@ main(int argc, char **argv)
     }
     Tt_status status;
     snoopStream.open( snoopFile, ios::app );
-    ostrstream envStr;
+    std::ostrstream envStr;
     envStr << "TT_TRACE_SCRIPT=> ";
     envStr << traceFile << ends;
     traceScript = envStr.str();
@@ -766,7 +766,7 @@ main(int argc, char **argv)
                  snoopPatIsRegistered ? "Off" : "On" );
     if (optMapOnOutput) {
            XtVaSetValues( dtb_ttsnoop_ttsnoop_win.ttsnoopPane,
-                          DtNmapOnOutput, optMapOnOutput, 0 );
+                          DtNmapOnOutput, optMapOnOutput, NULL );
     }
     installSignalHandler();