Hi all,

Another patch I have found whilst digging around my HD...
The following patch will allow CDE to build on FreeBSD 8.3 (Still in 
production).The issue being that FreeBSD versions before 9 only have utmp.h 
rather than utmpx.h
Not sure if it is a good solution but it might be nice to keep CDE compiling on 
older versions of operating systems.
Best regards,
Karsten

8<----------------------------
diff --git a/cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c 
b/cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c
index 35cc726..b740140 100644
--- a/cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c
+++ b/cde/lib/DtTerm/TermPrim/TermPrimSetUtmp.c
@@ -61,7 +61,9 @@ static char rcs_id[] = "$TOG: TermPrimSetUtmp.c /main/10 
1998/04/03 17:11:42 mgr
 #endif    /* sun */
 
 #ifdef    __FreeBSD__
+#if OSMAJORVERSION > 8
 #define    UT_UTMPX
+#endif
 #define    UT_HOST        ut_host
 #define    UT_NO_pututline
 #endif
diff --git a/cde/programs/dtlogin/account.c b/cde/programs/dtlogin/account.c
index 649161d..3999de3 100644
--- a/cde/programs/dtlogin/account.c
+++ b/cde/programs/dtlogin/account.c
@@ -57,7 +57,7 @@
 #endif
 
 #include    <fcntl.h>
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) && OSMAJORVERSION > 8
 #include    <utmpx.h>
 #else
 #include    <utmp.h>
diff --git a/cde/programs/dtlogin/dm.c b/cde/programs/dtlogin/dm.c
index 9e7b960..87fab04 100644
--- a/cde/programs/dtlogin/dm.c
+++ b/cde/programs/dtlogin/dm.c
@@ -53,7 +53,7 @@
 
 # include    <sys/signal.h>
 # include    <sys/stat.h>
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) && OSMAJORVERSION > 8
 # include    <utmpx.h>
 #else
 # include    <utmp.h>
@@ -1697,7 +1697,7 @@ GettyMessage( struct display *d, int msgnum )
 int 
 GettyRunning( struct display *d )
 {
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) && OSMAJORVERSION > 8
     struct utmpx utmp;        /* local struct for new entry           */
     struct utmpx *u;        /* pointer to entry in utmp file       */
 #else
@@ -1722,7 +1722,7 @@ GettyRunning( struct display *d )
         return FALSE;
 
 
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) && OSMAJORVERSION > 8
     bzero(&utmp, sizeof(struct utmpx));
 #else
     bzero(&utmp, sizeof(struct utmp));
diff --git a/cde/programs/dtlogin/fontpath.c b/cde/programs/dtlogin/fontpath.c
index 43173ba..87e490a 100644
--- a/cde/programs/dtlogin/fontpath.c
+++ b/cde/programs/dtlogin/fontpath.c
@@ -39,7 +39,7 @@
 # include <signal.h>
 # include <X11/Xatom.h>
 # include <setjmp.h>
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) && OSMAJORVERSION > 8
 # include <utmpx.h>
 #else
 # include <utmp.h>
diff --git a/cde/programs/dtlogin/session.c b/cde/programs/dtlogin/session.c
index 0a2cd86..b36d277 100644
--- a/cde/programs/dtlogin/session.c
+++ b/cde/programs/dtlogin/session.c
@@ -65,7 +65,7 @@
 # include <signal.h>
 # include <X11/Xatom.h>
 # include <setjmp.h>
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) && OSMAJORVERSION > 8
 # include <utmpx.h>
 #else
 # include <utmp.h>                                       
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to