From 29294e0373de1afa0c2cb57f08ba5fb985494b56 Mon Sep 17 00:00:00 2001 From: Ulrich Wilkens 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 2ef9ba0e..ce3e62c2 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 44c5eb05..3a4614c8 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 4f992f80..2310f696 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 #include #include #include "TermHeader.h" /* for MIN/MAX */ diff --git a/cde/lib/DtTerm/TermPrim/TermPrimBufferWc.c b/cde/lib/DtTerm/TermPrim/TermPrimBufferWc.c index 4e348a13..3f72b64f 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 #include #include #include "TermHeader.h" /* for MIN/MAX */ diff --git a/cde/lib/DtTerm/TermPrim/TermPrimRenderLineDraw.c b/cde/lib/DtTerm/TermPrim/TermPrimRenderLineDraw.c index 96cfd2a0..b6234198 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 #include #include "TermHeader.h" diff --git a/cde/lib/DtWidget/Editor.c b/cde/lib/DtWidget/Editor.c index d330e091..5f361721 100644 --- a/cde/lib/DtWidget/Editor.c +++ b/cde/lib/DtWidget/Editor.c @@ -51,6 +51,7 @@ */ #include +#include #if defined(__hpux) || defined(__osf__) || defined(USL) # include diff --git a/cde/programs/dthelp/parser/canon1/build/Imakefile b/cde/programs/dthelp/parser/canon1/build/Imakefile index f93d2a13..139167da 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 4784b6a9..510235bb 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 c6390669..324c22d4 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 7a7b5879..bbf6b43a 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 3f4a673f..c0a62578 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 e583464f..db1cc93d 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 29b19301..f3c5f2c5 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 8a245de2..96da1559 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 478758be..701fe365 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 e4c04390..d2cc8986 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 67af02cb..9c02b128 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 bdfcd085..dcbabff9 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 -- 2.25.1