Hi all,
Hope everyone had a good holiday. Work on converting the project to autotools 
continues, however it is a long process, so here is a small patch in the 
meantime.

Thank you for your time,
-Chase
From 99e724a62f9a8ca1e4ff3199ccf1692c336a6ded Mon Sep 17 00:00:00 2001
From: Chase <nicetry...@protonmail.ch>
Date: Sat, 12 Jan 2019 16:54:57 -0600
Subject: [PATCH] Use iconv on linux

---
 cde/include/EUSCompat.h                         | 7 -------
 cde/programs/dtcm/dtcm/RFCMIME.c                | 5 +----
 cde/programs/dtcm/dtcm/cm_i18n.c                | 5 +----
 cde/programs/dthelp/dthelpprint/PrintTopics.c   | 7 +------
 cde/programs/dtmail/libDtMail/Common/Session.C  | 7 +------
 cde/programs/dtmail/libDtMail/RFC/RFCBodyPart.C | 8 +-------
 6 files changed, 5 insertions(+), 34 deletions(-)

diff --git a/cde/include/EUSCompat.h b/cde/include/EUSCompat.h
index f73afb29..7e63b2bf 100644
--- a/cde/include/EUSCompat.h
+++ b/cde/include/EUSCompat.h
@@ -106,13 +106,6 @@ typedef enum {B_FALSE, B_TRUE} boolean_t;
 #if defined(__linux__) || defined(CSRG_BASED)
 typedef enum {B_FALSE, B_TRUE} boolean_t;
 #define MAXNAMELEN      	256
-
-#if !defined(CSRG_BASED)
-#define iconv_t			int
-#define iconv_open(a, b) 	((iconv_t) -1)
-#define iconv(a, b, c, d, e)	((size_t) 0)
-#define iconv_close(a)		(0)
-#endif
 #endif
 
 
diff --git a/cde/programs/dtcm/dtcm/RFCMIME.c b/cde/programs/dtcm/dtcm/RFCMIME.c
index b0291d8b..f6b9119c 100644
--- a/cde/programs/dtcm/dtcm/RFCMIME.c
+++ b/cde/programs/dtcm/dtcm/RFCMIME.c
@@ -56,10 +56,7 @@ static char sccsid[] = "$TOG: RFCMIME.c /main/11 1999/06/30 12:08:55 mgreess $";
 #include <assert.h>
 #include <RFCMIME.h>
 
-/* Iconv not defined for linux.  Use the EUSCompat stubs instead. */
-#if !defined(__linux__)
-#  include <iconv.h>
-#endif
+#include <iconv.h>
 #include <EUSCompat.h>
 #include <locale.h>
 #include <LocaleXlate.h>
diff --git a/cde/programs/dtcm/dtcm/cm_i18n.c b/cde/programs/dtcm/dtcm/cm_i18n.c
index dbb7beda..f9a0d01a 100644
--- a/cde/programs/dtcm/dtcm/cm_i18n.c
+++ b/cde/programs/dtcm/dtcm/cm_i18n.c
@@ -70,10 +70,7 @@ should be fixed in the future.
 #include <Xm/Xm.h>
 
 #include <langinfo.h>
-/* Iconv not defined for linux.  Use the EUSCompat stubs instead. */
-#if !defined(__linux__)
-#  include <iconv.h>
-#endif
+#include <iconv.h>
 #include <EUSCompat.h>
 
 #include "util.h"
diff --git a/cde/programs/dthelp/dthelpprint/PrintTopics.c b/cde/programs/dthelp/dthelpprint/PrintTopics.c
index 0e926668..0d9959b9 100644
--- a/cde/programs/dthelp/dthelpprint/PrintTopics.c
+++ b/cde/programs/dthelp/dthelpprint/PrintTopics.c
@@ -53,12 +53,7 @@ $COPYRIGHT$:
 #include <langinfo.h>
 #endif
 
-/* Iconv not defined for linux.  Use the EUSCompat stubs instead. */
-#if !defined(__linux__)
-#  include <iconv.h>
-#else
-#  include <EUSCompat.h>
-#endif
+#include <iconv.h>
 #include <errno.h>
 
 #include <time.h>
diff --git a/cde/programs/dtmail/libDtMail/Common/Session.C b/cde/programs/dtmail/libDtMail/Common/Session.C
index ac1d1c8d..f36916c5 100644
--- a/cde/programs/dtmail/libDtMail/Common/Session.C
+++ b/cde/programs/dtmail/libDtMail/Common/Session.C
@@ -86,12 +86,7 @@
 extern "C" {
 #endif
 
-#if !defined(__linux__)
-#  include <iconv.h>
-#else
-   // Iconv not defined for linux.  Use the EUSCompat stubs instead.
-#  include <EUSCompat.h>
-#endif
+#include <iconv.h>
 
 #if defined(SunOS) && (SunOS < 55)
 }
diff --git a/cde/programs/dtmail/libDtMail/RFC/RFCBodyPart.C b/cde/programs/dtmail/libDtMail/RFC/RFCBodyPart.C
index 3bd91306..ad180ee3 100644
--- a/cde/programs/dtmail/libDtMail/RFC/RFCBodyPart.C
+++ b/cde/programs/dtmail/libDtMail/RFC/RFCBodyPart.C
@@ -81,13 +81,7 @@
 extern "C" {
 #endif
 
-#if !defined(__linux__)
-   // Iconv not defined for linux.  Use the EUSCompat stubs instead. */
-#  include <iconv.h>
-#else
-#  include <EUSCompat.h>
-#endif
-
+#include <iconv.h>
 
 #if defined(SunOS) && (SunOS < 55)
 }
-- 
2.17.1

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

Reply via email to