dtcm: Resolve CID 87562
[oweals/cde.git] / cde / programs / dtcm / dtcm / MonthPanel.c
index ceab8ef3ada46909051014c32d900be9440f5857..8290e198b6ef487bf93d77619062cf2df516a47a 100644 (file)
@@ -1,3 +1,25 @@
+/*
+ * CDE - Common Desktop Environment
+ *
+ * Copyright (c) 1993-2012, The Open Group. All rights reserved.
+ *
+ * These libraries and programs are free software; you can
+ * redistribute them and/or modify them under the terms of the GNU
+ * Lesser General Public License as published by the Free Software
+ * Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * These libraries and programs are distributed in the hope that
+ * they will be useful, but WITHOUT ANY WARRANTY; without even the
+ * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE. See the GNU Lesser General Public License for more
+ * details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with these librararies and programs; if not, write
+ * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
+ * Floor, Boston, MA 02110-1301 USA
+ */
 /*********************************************************************************
 **  MonthPanel.c
 **
@@ -47,6 +69,9 @@
 
 #define XOS_USE_XT_LOCKING
 #define X_INCLUDE_TIME_H
+#if defined(linux)
+#undef SVR4
+#endif
 #include <X11/Xos_r.h>
 
 /*
@@ -364,7 +389,7 @@ Initialize( Widget rw, Widget nw, ArgList args, Cardinal *num_args )
           if (new_w->month_panel.active_days) {
                btn = XmCreatePushButtonGadget((Widget)new_w, buf, wargs, 1);
                XtAddCallback(btn, XmNactivateCallback, DayCallback,
-                       (XtPointer)(i+1));
+                       (XtPointer) (intptr_t) (i+1));
           }
           else {
                btn = XmCreateLabelGadget((Widget) new_w, buf, wargs, 1);
@@ -881,7 +906,7 @@ static void DayCallback(Widget w, XtPointer client, XtPointer call)
    XmMonthPanelCallbackStruct data;
 
    data.type = DAY_SELECTION;
-   data.day = (int) client;
+   data.day = (intptr_t) client;
 
    XtCallCallbackList((Widget) mp, mp->month_panel.callback, &data);
 }