DtSvc/dtwm: Fix some implicit declarations of functions by adding appropriate
authorJon Trulson <jon@radscan.com>
Wed, 8 Aug 2012 17:47:18 +0000 (11:47 -0600)
committerJon Trulson <jon@radscan.com>
Wed, 8 Aug 2012 17:47:18 +0000 (11:47 -0600)
Patch from Frederic Koehler <f.koehler427@gmail.com>:

These implicit definitions cause segfaults on x64 because
the implicit return type is a 32-bit signed int, rather than a pointer
type.

cde/lib/DtSvc/DtUtil1/DtsMM.c
cde/lib/DtSvc/DtUtil1/DtsMM.h
cde/programs/dtwm/Button.c
cde/programs/dtwm/UI.c
cde/programs/dtwm/WmInitWs.c
cde/programs/dtwm/WmProperty.c
cde/programs/dtwm/WmWrkspace.c

index dd82d6fe6184d98233c0947caa019b912909b11a..e59bc5ee45753b29555aefa28cdd88545d2c09fa 100644 (file)
@@ -43,6 +43,7 @@
 #include <sys/param.h>
 #endif
 #include <string.h>
+#include <libgen.h>
 #define X_INCLUDE_DIRENT_H
 #define XOS_USE_XT_LOCKING
 #include <X11/Xos_r.h>
index 2deba8e823559386c70b52a01452b907cb51a5bc..aadc2392ec59817a1220d4ed44d7ad857ab602b1 100644 (file)
@@ -137,6 +137,10 @@ extern     int     use_in_memory_db;
 extern DtDtsMMDatabase         *_DtDtsMMGet(const char *name);
 extern char                    **_DtDtsMMListDb(void);
 
+/* FIXME: document */
+extern int *_DtDtsMMGetDbName(DtDtsMMDatabase *db, DtShmBoson boson);
+
+
 /* Name Comparison functions:
  * These routines can be passed in to the corresponding sort function to
  * sort by name.
index 1d7213db2d8d95165d2c73bce77a44289fdcc28e..9cfad52446883355310339b73cf927f006a2441e 100644 (file)
@@ -38,6 +38,7 @@ static char SCCSID[] = "OSF/Motif: @(#)Button.c       1.19 95/05/01";
 #include <X11/cursorfont.h>
 #include "ButtonP.h"
 #include <Xm/ManagerP.h>
+#include <Xm/DrawP.h>
 #include <Dt/Control.h>
 #include <Dt/MacrosP.h>
 #include <Dt/DtStrDefs.h>
index dbe2f7d6c3d4fc3a23e4b5de800e18eb32f8afb2..1a4e7d77e927b3cb087fe0522a47d89654b78266 100644 (file)
@@ -59,6 +59,7 @@
 #include <Xm/SeparatoG.h>
 #include <Xm/DialogS.h>
 #include <Xm/ColorObjP.h>
+#include <Xm/TextF.h>
 
 #include <X11/Xatom.h>
 #include <X11/keysymdef.h>
index f9e5b808b7db4f28e0d56f7570110ab618da6e8d..2f77f9a50af8d8f6c465ff85f3368a26cea697c2 100644 (file)
@@ -81,6 +81,7 @@ typedef struct
 #include <Dt/DtP.h>
 #include <Dt/Message.h>
 #include <Dt/WsmM.h>
+#include <Dt/EnvControlP.h>
 #endif /* WSM */
 
 /* Busy is also defined in the BMS  -> bms.h. This conflicts with
index 2995c3ce485775377ae9bd9444efcd306a8ad570..798553bcb688efba37e83a116dfcd471072e044b 100644 (file)
@@ -54,6 +54,7 @@ static char rcsid[] = "$TOG: WmProperty.c /main/7 1997/12/02 10:00:00 bill $"
 #include "WmColormap.h"
 #include "WmError.h"
 #include "WmResParse.h"
+#include "WmIconBox.h"
 
 
 
index 462f182a988dfa138fca627c0d8ea164159e011c..8ded58f0cfee4f7316c1848bbbb762b572e60a06 100644 (file)
@@ -41,6 +41,7 @@ static char rcsid[] = "$XConsortium: WmWrkspace.c /main/7 1996/10/23 17:26:33 rs
 #include "WmGlobal.h"
 #include "WmHelp.h"
 #include "WmResNames.h"
+#include "WmIPlace.h"
 #include <X11/Xutil.h>
 #include "WmICCC.h"
 #include <Xm/Xm.h>