This patch fixes build problems on FreeBSD 10.1.
Imake doesn't use the traditional mode of cpp any longer if cpp is
part of clang. The new clang-cpp ignores stringification (#) and
token pasting (##) under some conditions and therefore is no longer
compatible with CDE's build system.
The patch also removes some new dtinfo warnings which occur when
compiled with the new clang version.
And it fixes a build problem under gcc: If <wchar.h> is included,
<stdlib.h> must also be included. Otherwise a macro is undefined.
--
Ulrich Wilkens
Email: m...@uwilkens.de
>From 80fbd61dcbbe58dda8d40a8ffae75c451878e42e Mon Sep 17 00:00:00 2001
From: Ulrich Wilkens <m...@uwilkens.de>
Date: Thu, 20 Nov 2014 02:11:47 +0100
Subject: [PATCH] Fix FreeBSD 10.1 build
---
cde/config/cf/FreeBSD.cf | 1 +
cde/config/imake/imakemdep.h | 2 +-
cde/lib/DtTerm/TermPrim/TermPrimBuffer.c | 1 +
cde/lib/DtTerm/TermPrim/TermPrimBufferWc.c | 1 +
cde/lib/DtTerm/TermPrim/TermPrimRenderLineDraw.c | 1 +
cde/lib/DtWidget/Editor.c | 1 +
cde/programs/dthelp/parser/canon1/build/Imakefile | 3 +--
cde/programs/dthelp/parser/canon1/eltdef/Imakefile | 3 +--
cde/programs/dthelp/parser/canon1/parser/Imakefile | 3 +--
cde/programs/dthelp/parser/pass1/build/Imakefile | 3 +--
cde/programs/dthelp/parser/pass1/eltdef/Imakefile | 3 +--
cde/programs/dthelp/parser/pass1/parser/Imakefile | 3 +--
cde/programs/dthelp/parser/pass2/build/Imakefile | 3 +--
cde/programs/dthelp/parser/pass2/eltdef/Imakefile | 3 +--
cde/programs/dthelp/parser/pass2/parser/Imakefile | 3 +--
cde/programs/dtinfo/dtinfo/src/UAS/DtSR/DtSR_BookcaseEntry.C | 2 +-
cde/programs/dtinfo/dtinfo/src/UAS/DtSR/TextParser.C | 2 +-
cde/programs/dtinfo/dtinfogen/infolib/etc/SearchStorage.h | 2 +-
18 files changed, 18 insertions(+), 22 deletions(-)
diff --git a/cde/config/cf/FreeBSD.cf b/cde/config/cf/FreeBSD.cf
index 2ef9ba0..ce3e62c 100644
--- a/cde/config/cf/FreeBSD.cf
+++ b/cde/config/cf/FreeBSD.cf
@@ -36,6 +36,7 @@ USE_GCC = UseGcc
#if OSMajorVersion >= 10
#define CppArgs -Wno-invalid-pp-token
+#define DirFailPrefix -
#else
#define CppArgs /**/
#endif
diff --git a/cde/config/imake/imakemdep.h b/cde/config/imake/imakemdep.h
index 44c5eb0..3a4614c 100644
--- a/cde/config/imake/imakemdep.h
+++ b/cde/config/imake/imakemdep.h
@@ -354,7 +354,7 @@ char *cpp_argv[ARGUMENTS] = {
{"-D__powerpc64__", "1"},
# endif
-# ifdef __GNUC__
+# if defined(__GNUC__) && !defined(__llvm__)
"-traditional",
# endif
# ifdef __llvm__
diff --git a/cde/lib/DtTerm/TermPrim/TermPrimBuffer.c
b/cde/lib/DtTerm/TermPrim/TermPrimBuffer.c
index 4f992f8..2310f69 100644
--- a/cde/lib/DtTerm/TermPrim/TermPrimBuffer.c
+++ b/cde/lib/DtTerm/TermPrim/TermPrimBuffer.c
@@ -38,6 +38,7 @@ static char rcs_id[] = "$XConsortium: TermPrimBuffer.c
/main/1 1996/04/21 19:16:
#define USE_MEMCPY /* use memcpy for line movement... */
+#include <stdlib.h>
#include <wchar.h>
#include <Xm/Xm.h>
#include "TermHeader.h" /* for MIN/MAX */
diff --git a/cde/lib/DtTerm/TermPrim/TermPrimBufferWc.c
b/cde/lib/DtTerm/TermPrim/TermPrimBufferWc.c
index 4e348a1..3f72b64 100644
--- a/cde/lib/DtTerm/TermPrim/TermPrimBufferWc.c
+++ b/cde/lib/DtTerm/TermPrim/TermPrimBufferWc.c
@@ -38,6 +38,7 @@ static char rcs_id[] = "$XConsortium: TermPrimBufferWc.c
/main/1 1996/04/21 19:1
#define USE_MEMCPY /* use memcpy for line movement... */
+#include <stdlib.h>
#include <wchar.h>
#include <Xm/Xm.h>
#include "TermHeader.h" /* for MIN/MAX */
diff --git a/cde/lib/DtTerm/TermPrim/TermPrimRenderLineDraw.c
b/cde/lib/DtTerm/TermPrim/TermPrimRenderLineDraw.c
index 96cfd2a..b623419 100644
--- a/cde/lib/DtTerm/TermPrim/TermPrimRenderLineDraw.c
+++ b/cde/lib/DtTerm/TermPrim/TermPrimRenderLineDraw.c
@@ -33,6 +33,7 @@ static char rcs_id[] = "$XConsortium:
TermPrimRenderLineDraw.c /main/1 1996/04/2
* (c) Copyright 1993, 1994 Novell, Inc. *
*/
+#include <stdlib.h>
#include <wchar.h>
#include "TermHeader.h"
diff --git a/cde/lib/DtWidget/Editor.c b/cde/lib/DtWidget/Editor.c
index d330e09..5f36172 100644
--- a/cde/lib/DtWidget/Editor.c
+++ b/cde/lib/DtWidget/Editor.c
@@ -51,6 +51,7 @@
*/
#include <ctype.h>
+#include <stdlib.h>
#if defined(__hpux) || defined(__osf__) || defined(USL)
# include <wchar.h>
diff --git a/cde/programs/dthelp/parser/canon1/build/Imakefile
b/cde/programs/dthelp/parser/canon1/build/Imakefile
index f93d2a1..139167d 100644
--- a/cde/programs/dthelp/parser/canon1/build/Imakefile
+++ b/cde/programs/dthelp/parser/canon1/build/Imakefile
@@ -63,8 +63,7 @@ NormalProgramTarget(build,$(OBJS),delim.h
$(LOCAL_LIBRARIES),$(LOCAL_LIBRARIES),
$(CPRODS): $(HELPUTILSRC)/context $(HELPTAGSRC)/delim.bld context.dat
$(RM) $(CPRODS) $(CTRASH)
- /* get application-specific delim.dat */
- $(CP) $(HELPTAGSRC)/delim.bld delim.dat
+ $(CP) $(HELPTAGSRC)/delim.bld delim.dat /* appl.-specific delim.dat */
$(HELPUTILSRC)/context sparse
$(HELPUTILSRC)/context:
diff --git a/cde/programs/dthelp/parser/canon1/eltdef/Imakefile
b/cde/programs/dthelp/parser/canon1/eltdef/Imakefile
index 4784b6a..510235b 100644
--- a/cde/programs/dthelp/parser/canon1/eltdef/Imakefile
+++ b/cde/programs/dthelp/parser/canon1/eltdef/Imakefile
@@ -61,8 +61,7 @@ $(EPRODS): eltdef $(HELPIFFILE) $(HELPTSSFILE)
$(CPRODS): $(HELPUTILSRC)/context $(HELPTAGSRC)/delim.elt context.dat
$(RM) $(CPRODS) $(CTRASH)
- /* get application-specific delim.dat */
- $(CP) $(HELPTAGSRC)/delim.elt delim.dat
+ $(CP) $(HELPTAGSRC)/delim.elt delim.dat /* appl.-specific delim.dat */
$(HELPUTILSRC)/context
$(HELPUTILSRC)/context:
diff --git a/cde/programs/dthelp/parser/canon1/parser/Imakefile
b/cde/programs/dthelp/parser/canon1/parser/Imakefile
index c639066..324c22d 100644
--- a/cde/programs/dthelp/parser/canon1/parser/Imakefile
+++ b/cde/programs/dthelp/parser/canon1/parser/Imakefile
@@ -99,8 +99,7 @@ $(HELPTAGSRC)/dthelp_ctag1: parser
$(CPRODS): $(HELPUTILSRC)/context $(HELPTAGSRC)/delim.par context.dat
$(RM) $(CPRODS) $(CTRASH)
- /* get application-specific delim.dat */
- $(CP) $(HELPTAGSRC)/delim.par delim.dat
+ $(CP) $(HELPTAGSRC)/delim.par delim.dat /* appl.-specific delim.dat */
$(HELPUTILSRC)/context
$(HELPUTILSRC)/context:
diff --git a/cde/programs/dthelp/parser/pass1/build/Imakefile
b/cde/programs/dthelp/parser/pass1/build/Imakefile
index 7a7b587..bbf6b43 100644
--- a/cde/programs/dthelp/parser/pass1/build/Imakefile
+++ b/cde/programs/dthelp/parser/pass1/build/Imakefile
@@ -63,8 +63,7 @@ NormalProgramTarget(build,$(OBJS),delim.h
$(LOCAL_LIBRARIES),$(LOCAL_LIBRARIES),
$(CPRODS): $(HELPUTILSRC)/context $(HELPTAGSRC)/delim.bld context.dat
$(RM) $(CPRODS) $(CTRASH)
- /* get application-specific delim.dat */
- $(CP) $(HELPTAGSRC)/delim.bld delim.dat
+ $(CP) $(HELPTAGSRC)/delim.bld delim.dat /* appl.-specific delim.dat */
$(HELPUTILSRC)/context sparse
$(HELPUTILSRC)/context:
diff --git a/cde/programs/dthelp/parser/pass1/eltdef/Imakefile
b/cde/programs/dthelp/parser/pass1/eltdef/Imakefile
index 3f4a673..c0a6257 100644
--- a/cde/programs/dthelp/parser/pass1/eltdef/Imakefile
+++ b/cde/programs/dthelp/parser/pass1/eltdef/Imakefile
@@ -61,8 +61,7 @@ $(EPRODS): eltdef $(HELPIFFILE) $(HELPTSSFILE)
$(CPRODS): $(HELPUTILSRC)/context $(HELPTAGSRC)/delim.elt context.dat
$(RM) $(CPRODS) $(CTRASH)
- /* get application-specific delim.dat */
- $(CP) $(HELPTAGSRC)/delim.elt delim.dat
+ $(CP) $(HELPTAGSRC)/delim.elt delim.dat /* appl.-specific delim.dat */
$(HELPUTILSRC)/context
$(HELPUTILSRC)/context:
diff --git a/cde/programs/dthelp/parser/pass1/parser/Imakefile
b/cde/programs/dthelp/parser/pass1/parser/Imakefile
index e583464..db1cc93 100644
--- a/cde/programs/dthelp/parser/pass1/parser/Imakefile
+++ b/cde/programs/dthelp/parser/pass1/parser/Imakefile
@@ -99,8 +99,7 @@ $(HELPTAGSRC)/dthelp_htag1: parser
$(CPRODS): $(HELPUTILSRC)/context $(HELPTAGSRC)/delim.par context.dat
$(RM) $(CPRODS) $(CTRASH)
- /* get application-specific delim.dat */
- $(CP) $(HELPTAGSRC)/delim.par delim.dat
+ $(CP) $(HELPTAGSRC)/delim.par delim.dat /* appl.-specific delim.dat */
$(HELPUTILSRC)/context
$(HELPUTILSRC)/context:
diff --git a/cde/programs/dthelp/parser/pass2/build/Imakefile
b/cde/programs/dthelp/parser/pass2/build/Imakefile
index 29b1930..f3c5f2c 100644
--- a/cde/programs/dthelp/parser/pass2/build/Imakefile
+++ b/cde/programs/dthelp/parser/pass2/build/Imakefile
@@ -59,8 +59,7 @@ NormalProgramTarget(build,$(OBJS),delim.h
$(LOCAL_LIBRARIES),$(LOCAL_LIBRARIES),
$(CPRODS): $(SDLUTILSRC)/context $(HTAG2SRC)/delim.bld context.dat
$(RM) $(CPRODS) $(CTRASH)
- /* get application-specific delim.dat */
- $(CP) $(HTAG2SRC)/delim.bld delim.dat
+ $(CP) $(HTAG2SRC)/delim.bld delim.dat /* appl.-specific delim.dat */
$(SDLUTILSRC)/context sparse
$(SDLUTILSRC)/context:
diff --git a/cde/programs/dthelp/parser/pass2/eltdef/Imakefile
b/cde/programs/dthelp/parser/pass2/eltdef/Imakefile
index 8a245de..96da155 100644
--- a/cde/programs/dthelp/parser/pass2/eltdef/Imakefile
+++ b/cde/programs/dthelp/parser/pass2/eltdef/Imakefile
@@ -58,8 +58,7 @@ $(EPRODS): eltdef $(SDLIFFILE)
$(CPRODS): $(SDLUTILSRC)/context $(HTAG2SRC)/delim.elt context.dat
$(RM) $(CPRODS) $(CTRASH)
- /* get application-specific delim.dat */
- $(CP) $(HTAG2SRC)/delim.elt delim.dat
+ $(CP) $(HTAG2SRC)/delim.elt delim.dat /* appl.-specific delim.dat */
$(SDLUTILSRC)/context
$(SDLUTILSRC)/context:
diff --git a/cde/programs/dthelp/parser/pass2/parser/Imakefile
b/cde/programs/dthelp/parser/pass2/parser/Imakefile
index 478758b..701fe36 100644
--- a/cde/programs/dthelp/parser/pass2/parser/Imakefile
+++ b/cde/programs/dthelp/parser/pass2/parser/Imakefile
@@ -90,8 +90,7 @@ $(HTAG2SRC)/dthelp_htag2: parser
$(CPRODS): $(SDLUTILSRC)/context $(HTAG2SRC)/delim.par context.dat
$(RM) $(CPRODS) $(CTRASH)
- /* get application-specific delim.dat */
- $(CP) $(HTAG2SRC)/delim.par delim.dat
+ $(CP) $(HTAG2SRC)/delim.par delim.dat /* appl.-specific delim.dat */
$(SDLUTILSRC)/context
$(SDLUTILSRC)/context:
diff --git a/cde/programs/dtinfo/dtinfo/src/UAS/DtSR/DtSR_BookcaseEntry.C
b/cde/programs/dtinfo/dtinfo/src/UAS/DtSR/DtSR_BookcaseEntry.C
index e4c0439..d2cc898 100644
--- a/cde/programs/dtinfo/dtinfo/src/UAS/DtSR/DtSR_BookcaseEntry.C
+++ b/cde/programs/dtinfo/dtinfo/src/UAS/DtSR/DtSR_BookcaseEntry.C
@@ -116,7 +116,7 @@ DtSR_BookcaseSearchEntry::~DtSR_BookcaseSearchEntry()
void
DtSR_BookcaseSearchEntry::search_zones(UAS_SearchZones& search_zones)
{
- if (! bcases().length() > 0) {
+ if (! (bcases().length() > 0)) {
#ifdef DEBUG
fprintf(stderr, "search_zones tried on empty BookcaseEntry list\n");
#endif
diff --git a/cde/programs/dtinfo/dtinfo/src/UAS/DtSR/TextParser.C
b/cde/programs/dtinfo/dtinfo/src/UAS/DtSR/TextParser.C
index 67af02c..9c02b12 100644
--- a/cde/programs/dtinfo/dtinfo/src/UAS/DtSR/TextParser.C
+++ b/cde/programs/dtinfo/dtinfo/src/UAS/DtSR/TextParser.C
@@ -50,7 +50,7 @@ StringParser::brute_force(const char* text_in, int n_of_pats,
else if (patterns == NULL || *patterns == '\0')
return NULL;
- if (! n_of_pats > 0)
+ if (! (n_of_pats > 0))
return NULL;
char** pat_tbl = new char*[n_of_pats + 1];
diff --git a/cde/programs/dtinfo/dtinfogen/infolib/etc/SearchStorage.h
b/cde/programs/dtinfo/dtinfogen/infolib/etc/SearchStorage.h
index bdfcd08..dcbabff 100644
--- a/cde/programs/dtinfo/dtinfogen/infolib/etc/SearchStorage.h
+++ b/cde/programs/dtinfo/dtinfogen/infolib/etc/SearchStorage.h
@@ -23,7 +23,7 @@
/* $XConsortium: SearchStorage.h /main/3 1996/07/18 16:49:38 drk $ */
#ifndef SRCH_STOR_HDR
-#define SCRH_STOR_HDR
+#define SRCH_STOR_HDR
#include <stdio.h>
--
1.7.11.5
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel