Patches from pkgsrc-WIP
[oweals/cde.git] / cde / programs / dtlogin / fontpath.c
index c37e2b8373389bf1835e8db17d81b7f8c812fd76..993a1b24f4c0c1687c781a158f68939e822d7a62 100644 (file)
 # include <signal.h>
 # include <X11/Xatom.h>
 # include <setjmp.h>
+#if defined(__FreeBSD__) && OSMAJORVERSION > 8
+# include <utmpx.h>
+#else
 # include <utmp.h>
+#endif
 # include "vgproto.h"
 
 /* 
@@ -54,7 +58,7 @@ static int PathInZList(char *path, char *fplist, int listlen);
 static int SeparateParts( char **path );
 
 
-static
+static void
 DebugFontPath(char *note, char **path, int nelems)
 {
     int i;
@@ -99,12 +103,12 @@ ApplyFontPathMods( struct display *d, Display *dpy )
 
     if (d->displayType.location == Foreign) {
         Debug("  Foreign display\n");
-        return;
+        return 0;
     }
 
     if (!(fontPath=XGetFontPath(dpy, &numPaths))) {
         Debug("  Can't get font path\n");
-        return;
+        return 0;
     }
 
     /*
@@ -178,6 +182,8 @@ ApplyFontPathMods( struct display *d, Display *dpy )
     if (fph) free(fph);
     if (fpt) free(fpt);
     XFreeFontPath(fontPath);
+
+    return 1;
 }
 
 /* ___________________________________________________________________