From 07f272122d467e819536e1c6d20eadbfd040167a Mon Sep 17 00:00:00 2001 From: Ulrich Wilkens Date: Thu, 31 May 2018 22:50:44 +0200 Subject: [PATCH] Fix Linux rpc problems with new glibc --- cde/config/imake/imake.c | 14 ++++----- cde/lib/DtSvc/DtEncap/Imakefile | 2 +- cde/lib/DtSvc/DtUtil1/Imakefile | 2 +- cde/lib/DtSvc/DtUtil2/Imakefile | 2 +- cde/lib/DtSvc/Imakefile | 2 +- cde/lib/csa/Imakefile | 2 +- cde/programs/dtcm/dtcm/Imakefile | 2 +- cde/programs/dtcm/libDtCmP/getdate.h | 1 + cde/programs/dtcm/libDtCmP/getdate.y | 29 ++++++++++--------- cde/programs/dtcm/server/Imakefile | 4 +-- cde/programs/dtcreate/Imakefile | 2 +- cde/programs/dtdbcache/Imakefile | 2 +- cde/programs/dtexec/Imakefile | 2 +- cde/programs/dtfile/Imakefile | 2 +- cde/programs/dticon/Imakefile | 2 +- .../dtinfo/DtMmdb/StyleSheet/FeatureSet.C | 2 +- cde/programs/dtinfo/DtMmdb/dstr/memory_pool.h | 2 +- cde/programs/dtinfo/DtMmdb/dynhash/data_t.C | 4 +-- .../dtinfo/DtMmdb/object/long_pstring.C | 12 ++++---- .../dtinfo/DtMmdb/oliasdb/c_api_common.C | 4 +++ .../dtinfo/DtMmdb/oliasdb/user_base.C | 2 +- .../dtinfo/DtMmdb/storage/heap_comp_funcs.C | 4 +-- cde/programs/dtinfo/DtMmdb/utility/buffer.C | 2 +- .../dtinfo/clients/dtinfo_start/Imakefile | 2 +- .../dtinfo/dtinfo/src/Agents/Imakefile | 6 ++-- .../dtinfo/src/Agents/MessageAgentMotif.C | 2 +- .../dtinfo/dtinfo/src/Basic/OrderList.C | 2 +- cde/programs/dtinfo/dtinfo/src/Imakefile | 3 +- .../dtinfo/dtinfo/src/Managers/Imakefile | 3 +- .../dtinfo/dtinfo/src/Managers/NodeMgr.C | 2 +- .../dtinfo/dtinfo/src/Managers/PrintMgr.C | 2 +- .../dtinfo/src/Managers/StyleSheetMgr.C | 4 +-- .../dtinfo/dtinfo/src/Registration.hh | 22 -------------- cde/programs/dtinfo/dtinfo/src/cgm/cgmcmds.c | 8 ++--- .../dtinfo/dtinfogen/infolib/etc/DataBase.h | 2 +- cde/programs/dtksh/Imakefile | 3 +- cde/programs/dtmail/MotifApp/Imakefile | 2 +- cde/programs/dtmail/dtmail/Imakefile | 3 +- cde/programs/dtmail/dtmailpr/Imakefile | 2 +- .../dtmail/libDtMail/Common/Imakefile | 3 +- cde/programs/dtmail/libDtMail/RFC/Imakefile | 3 +- cde/programs/dtpad/Imakefile | 1 + cde/programs/dtsearchpath/dtsp/Imakefile | 2 +- cde/programs/dtsearchpath/libCliSrv/Imakefile | 2 +- cde/programs/dtspcd/Imakefile | 2 +- cde/programs/dtstyle/Imakefile | 2 +- cde/programs/dtterm/Imakefile | 3 +- cde/programs/dtwm/Imakefile | 1 + cde/programs/ttsnoop/Imakefile | 1 + 49 files changed, 93 insertions(+), 97 deletions(-) diff --git a/cde/config/imake/imake.c b/cde/config/imake/imake.c index 2eac095e..7c429e42 100644 --- a/cde/config/imake/imake.c +++ b/cde/config/imake/imake.c @@ -996,11 +996,11 @@ get_libc_version(FILE *inFile) */ if (readlink (libcso, buf, PATH_MAX) >= 0) { for (ptr = buf; *ptr && !isdigit (*ptr); ptr++); - int ret = sscanf (ptr, "%d.%d.%d", &libcmajor, &libcminor, &libcteeny); - (void) ret; - fprintf(inFile, "#define DefaultLinuxCLibMajorVersion %d\n", libcmajor); - fprintf(inFile, "#define DefaultLinuxCLibMinorVersion %d\n", libcminor); - fprintf(inFile, "#define DefaultLinuxCLibTeenyVersion %d\n", libcteeny); + int ret = sscanf (ptr, "%d.%d.%d", &libcmajor, &libcminor, &libcteeny); + (void) ret; + fprintf(inFile, "#define DefaultLinuxCLibMajorVersion %d\n", libcmajor); + fprintf(inFile, "#define DefaultLinuxCLibMinorVersion %d\n", libcminor); + fprintf(inFile, "#define DefaultLinuxCLibTeenyVersion %d\n", libcteeny); } } else { /* @@ -1229,7 +1229,7 @@ get_gcc_incdir(FILE *inFile) if ((gccproc = popen (cmd, "r")) != NULL) { if (fgets (buf, PATH_MAX - 1, gccproc) != NULL) { ptr = strstr (buf, "libgcc.a"); - if (ptr) strncpy (ptr, "include", 7); + if (ptr) strncpy (ptr, "include", 8); } (void) pclose (gccproc); break; @@ -1720,6 +1720,6 @@ Strdup(const char *cp) { char *new = Emalloc(strlen(cp) + 1); - strncpy(new, cp, strlen(cp) + 1); + memcpy(new, cp, strlen(cp) + 1); return new; } diff --git a/cde/lib/DtSvc/DtEncap/Imakefile b/cde/lib/DtSvc/DtEncap/Imakefile index 15b4e14c..ffaab10c 100644 --- a/cde/lib/DtSvc/DtEncap/Imakefile +++ b/cde/lib/DtSvc/DtEncap/Imakefile @@ -27,7 +27,7 @@ DEFINES = DtSvcDefines \ -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \ -DCDE_LOGFILES_TOP=\"$(CDE_LOGFILES_TOP)/tmp\" -INCLUDES = -I. -I../include -I../DtUtil2 +INCLUDES = -I. -I../include -I../DtUtil2 $(TIRPCINC) SRCS = MemoryMgr.c SbEvent.c Symbolic.c bmsglob.c \ diff --git a/cde/lib/DtSvc/DtUtil1/Imakefile b/cde/lib/DtSvc/DtUtil1/Imakefile index 3699fe7b..8d353991 100644 --- a/cde/lib/DtSvc/DtUtil1/Imakefile +++ b/cde/lib/DtSvc/DtUtil1/Imakefile @@ -18,7 +18,7 @@ DEPEND_DEFINES = $(DEPENDDEFINES) DEFINES = DtSvcDefines \ -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \ -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" -INCLUDES = -I. -I../include +INCLUDES = -I. -I../include $(TIRPCINC) HEADERS = \ diff --git a/cde/lib/DtSvc/DtUtil2/Imakefile b/cde/lib/DtSvc/DtUtil2/Imakefile index 52269944..918a95c2 100644 --- a/cde/lib/DtSvc/DtUtil2/Imakefile +++ b/cde/lib/DtSvc/DtUtil2/Imakefile @@ -22,7 +22,7 @@ DEFINES = DtSvcDefines $(XINOPT) \ -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \ -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" -INCLUDES = -I. -I../include +INCLUDES = -I. -I../include $(TIRPCINC) #ifdef SunArchitecture EXTRA_INCLUDES = -I$(DTHELPSRC) diff --git a/cde/lib/DtSvc/Imakefile b/cde/lib/DtSvc/Imakefile index 8ec6c3bf..82f38fd0 100644 --- a/cde/lib/DtSvc/Imakefile +++ b/cde/lib/DtSvc/Imakefile @@ -31,7 +31,7 @@ DependSubdirs($(SUBDIRS)) #endif DEFINES = DtSvcDefines $(XINOPT) -INCLUDES = -I. +INCLUDES = -I. $(TIRPCINC) #ifdef SharedDtSvcReqs #ifdef SunArchitecture diff --git a/cde/lib/csa/Imakefile b/cde/lib/csa/Imakefile index a2d8dfcc..9a5ac31e 100644 --- a/cde/lib/csa/Imakefile +++ b/cde/lib/csa/Imakefile @@ -10,7 +10,7 @@ XCOMM $TOG: Imakefile /main/4 1998/03/19 19:01:27 mgreess $ #include -INCLUDES = -I. +INCLUDES = -I. $(TIRPCINC) OSMAJORVERSION = OSMajorVersion OSMINORVERSION = OSMinorVersion diff --git a/cde/programs/dtcm/dtcm/Imakefile b/cde/programs/dtcm/dtcm/Imakefile index 7ebed1d8..96252b42 100644 --- a/cde/programs/dtcm/dtcm/Imakefile +++ b/cde/programs/dtcm/dtcm/Imakefile @@ -2,7 +2,7 @@ XCOMM $TOG: Imakefile /main/19 1998/04/09 11:46:13 mgreess $ #include - INCLUDES = -I. -I$(CSASRC) -I../libDtCmP -I$(DTHELPSRC) + INCLUDES = -I. -I$(CSASRC) -I../libDtCmP -I$(DTHELPSRC) $(TIRPCINC) SYS_LIBRARIES = -lm $(ICONVSYSLIB) DTCMPLIB = ../libDtCmP/libDtCmP.a diff --git a/cde/programs/dtcm/libDtCmP/getdate.h b/cde/programs/dtcm/libDtCmP/getdate.h index 8f1d9fe1..d58b37e7 100644 --- a/cde/programs/dtcm/libDtCmP/getdate.h +++ b/cde/programs/dtcm/libDtCmP/getdate.h @@ -84,6 +84,7 @@ extern time_t monthadd P((time_t, time_t)); extern time_t daylcorr P((time_t, time_t)); extern time_t cm_getdate P((char*, struct timeb *)); +int yylex(); extern void yyerror(char *s); #endif diff --git a/cde/programs/dtcm/libDtCmP/getdate.y b/cde/programs/dtcm/libDtCmP/getdate.y index 573b9dfa..e42b8ee8 100644 --- a/cde/programs/dtcm/libDtCmP/getdate.y +++ b/cde/programs/dtcm/libDtCmP/getdate.y @@ -28,6 +28,7 @@ %{ #ifndef lint +__attribute__((unused)) static char sccsid[] = "@(#)getdate.y 1.10 94/11/07 Copyr 1993 Sun Microsystems, Inc."; #endif %} @@ -112,8 +113,8 @@ dyspec: DAY {dayord = 1; dayreq = $1;} | DAY ',' {dayord = 1; dayreq = $1;} - | NUMBER DAY - {dayord = $1; dayreq = $2;}; + | NUMBER ' ' DAY + {dayord = $1; dayreq = $3;}; dtspec: NUMBER '/' NUMBER {month = $1; day = $3; noyear = 1;} @@ -127,17 +128,17 @@ dtspec: NUMBER '/' NUMBER {month = $1; day = $2; noyear = 1;} | MONTH NUMBER ',' NUMBER {month = $1; day = $2; year = $4;} - | NUMBER MONTH - {month = $2; day = $1; noyear = 1;} - | NUMBER MONTH NUMBER - {month = $2; day = $1; year = $3;}; + | NUMBER ' ' MONTH + {month = $3; day = $1; noyear = 1;} + | NUMBER ' ' MONTH ' ' NUMBER + {month = $3; day = $1; year = $5;}; -rspec: NUMBER UNIT - {relsec += 60L * $1 * $2;} - | NUMBER MUNIT - {relmonth += $1 * $2;} - | NUMBER SUNIT +rspec: NUMBER ' ' UNIT + {relsec += 60L * $1 * $3;} + | NUMBER ' ' MUNIT + {relmonth += $1 * $3;} + | NUMBER ' ' SUNIT {relsec += $1;} | UNIT {relsec += 60L * $1;} @@ -406,7 +407,7 @@ static int lookup(char *id) { #define gotit (yylval=i->value, i->type) -#define getid for(j=idvar, k=id; *j++ = *k++; ) +#define getid for(j=idvar, k=id; (*j++ = *k++); ) char idvar[20]; register char *j, *k; @@ -463,7 +464,7 @@ lookup(char *id) static char *lptr; -yylex() +int yylex() { extern int yylval; int sign; @@ -550,7 +551,7 @@ time_t cm_getdate(char *p, struct timeb *now) hh = mm = ss = 0; merid = 24; - if (err = yyparse()) return (-1); + if ((err = yyparse())) return (-1); mcheck(timeflag); mcheck(zoneflag); diff --git a/cde/programs/dtcm/server/Imakefile b/cde/programs/dtcm/server/Imakefile index ad77d8e2..7f93b6d5 100644 --- a/cde/programs/dtcm/server/Imakefile +++ b/cde/programs/dtcm/server/Imakefile @@ -20,8 +20,8 @@ XCOMM (c) Copyright 1996 Hitachi. PROGRAM = rpc.cmsd - INCLUDES = -I. -I$(CSASRC) -I$(DTHELPSRC) - SYS_LIBRARIES = DtClientSysLibs + INCLUDES = -I. -I$(CSASRC) -I$(DTHELPSRC) $(TIRPCINC) + SYS_LIBRARIES = DtClientSysLibs $(TIRPCLIB) #ifdef SunArchitecture LOCAL_LIBRARIES = $(CSALIB) $(DTSVCLIB) $(TTLIB) #else diff --git a/cde/programs/dtcreate/Imakefile b/cde/programs/dtcreate/Imakefile index dc27bd09..fdf66c58 100644 --- a/cde/programs/dtcreate/Imakefile +++ b/cde/programs/dtcreate/Imakefile @@ -15,7 +15,7 @@ XCOMM */ DEPEND_DEFINES = $(DEPENDDEFINES) - INCLUDES = -I. + INCLUDES = -I. $(TIRPCINC) #if defined (SunArchitecture) DEPLIBS = $(DEPDTWIDGETLIB) $(DEPDTSVCLIB) \ $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB) diff --git a/cde/programs/dtdbcache/Imakefile b/cde/programs/dtdbcache/Imakefile index e6375b84..209cca6d 100644 --- a/cde/programs/dtdbcache/Imakefile +++ b/cde/programs/dtdbcache/Imakefile @@ -9,7 +9,7 @@ XCOMM $XConsortium: Imakefile /main/5 1996/09/14 15:26:52 drk $ * It should be set when necessary to the real library macro name. */ - INCLUDES = -I. + INCLUDES = -I. $(TIRPCINC) /* DEPLIBS contains the list of library depencies for a client. * LOCAL_LIBRARIES contains the list of libraries on the link line. diff --git a/cde/programs/dtexec/Imakefile b/cde/programs/dtexec/Imakefile index 5c426de6..883cb2e9 100644 --- a/cde/programs/dtexec/Imakefile +++ b/cde/programs/dtexec/Imakefile @@ -4,7 +4,7 @@ DEPLIBS = $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB) LOCAL_LIBRARIES = $(TTLIB) $(XTOOLLIB) $(XLIB) DEPEND_DEFINES = $(DEPENDDEFINES) DEFINES = -DMSGLOG_CLIENT_ONLY -INCLUDES = -I. +INCLUDES = -I. $(TIRPCINC) SRCS = DtGetMessage.c Main.c MsgLog.c Version.c OBJS = DtGetMessage.o Main.o MsgLog.o Version.o diff --git a/cde/programs/dtfile/Imakefile b/cde/programs/dtfile/Imakefile index 88aecbdd..bfb3fc68 100644 --- a/cde/programs/dtfile/Imakefile +++ b/cde/programs/dtfile/Imakefile @@ -19,7 +19,7 @@ DEFINES = -DMULTIBYTE -DSHAPE -D_ILS_MACROS -DSUN_PERF \ -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \ -DKORNSHELL=\"$(KORNSHELL)\" $(XINOPT) -INCLUDES = -I./dtcopy +INCLUDES = -I./dtcopy $(TIRPCINC) DEPLIBS = DepDtClientLibs LOCAL_LIBRARIES = DtClientLibs $(XINLIB) diff --git a/cde/programs/dticon/Imakefile b/cde/programs/dticon/Imakefile index 6cbe04a3..12ddd046 100644 --- a/cde/programs/dticon/Imakefile +++ b/cde/programs/dticon/Imakefile @@ -15,7 +15,7 @@ XCOMM DEPEND_DEFINES = $(DEPENDDEFINES) DEFINES = -D__TOOLTALK -INCLUDES = -I. +INCLUDES = -I. $(TIRPCINC) #if defined (SunArchitecture) DEPLIBS = $(DEPDTWIDGETLIB) $(DEPDTSVCLIB) $(DEPTTLIB) \ diff --git a/cde/programs/dtinfo/DtMmdb/StyleSheet/FeatureSet.C b/cde/programs/dtinfo/DtMmdb/StyleSheet/FeatureSet.C index 449b11d5..eff94005 100644 --- a/cde/programs/dtinfo/DtMmdb/StyleSheet/FeatureSet.C +++ b/cde/programs/dtinfo/DtMmdb/StyleSheet/FeatureSet.C @@ -81,7 +81,7 @@ FeatureSet::evaluate(FeatureSet *result_set) const result_set->append(new Feature(next.key()->name(), value)); } - mcatch_noarg(badEvaluationException) + mcatch_noarg(badEvaluationException&) { /* do nothing...we just ignore any that will not evaluate */ } diff --git a/cde/programs/dtinfo/DtMmdb/dstr/memory_pool.h b/cde/programs/dtinfo/DtMmdb/dstr/memory_pool.h index ef2f5659..d291084c 100644 --- a/cde/programs/dtinfo/DtMmdb/dstr/memory_pool.h +++ b/cde/programs/dtinfo/DtMmdb/dstr/memory_pool.h @@ -139,7 +139,7 @@ protected: }; #ifdef C_API -#define g_memory_pool (*g_memory_pool_ptr) +#define g_memory_pool *g_memory_pool_ptr extern memory_pool* g_memory_pool_ptr; #endif diff --git a/cde/programs/dtinfo/DtMmdb/dynhash/data_t.C b/cde/programs/dtinfo/DtMmdb/dynhash/data_t.C index 1dc670c9..96b591df 100644 --- a/cde/programs/dtinfo/DtMmdb/dynhash/data_t.C +++ b/cde/programs/dtinfo/DtMmdb/dynhash/data_t.C @@ -349,12 +349,12 @@ int data_t::slot_num(int k, int rotate, int prime, int M ) void* data_t::operator new( size_t x ) { //return (void*)data_t_space_pool.alloc(x); - return (void*)g_memory_pool.alloc(x); + return (void*)(g_memory_pool).alloc(x); } void data_t::operator delete( void* ptr ) { //data_t_space_pool.free((char*)ptr); - g_memory_pool.free((char*)ptr); + (g_memory_pool).free((char*)ptr); } diff --git a/cde/programs/dtinfo/DtMmdb/object/long_pstring.C b/cde/programs/dtinfo/DtMmdb/object/long_pstring.C index 838994fa..f0e7d3b8 100644 --- a/cde/programs/dtinfo/DtMmdb/object/long_pstring.C +++ b/cde/programs/dtinfo/DtMmdb/object/long_pstring.C @@ -96,15 +96,15 @@ long_pstring::extract(int left, int right, char* sink) ) v_str_index = new chunks_index(storage_ptr, v_str_ptr.loc); - if ( v_str_index ) { + if ( v_str_index ) { - str_index_record_t* anchor = v_str_index -> chunk_location(left); + str_index_record_t* anchor = v_str_index -> chunk_location(left); //debug(cerr, left - anchor -> str_offset); - storage_ptr -> - readString(anchor -> loc, sink, - right-left, left - anchor -> str_offset - ); + storage_ptr -> + readString(anchor -> loc, sink, + right-left, left - anchor -> str_offset + ); } else diff --git a/cde/programs/dtinfo/DtMmdb/oliasdb/c_api_common.C b/cde/programs/dtinfo/DtMmdb/oliasdb/c_api_common.C index 8a473d00..1b9d0235 100644 --- a/cde/programs/dtinfo/DtMmdb/oliasdb/c_api_common.C +++ b/cde/programs/dtinfo/DtMmdb/oliasdb/c_api_common.C @@ -136,7 +136,11 @@ void DtMmdbQuit() } +#if __cplusplus < 201103L void* operator new( size_t sz ) throw(std::bad_alloc) +#else +void* operator new( size_t sz ) +#endif { void* p = (void*)malloc(sz); //printf("a::operator new called(). sz= %d, allo=%x\n", sz, p); diff --git a/cde/programs/dtinfo/DtMmdb/oliasdb/user_base.C b/cde/programs/dtinfo/DtMmdb/oliasdb/user_base.C index 6f623cfe..99b33e57 100644 --- a/cde/programs/dtinfo/DtMmdb/oliasdb/user_base.C +++ b/cde/programs/dtinfo/DtMmdb/oliasdb/user_base.C @@ -160,7 +160,7 @@ user_base::checking_status_t user_base::check_mode() user_base::checking_status_t user_base::check_lock() { - char lock_dir[PATHSIZ]; + char lock_dir[PATHSIZ+5]; int len; snprintf(lock_dir, sizeof(lock_dir), "%s/%s", base_path, LOCK_DIR); diff --git a/cde/programs/dtinfo/DtMmdb/storage/heap_comp_funcs.C b/cde/programs/dtinfo/DtMmdb/storage/heap_comp_funcs.C index 151c8d7d..e4456e42 100644 --- a/cde/programs/dtinfo/DtMmdb/storage/heap_comp_funcs.C +++ b/cde/programs/dtinfo/DtMmdb/storage/heap_comp_funcs.C @@ -75,12 +75,12 @@ Boolean fbytes_t_eq(const void* x, const void* y) void* fbytes_t::operator new( size_t x ) { //return (void*)heap_cell_space_pool.alloc(x); - return (void*)g_memory_pool.alloc(x); + return (void*)(g_memory_pool).alloc(x); } void fbytes_t::operator delete( void* ptr ) { //heap_cell_space_pool.free((char*)ptr); - g_memory_pool.free((char*)ptr); + (g_memory_pool).free((char*)ptr); } diff --git a/cde/programs/dtinfo/DtMmdb/utility/buffer.C b/cde/programs/dtinfo/DtMmdb/utility/buffer.C index fa803042..6525f9c8 100644 --- a/cde/programs/dtinfo/DtMmdb/utility/buffer.C +++ b/cde/programs/dtinfo/DtMmdb/utility/buffer.C @@ -186,7 +186,7 @@ buffer& buffer::skip(int i) { if ( i + v_aptr > v_eptr ) MESSAGE(cerr, "buffer::skip(): underflow"); - throw ( CASTBNDEXCEPT boundaryException( long(v_aptr), long(v_eptr), long(i + v_aptr) )); + throw ( CASTBNDEXCEPT boundaryException( long(v_aptr), long(v_eptr), long(i + v_aptr) )); v_aptr += i; return *this; diff --git a/cde/programs/dtinfo/clients/dtinfo_start/Imakefile b/cde/programs/dtinfo/clients/dtinfo_start/Imakefile index 4c0bcbb0..3720be75 100644 --- a/cde/programs/dtinfo/clients/dtinfo_start/Imakefile +++ b/cde/programs/dtinfo/clients/dtinfo_start/Imakefile @@ -12,7 +12,7 @@ XCOMM $XConsortium: Imakefile /main/5 1996/06/11 17:45:12 cde-hal $ NormalCplusplusObjectRule() DEPEND_DEFINES = $(DEPENDDEFINES) -INCLUDES = -I. +INCLUDES = -I. $(TIRPCINC) #ifdef AIXArchitecture LDPOSTLIB=-blibpath:/usr/dt/lib:/X11/lib:/usr/lib/threads:/usr/lib:/lib diff --git a/cde/programs/dtinfo/dtinfo/src/Agents/Imakefile b/cde/programs/dtinfo/dtinfo/src/Agents/Imakefile index be631196..55499c0e 100644 --- a/cde/programs/dtinfo/dtinfo/src/Agents/Imakefile +++ b/cde/programs/dtinfo/dtinfo/src/Agents/Imakefile @@ -10,11 +10,13 @@ LIBNAME=Agents NormalCplusplusObjectRule() #ifdef DoLicenseManagement -INCLUDES=$(CXXDEPENDINCLUDES) $(BROWSER_INCLUDES) $(MMDB_INCLUDES) $(LICENSE_L_INCLUDES) +INCLUDES = $(CXXDEPENDINCLUDES) $(BROWSER_INCLUDES) \ + $(MMDB_INCLUDES) $(LICENSE_L_INCLUDES) $(TIRPCINC) EXTRA_DEFINES=-DLICENSE_MANAGEMENT #else XCOMM Should remove LICENSE_L_INCLUDES from this list in this case -INCLUDES=$(CXXDEPENDINCLUDES) $(BROWSER_INCLUDES) $(COMMON_CLASS_INCLUDES) +INCLUDES = $(CXXDEPENDINCLUDES) $(BROWSER_INCLUDES) \ + $(COMMON_CLASS_INCLUDES) $(TIRPCINC) #endif #include "Classlist.mk" diff --git a/cde/programs/dtinfo/dtinfo/src/Agents/MessageAgentMotif.C b/cde/programs/dtinfo/dtinfo/src/Agents/MessageAgentMotif.C index b677c98a..58f7b15f 100644 --- a/cde/programs/dtinfo/dtinfo/src/Agents/MessageAgentMotif.C +++ b/cde/programs/dtinfo/dtinfo/src/Agents/MessageAgentMotif.C @@ -587,7 +587,7 @@ MessageAgent::get_integer (const char *message, const char* title, { if (f_dialog == NULL) create_ui(parent); - if (g_active) + if (g_active) return (100); g_active = TRUE; diff --git a/cde/programs/dtinfo/dtinfo/src/Basic/OrderList.C b/cde/programs/dtinfo/dtinfo/src/Basic/OrderList.C index 5e1d52f6..b452bf9e 100644 --- a/cde/programs/dtinfo/dtinfo/src/Basic/OrderList.C +++ b/cde/programs/dtinfo/dtinfo/src/Basic/OrderList.C @@ -97,7 +97,7 @@ OrderList::add(ListEntry *node, AddCode where, bool mvcursor) else return OLIST_ERROR; - f_size++; + f_size++; return OLIST_OK; } diff --git a/cde/programs/dtinfo/dtinfo/src/Imakefile b/cde/programs/dtinfo/dtinfo/src/Imakefile index 89fb7cfa..56b7ed1b 100644 --- a/cde/programs/dtinfo/dtinfo/src/Imakefile +++ b/cde/programs/dtinfo/dtinfo/src/Imakefile @@ -48,7 +48,8 @@ SYS_LIBRARIES=-lm -L$(XPROJECTROOT)/lib -L$(MPROJECTROOT)/lib SYS_LIBRARIES=-lm #endif -INCLUDES = $(CXXDEPENDINCLUDES) -I. $(BROWSER_INCLUDES) $(MMDB_INCLUDES) +INCLUDES = $(CXXDEPENDINCLUDES) -I. $(BROWSER_INCLUDES) $(MMDB_INCLUDES) \ + $(TIRPCINC) OLIASNORMALLIBS= \ Agents/libAgents.a \ diff --git a/cde/programs/dtinfo/dtinfo/src/Managers/Imakefile b/cde/programs/dtinfo/dtinfo/src/Managers/Imakefile index 287df950..a5974149 100644 --- a/cde/programs/dtinfo/dtinfo/src/Managers/Imakefile +++ b/cde/programs/dtinfo/dtinfo/src/Managers/Imakefile @@ -23,7 +23,8 @@ LIBNAME=Managers NormalCplusplusObjectRule() -INCLUDES=$(CXXDEPENDINCLUDES) $(BROWSER_INCLUDES) $(COMMON_CLASS_INCLUDES) +INCLUDES = $(CXXDEPENDINCLUDES) $(BROWSER_INCLUDES) \ + $(COMMON_CLASS_INCLUDES) $(TIRPCINC) #include "Classlist.mk" diff --git a/cde/programs/dtinfo/dtinfo/src/Managers/NodeMgr.C b/cde/programs/dtinfo/dtinfo/src/Managers/NodeMgr.C index e3a1ff5b..03bd8526 100644 --- a/cde/programs/dtinfo/dtinfo/src/Managers/NodeMgr.C +++ b/cde/programs/dtinfo/dtinfo/src/Managers/NodeMgr.C @@ -345,7 +345,7 @@ NodeMgr::load(UAS_Pointer &node_ptr) { style_sheet_mgr().initOnlineStyleSheet(node_ptr); } - mcatch_noarg (StyleSheetSyntaxError) + mcatch_noarg (StyleSheetSyntaxError&) { message_mgr().error_dialog( (char*)UAS_String(CATGETS(Set_Messages, 39, "File a Bug"))); diff --git a/cde/programs/dtinfo/dtinfo/src/Managers/PrintMgr.C b/cde/programs/dtinfo/dtinfo/src/Managers/PrintMgr.C index c97d4e51..4bc633e1 100644 --- a/cde/programs/dtinfo/dtinfo/src/Managers/PrintMgr.C +++ b/cde/programs/dtinfo/dtinfo/src/Managers/PrintMgr.C @@ -209,7 +209,7 @@ PrintMgr::load(UAS_Pointer &node_ptr) { style_sheet_mgr().initPrintStyleSheet(node_ptr); } - mcatch_noarg (StyleSheetSyntaxError) + mcatch_noarg (StyleSheetSyntaxError&) { message_mgr().error_dialog( (char*)UAS_String(CATGETS(Set_Messages, 39, diff --git a/cde/programs/dtinfo/dtinfo/src/Managers/StyleSheetMgr.C b/cde/programs/dtinfo/dtinfo/src/Managers/StyleSheetMgr.C index 7c1644fa..c77416eb 100644 --- a/cde/programs/dtinfo/dtinfo/src/Managers/StyleSheetMgr.C +++ b/cde/programs/dtinfo/dtinfo/src/Managers/StyleSheetMgr.C @@ -163,7 +163,7 @@ StyleSheetMgr::initOnlineStyleSheet (UAS_Pointer &doc) { mtry { styleparse (); } - mcatch_noarg (StyleSheetSyntaxError) { + mcatch_noarg (StyleSheetSyntaxError&) { fLastSS = 0; delete fCurrent; { // Don't remove these curlies. For destructors before rethrow @@ -221,7 +221,7 @@ StyleSheetMgr::initPrintStyleSheet (UAS_Pointer &doc) { mtry { styleparse (); } - mcatch_noarg (StyleSheetSyntaxError) { + mcatch_noarg (StyleSheetSyntaxError&) { fLastSS = 0; delete fCurrent; { // Don't remove these curlies. For destructors before rethrow diff --git a/cde/programs/dtinfo/dtinfo/src/Registration.hh b/cde/programs/dtinfo/dtinfo/src/Registration.hh index e801c3d3..cc173297 100644 --- a/cde/programs/dtinfo/dtinfo/src/Registration.hh +++ b/cde/programs/dtinfo/dtinfo/src/Registration.hh @@ -1,25 +1,3 @@ -/* - * CDE - Common Desktop Environment - * - * Copyright (c) 1993-2012, The Open Group. All rights reserved. - * - * These libraries and programs are free software; you can - * redistribute them and/or modify them under the terms of the GNU - * Lesser General Public License as published by the Free Software - * Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * These libraries and programs are distributed in the hope that - * they will be useful, but WITHOUT ANY WARRANTY; without even the - * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU Lesser General Public License for more - * details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with these libraries and programs; if not, write - * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth - * Floor, Boston, MA 02110-1301 USA - */ #define Set_CatMgr 1 #define Set_DtSR_Parser 2 #define Set_SearchMgr 3 diff --git a/cde/programs/dtinfo/dtinfo/src/cgm/cgmcmds.c b/cde/programs/dtinfo/dtinfo/src/cgm/cgmcmds.c index 7438f373..3424c035 100644 --- a/cde/programs/dtinfo/dtinfo/src/cgm/cgmcmds.c +++ b/cde/programs/dtinfo/dtinfo/src/cgm/cgmcmds.c @@ -930,7 +930,7 @@ static int auxcolr(dat_ptr, cmd_ptr, cgm_s) case I_C_M: cgm_s->auxcolr[3] = b_guint(&dat_ptr, cgm_s->cindprec); break; case D_C_M: for (i=0; i<3; ++i) - cgm_s->auxcolr[i] = b_gsint(&dat_ptr, cgm_s->colprec); + cgm_s->auxcolr[i] = b_gsint(&dat_ptr, cgm_s->colprec); break; } return 1; @@ -2334,10 +2334,10 @@ static int corient(unsigned char *dat_ptr,struct cmd_info_s *cmd_ptr, /* just 4 VDC's to grab */ switch (cgm_s->vdctype) { case VDC_INT: for (i=0; i<4; ++i) - cgm_s->corient[i].i = b_gsint(&dat_ptr, cgm_s->vdcintprec); + cgm_s->corient[i].i = b_gsint(&dat_ptr, cgm_s->vdcintprec); break; - case VDC_REAL: for (i=0; i<4; ++i) - cgm_s->corient[i].r = b_real(&dat_ptr, &(cgm_s->vdcrprec)); + case VDC_REAL: for (i=0; i<4; ++i) + cgm_s->corient[i].r = b_real(&dat_ptr, &(cgm_s->vdcrprec)); break; } return 1; diff --git a/cde/programs/dtinfo/dtinfogen/infolib/etc/DataBase.h b/cde/programs/dtinfo/dtinfogen/infolib/etc/DataBase.h index 07348092..4862633e 100644 --- a/cde/programs/dtinfo/dtinfogen/infolib/etc/DataBase.h +++ b/cde/programs/dtinfo/dtinfogen/infolib/etc/DataBase.h @@ -40,7 +40,7 @@ public: PosixError(int error_no, const char *msg) { f_errno = error_no; - *((char *) memcpy(f_msg, msg, MAXMSG+1) + MAXMSG+1) = '\0'; }; + strncpy(f_msg, msg, MAXMSG+1); }; const char *msg(void) const { return f_msg; }; int error_no(void) const { return f_errno; }; diff --git a/cde/programs/dtksh/Imakefile b/cde/programs/dtksh/Imakefile index 532238b5..fa35fac4 100644 --- a/cde/programs/dtksh/Imakefile +++ b/cde/programs/dtksh/Imakefile @@ -3,7 +3,8 @@ DESKTOP_VERSION_STRING = DesktopVersionString KSH93SRC = ./ksh93 DEPEND_DEFINES = $(DEPENDDEFINES) -INCLUDES = -I. -I$(KSH93SRC)/include/ast -I$(KSH93SRC)/src/cmd/ksh93/include -I$(KSH93SRC)/src/cmd/ksh93 +INCLUDES = -I. -I$(KSH93SRC)/include/ast -I$(KSH93SRC)/src/cmd/ksh93/include \ + -I$(KSH93SRC)/src/cmd/ksh93 $(TIRPCINC) /* DEPLIBS contains the list of library depencies for a client. * LOCAL_LIBRARIES contains the list of libraries on the link line. diff --git a/cde/programs/dtmail/MotifApp/Imakefile b/cde/programs/dtmail/MotifApp/Imakefile index 9298d81c..f9fe6e7c 100644 --- a/cde/programs/dtmail/MotifApp/Imakefile +++ b/cde/programs/dtmail/MotifApp/Imakefile @@ -11,7 +11,7 @@ DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES) #include -INCLUDES = -I../include/MotifApp -I../include -I../include/utils +INCLUDES = -I../include/MotifApp -I../include -I../include/utils $(TIRPCINC) #ifndef DtMailDefines # define DtMailDefines diff --git a/cde/programs/dtmail/dtmail/Imakefile b/cde/programs/dtmail/dtmail/Imakefile index a360597a..d912e86f 100644 --- a/cde/programs/dtmail/dtmail/Imakefile +++ b/cde/programs/dtmail/dtmail/Imakefile @@ -6,7 +6,8 @@ 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) $(STD_INCLUDES) + -I../libDtMail/RFC -I$(CDELIBSRC) -I$(DTHELPSRC) \ + $(STD_INCLUDES) $(TIRPCINC) #ifndef DtMailDefines # define DtMailDefines diff --git a/cde/programs/dtmail/dtmailpr/Imakefile b/cde/programs/dtmail/dtmailpr/Imakefile index 929d49fe..1b3cba66 100644 --- a/cde/programs/dtmail/dtmailpr/Imakefile +++ b/cde/programs/dtmail/dtmailpr/Imakefile @@ -5,7 +5,7 @@ DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES) EXTRA_LOAD_FLAGS = ExtraLoadFlags $(UNSHARED_CXXLIB) INCLUDES = -I. -I../include -I../../dtcompat -I../../../. \ - -I$(CDELIBSRC) $(STD_INCLUDES) + -I$(CDELIBSRC) $(STD_INCLUDES) $(TIRPCINC) #ifndef DtMailDefines # define DtMailDefines diff --git a/cde/programs/dtmail/libDtMail/Common/Imakefile b/cde/programs/dtmail/libDtMail/Common/Imakefile index 59fe0bdc..c934ebed 100644 --- a/cde/programs/dtmail/libDtMail/Common/Imakefile +++ b/cde/programs/dtmail/libDtMail/Common/Imakefile @@ -12,7 +12,8 @@ DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES) #include -INCLUDES = -I. -I../../include -I../../include/utils -I$(CDELIBSRC) $(STD_INCLUDES) +INCLUDES = -I. -I../../include -I../../include/utils -I$(CDELIBSRC) \ + $(STD_INCLUDES) $(TIRPCINC) #if HasVFork VFORK_DEFINES = -DHAS_VFORK diff --git a/cde/programs/dtmail/libDtMail/RFC/Imakefile b/cde/programs/dtmail/libDtMail/RFC/Imakefile index 410ea57e..fee03962 100644 --- a/cde/programs/dtmail/libDtMail/RFC/Imakefile +++ b/cde/programs/dtmail/libDtMail/RFC/Imakefile @@ -12,7 +12,8 @@ DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES) #include -INCLUDES = -I. -I../Common -I../../include -I../../include/utils -I$(CDELIBSRC) $(STD_INCLUDES) +INCLUDES = -I. -I../Common -I../../include -I../../include/utils \ + -I$(CDELIBSRC) $(STD_INCLUDES) $(TIRPCINC) #if HasVFork VFORK_DEFINES = -DHAS_VFORK diff --git a/cde/programs/dtpad/Imakefile b/cde/programs/dtpad/Imakefile index 600b2b65..b4300dec 100644 --- a/cde/programs/dtpad/Imakefile +++ b/cde/programs/dtpad/Imakefile @@ -2,6 +2,7 @@ XCOMM $XConsortium: Imakefile /main/11 1996/09/14 15:16:29 drk $ DEPEND_DEFINES = $(DEPENDDEFINES) DEFINES = -DDT_LITE -DWORDWRAP -UNLS16 +INCLUDES = $(TIRPCINC) DEPLIBS = DepDtClientLibs LOCAL_LIBRARIES = DtClientLibs diff --git a/cde/programs/dtsearchpath/dtsp/Imakefile b/cde/programs/dtsearchpath/dtsp/Imakefile index 8801e865..7e47ea47 100644 --- a/cde/programs/dtsearchpath/dtsp/Imakefile +++ b/cde/programs/dtsearchpath/dtsp/Imakefile @@ -4,7 +4,7 @@ XCOMM $TOG: Imakefile /main/15 1998/08/05 13:21:49 mgreess $ DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES) EXTRA_LOAD_FLAGS = ExtraLoadFlags $(UNSHARED_CXXLIB) -INCLUDES = -I. -I../libCliSrv +INCLUDES = -I. -I../libCliSrv $(TIRPCINC) LOCAL_LIBRARIES = ../libCliSrv/libCliSrv.a $(TTLIB) $(XTOOLLIB) $(XLIB) DEPLIBS = ../libCliSrv/libCliSrv.a $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB) diff --git a/cde/programs/dtsearchpath/libCliSrv/Imakefile b/cde/programs/dtsearchpath/libCliSrv/Imakefile index c844ed5a..6142db18 100644 --- a/cde/programs/dtsearchpath/libCliSrv/Imakefile +++ b/cde/programs/dtsearchpath/libCliSrv/Imakefile @@ -10,7 +10,7 @@ XCOMM $TOG: Imakefile /main/5 1998/08/05 13:22:12 mgreess $ #define CplusplusSource YES DEPEND_DEFINES = $(CXXDEPENDINCLUDES) $(DEPENDDEFINES) -INCLUDES = -I. +INCLUDES = -I. $(TIRPCINC) #ifdef SunArchitecture SYS_LIBRARIES = -ldl -lintl diff --git a/cde/programs/dtspcd/Imakefile b/cde/programs/dtspcd/Imakefile index b00ccd39..1931b635 100644 --- a/cde/programs/dtspcd/Imakefile +++ b/cde/programs/dtspcd/Imakefile @@ -2,7 +2,7 @@ XCOMM $TOG: Imakefile /main/11 1999/02/26 11:29:47 mgreess $ DEFINES = -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \ -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" -INCLUDES = -I. -I$(DTHELPSRC) +INCLUDES = -I. -I$(DTHELPSRC) $(TIRPCINC) #ifdef HPArchitecture EXTRA_DEFINES = -D_XOPEN_SOURCE -D__hpux_8_0 -DFUNCPROTO diff --git a/cde/programs/dtstyle/Imakefile b/cde/programs/dtstyle/Imakefile index 4f54ecec..8af15c18 100644 --- a/cde/programs/dtstyle/Imakefile +++ b/cde/programs/dtstyle/Imakefile @@ -3,7 +3,7 @@ XCOMM $XConsortium: Imakefile /main/8 1996/09/14 15:25:06 drk $ DEPEND_DEFINES = $(DEPENDDEFINES) DEFINES = -DCDE_INSTALLATION_TOP=\"$(CDE_INSTALLATION_TOP)\" \ -DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" -INCLUDES = -I. -I$(DTHELPSRC)/.. +INCLUDES = -I. -I$(DTHELPSRC)/.. $(TIRPCINC) DEPLIBS = DepDtClientLibs LOCAL_LIBRARIES = DtClientLibs diff --git a/cde/programs/dtterm/Imakefile b/cde/programs/dtterm/Imakefile index 4c5f45a0..84449415 100644 --- a/cde/programs/dtterm/Imakefile +++ b/cde/programs/dtterm/Imakefile @@ -49,7 +49,8 @@ LOCAL_LIBRARIES = $(DTTERMLIB) $(USE_XHPLIB) $(XINPUTLIB) $(HELPLIB) \ $(XMLIB) $(XTOOLLIB) $(XLIB) $(UTILLIB) SYS_LIBRARIES = DtClientSysLibs -INCLUDES = -I. -I$(DTTERMSRC)/TermPrim -I$(DTTERMSRC)/Term -I$(DTTERMSRC)/TermView +INCLUDES = -I. -I$(DTTERMSRC)/TermPrim -I$(DTTERMSRC)/Term \ + -I$(DTTERMSRC)/TermView $(TIRPCINC) SRCS = \ DtTermLogit.c \ diff --git a/cde/programs/dtwm/Imakefile b/cde/programs/dtwm/Imakefile index 74ec914d..82a67739 100644 --- a/cde/programs/dtwm/Imakefile +++ b/cde/programs/dtwm/Imakefile @@ -13,6 +13,7 @@ DTWMDEFINES = -DWSM -DPANELIST DEPEND_DEFINES = $(DEPENDDEFINES) DEFINES = $(MWMDEFINES) $(DTWMDEFINES) -DMULTIBYTE -DMINIMAL_DT +INCLUDES = $(TIRPCINC) DEPLIBS = DepDtClientLibs LOCAL_LIBRARIES = DtClientLibs -lDtXinerama diff --git a/cde/programs/ttsnoop/Imakefile b/cde/programs/ttsnoop/Imakefile index 8b303102..3bde4cef 100644 --- a/cde/programs/ttsnoop/Imakefile +++ b/cde/programs/ttsnoop/Imakefile @@ -6,6 +6,7 @@ UTILLIB = -lutil #define CplusplusSource YES DEPEND_DEFINES = $(CXXDEPENDINCLUDES) +INCLUDES = $(TIRPCINC) EXTRA_LOAD_FLAGS = ExtraLoadFlags $(UNSHARED_CXXLIB) DEPLIBS = $(DEPDTTERMLIB) DepDtClientLibs $(DEPUTILLIB) -- 2.25.1