diff --git a/cde/programs/dticon/Imakefile b/cde/programs/dticon/Imakefile index 1f147e843..898a1357f 100644 --- a/cde/programs/dticon/Imakefile +++ b/cde/programs/dticon/Imakefile @@ -53,6 +53,11 @@ SYS_LIBRARIES = -lm -ldl -lgen EXTRA_DEFINES = #endif +XCOMM On Linux once you link against a C++ library the whole program +XCOMM has to be linked with the C++ linker +#if defined(LinuxDistribution) +CCLINK = $(CXX) +#endif SRCS = dtIconShell.c event.c fileIO.c \ fileIODialog.c globals.c graphics.c \ diff --git a/cde/programs/dticon/constants.h b/cde/programs/dticon/constants.h index a2972ed37..9b4be16c8 100644 --- a/cde/programs/dticon/constants.h +++ b/cde/programs/dticon/constants.h @@ -97,8 +97,10 @@ typedef struct { #define min(a, b) ((a < b) ? a : b) #define max(a, b) ((a > b) ? a : b) #ifndef abs +#if !defined(linux) #define abs(a) (((a) < 0) ? -(a) : (a)) #endif +#endif #define mag(a,b) ((a-b) < 0 ? (b-a) : (a-b)) #define DARK 0 diff --git a/cde/programs/localized/util/merge.c b/cde/programs/localized/util/merge.c index 8a31625a3..7e247d62b 100644 --- a/cde/programs/localized/util/merge.c +++ b/cde/programs/localized/util/merge.c @@ -247,7 +247,13 @@ void cat_open () sprintf(line,"/usr/bin/gencat ./.dt_pfile.cat %s",pfile); #endif if ( system(line) != 0 ) + { + /* Utter Linux HACK, it seems the return value of GNU gencat is != 0 + even on success */ +#if !defined(linux) fatal("primary .tmsg file would not gencat\n",0,9); +#endif + } } catfile[0] = catopen("./.dt_pfile.cat",0); @@ -260,7 +266,14 @@ void cat_open () sprintf(line,"/usr/bin/gencat ./.dt_dfile.cat %s",dfile); #endif if ( system(line) != 0 ) + { + /* Utter Linux HACK, it seems the return value of GNU gencat is != 0 + even on success */ +#if !defined(linux) fatal("default .tmsg file would not gencat\n",0,9); +#endif + } + } catfile[1] = catopen("./.dt_dfile.cat",0);