Fix warnings on FreeBSD
[oweals/cde.git] / cde / programs / ttsnoop / fileChooser_stubs.C.src
index bb8c461484445e2b5b727e54cd0e04c0b458e85f..8e21b587ada38b2441a4f944308dfcdf01f5b44a 100644 (file)
@@ -39,7 +39,7 @@
 #include <sys/wait.h>
 #include <Xm/TextF.h>
 
-#if defined(linux)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
 #include <fstream>
 #include <strstream>
 #else
@@ -61,7 +61,7 @@ extern XtPointer _XmStringUngenerate (XmString string,
                         XmTextType output_type);
 }
 
-extern ofstream snoopStream;
+extern std::ofstream snoopStream;
 extern int     globalTimeout;
 
 typedef struct _FileChooserInfo {
@@ -137,15 +137,15 @@ _DtFileChooserSet(
                        instance, dtb_ttsnoop_ttsnoop_win.ttsnoopWin );
        }
        XmString okXmString = XmStringCreateLocalized( okString );
-       XtVaSetValues( instance->fchooser, XmNokLabelString, okXmString, 0 );
+       XtVaSetValues( instance->fchooser, XmNokLabelString, okXmString, NULL );
        XmStringFree( okXmString );
-       XtVaSetValues( instance->fchooser_shell, XmNtitle, title, 0 );
+       XtVaSetValues( instance->fchooser_shell, XmNtitle, title, NULL );
 
        // Remember dialog mode, entity
        FileChooserInfo *info = new FileChooserInfo;
        info->choice = choice;
        info->entity = entity;
-       XtVaSetValues( instance->fchooser, XmNuserData, info, 0 );
+       XtVaSetValues( instance->fchooser, XmNuserData, info, NULL );
 
        XtManageChild( instance->fchooser );
 }
@@ -214,10 +214,10 @@ fileOkayed(
            path = 0;
     }
     XtPointer xtPtr;
-    XtVaGetValues( instance->fchooser, XmNuserData, &xtPtr, 0 );
+    XtVaGetValues( instance->fchooser, XmNuserData, &xtPtr, NULL );
     FileChooserInfo *info = (FileChooserInfo *)xtPtr;
     Widget label = dtb_ttsnoop_ttsnoop_win.ttsnoopWin_label;
-    ostrstream script;
+    std::ostrstream script;
     switch (info->choice) {
            Tt_pattern *pats;
            Tt_message msg;
@@ -305,7 +305,7 @@ fileOkayed(
                    break;
            }
            if (WEXITSTATUS( ival ) != 0) {
-                   ostrstream diagnosis;
+                   std::ostrstream diagnosis;
                    diagnosis << "tt_type_comp -p: syntax error in "
                            << path << ends;
                    DtTtSetLabel( label, diagnosis.str() );