Hello,
this patch fixes build problems on FreeBSD 10.2.

iconv library can now be built on all FreeBSD versions.
Doesn't matter whether iconv expects const char** or
only char**. The code to deal with it already existed
in CDE. It just had to be activated for FreeBSD.

Also fixed is the path to the perl binary which has been
changed in FreeBSD 10.2.

--
Ulrich Wilkens
Email: m...@uwilkens.de

>From e1c657c58eb4c1c6bf062686323a6b9370655de5 Mon Sep 17 00:00:00 2001
From: Ulrich Wilkens <m...@uwilkens.de>
Date: Wed, 21 Oct 2015 18:49:07 +0200
Subject: [PATCH] Fix FreeBSD 10.2 build

---
 cde/config/cf/FreeBSD.cf                     | 3 +++
 cde/programs/dtmail/dtmail/Imakefile         | 4 ++--
 cde/programs/dtmail/dtmailpr/Imakefile       | 3 ++-
 cde/programs/dtmail/include/DtMail/DtMail.hh | 4 ++--
 4 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/cde/config/cf/FreeBSD.cf b/cde/config/cf/FreeBSD.cf
index ce3e62c..c8945df 100644
--- a/cde/config/cf/FreeBSD.cf
+++ b/cde/config/cf/FreeBSD.cf
@@ -45,6 +45,9 @@ USE_GCC = UseGcc
 #define StandardCppDefines	-traditional CppArgs
 #endif
 
+#ifndef PerlCmd
+#define PerlCmd			/usr/local/bin/perl
+#endif
 #undef  InstallCmd
 #define InstallCmd		/usr/bin/install
 #undef	KornShell
diff --git a/cde/programs/dtmail/dtmail/Imakefile b/cde/programs/dtmail/dtmail/Imakefile
index cd6e89c..a360597 100644
--- a/cde/programs/dtmail/dtmail/Imakefile
+++ b/cde/programs/dtmail/dtmail/Imakefile
@@ -5,8 +5,8 @@ DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
 EXTRA_LOAD_FLAGS = ExtraLoadFlags $(UNSHARED_CXXLIB)
 
 INCLUDES = -I. -I../include -I../include/MotifApp \
-	-I../include/utils -I../include/DtMail \
-	-I../libDtMail/RFC -I$(CDELIBSRC) -I$(DTHELPSRC)
+	   -I../include/utils -I../include/DtMail \
+	   -I../libDtMail/RFC -I$(CDELIBSRC) -I$(DTHELPSRC) $(STD_INCLUDES)
 
 #ifndef DtMailDefines
 # define DtMailDefines
diff --git a/cde/programs/dtmail/dtmailpr/Imakefile b/cde/programs/dtmail/dtmailpr/Imakefile
index 171913c..929d49f 100644
--- a/cde/programs/dtmail/dtmailpr/Imakefile
+++ b/cde/programs/dtmail/dtmailpr/Imakefile
@@ -4,7 +4,8 @@ XCOMM $TOG: Imakefile /main/15 1998/08/05 13:24:40 mgreess $
 DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES)
 EXTRA_LOAD_FLAGS = ExtraLoadFlags $(UNSHARED_CXXLIB)
 
-INCLUDES = -I. -I../include -I../../dtcompat -I../../../. -I$(CDELIBSRC)
+INCLUDES = -I. -I../include -I../../dtcompat -I../../../. \
+	   -I$(CDELIBSRC) $(STD_INCLUDES)
 
 #ifndef DtMailDefines
 # define DtMailDefines
diff --git a/cde/programs/dtmail/include/DtMail/DtMail.hh b/cde/programs/dtmail/include/DtMail/DtMail.hh
index 566298b..f326b50 100644
--- a/cde/programs/dtmail/include/DtMail/DtMail.hh
+++ b/cde/programs/dtmail/include/DtMail/DtMail.hh
@@ -26,7 +26,7 @@
 
 #include <stdio.h>
 #include <stdarg.h>
-#if defined(sun)
+#if defined(sun) || defined(__FreeBSD__)
 #include <iconv.h>
 #endif
 #include <sys/stat.h>
@@ -914,7 +914,7 @@ friend class Session;
 			DTMailError_t minor_code);
 };
 
-#if defined(sun)
+#if defined(sun) || defined(__FreeBSD__)
 template <typename T>
 size_t iconv (iconv_t i, const T inbuf, size_t* inleft,
 	       char** outbuf, size_t* outleft)
-- 
1.7.11.5

------------------------------------------------------------------------------
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to