Fix warnings on FreeBSD
[oweals/cde.git] / cde / programs / ttsnoop / ttChooser_stubs.C.src
index ed0f854a84a9551a361f8dd1f57f721bbe2f0306..c6521bd242e2d00c11c3cc7d8b356fd9addf34a5 100644 (file)
@@ -21,6 +21,7 @@
  *  ** DELETE THE GENERATED COMMENTS!                                 **
  */
 
+#include <stdint.h>
 #include <stdio.h>
 #include <Xm/Xm.h>
 #include "dtb_utils.h"
@@ -42,7 +43,7 @@
 
 #include <stdio.h>
 
-#if defined(linux) || defined(CSRG_BASED)
+#if defined(__linux__) || defined(CSRG_BASED) || defined(sun)
 #include <strstream>
 #else
 #include <strstream.h>
@@ -403,7 +404,7 @@ choiceOkayed(
            }
            ival = 0;
            sscanf( text, "%i", &ival );
-           msg = (Tt_message)ival;
+           msg = (Tt_message) (intptr_t) ival;
            if (DtTtIndex( DTTT_MESSAGE, msg ) < 0) {
                    return;
            }
@@ -438,7 +439,7 @@ choiceOkayed(
            }
            ival = 0;
            sscanf( text, "%i", &ival );
-           pat = (Tt_pattern)ival;
+           pat = (Tt_pattern) (intptr_t) ival;
            if (DtTtIndex( DTTT_PATTERN, pat ) < 0) {
                    return;
            }
@@ -472,7 +473,7 @@ choiceOkayed(
            }
            ival = 0;
            sscanf( text, "%i", &ival );
-           pats = (Tt_pattern *)ival;
+           pats = (Tt_pattern *) (intptr_t) ival;
            if (DtTtIndex( DTTT_DTSESSION, pats ) < 0) {
                    return;
            }
@@ -498,7 +499,7 @@ choiceOkayed(
            }
            ival = 0;
            sscanf( text, "%i", &ival );
-           pats = (Tt_pattern *)ival;
+           pats = (Tt_pattern *) (intptr_t) ival;
            if (DtTtIndex( DTTT_DTFILE, pats ) < 0) {
                    return;
            }