diff --git a/cde/config/cf/site.def b/cde/config/cf/site.def index 785d25945..3b8bb82f5 100644 --- a/cde/config/cf/site.def +++ b/cde/config/cf/site.def @@ -126,7 +126,9 @@ XCOMM or building non-C locales will cause build failures. XCOMM Make sure you have installed the de_DE, es_ES, fr_FR and it_IT locales. XCOMM or building non-C locales will cause build failures. XCOMM DtLocalesToBuild: de_DE.ISO8859-1 es_ES.ISO8859-1 fr_FR.ISO8859-1 it_IT.ISO8859-1 en_US.UTF-8 -# define DtLocalesToBuild en_US.UTF-8 +# if !defined(DtLocalesToBuild) +# define DtLocalesToBuild en_US.UTF-8 +# endif # define UTF8_NLS_SUPPORT #endif diff --git a/cde/config/cf/sun.cf b/cde/config/cf/sun.cf index e238bd214..86f21f39e 100644 --- a/cde/config/cf/sun.cf +++ b/cde/config/cf/sun.cf @@ -29,8 +29,7 @@ XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe * configuration varibles used here. * * If you don't tell us which C compiler you have, we assume you have - * the Gcc C compiler under Solaris 5.x. - * under SunOS 4.1.x + * the Gcc C compiler under Solaris 2.x. * * === C++ Compiler Setup ========================================== * @@ -43,8 +42,8 @@ XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVe * In any case, you may also need to set CplusplusDependIncludes. * * If you say you have the SunPro C++ compiler, we assume you have - * version 5.0.x of the compiler. If you have version 4.0.x instead, - * define CplusplusCompilerMajorVersion as 4 in host.def. + * version 5.0.x of the compiler. If you have an earlier version + * instead, define CplusplusCompilerMajorVersion in host.def. * */ @@ -182,8 +181,10 @@ XCOMM Gnu C++ CplusplusCompilerMajorVersion./**/CplusplusCompilerMinorVersion # define OptimizedCplusplusDebugFlags -O2 -erroff=attrskipunsup #endif #ifndef CplusplusDependIncludes -#if CplusplusCompilerMajorVersion > 3 +#if CplusplusCompilerMajorVersion > 4 # define CplusplusDependIncludes -I/opt/solarisstudio/prod/include/CC -I/opt/solarisstudio/prod/include/CC/Cstd -I/opt/solarisstudio/prod/include/CC/std +#elif CplusplusCompilerMajorVersion > 3 +# define CplusplusDependIncludes -I/opt/SUNWspro/SC4.0/include/CC #elif CplusplusCompilerMajorVersion > 2 # define CplusplusDependIncludes -I/opt/SUNWspro/SC3.0/include/CC #else diff --git a/cde/lib/tt/lib/util/tt_host.C b/cde/lib/tt/lib/util/tt_host.C index f73fd4bac..d608b57e1 100644 --- a/cde/lib/tt/lib/util/tt_host.C +++ b/cde/lib/tt/lib/util/tt_host.C @@ -207,7 +207,38 @@ init_byname(_Tt_string name) memset((char*) &host_buf, 0, sizeof(_Xgethostbynameparams)); if (name.len() == 0) { - _name = _tt_gethostname(); + /* JET - many machines in this modern era have a hostname + * that does not have an IP address associated with it. + * So, we do a quick check to see if XGethostbyname() is + * happy with the returned name. If it isn't, then we set + * the name to "localhost", which should always exist on + * any machine with IP networking. If your machine does + * not have IP networking, you shouldn't be running TT :) + * + * This should fix those cases, particularly on BSD + * machines, whereby TT fails to start. They should no + * longer need to add their hostname manually to + * /etc/hosts (as an alias to localhost) in order to start + * CDE + */ + _name = _tt_gethostname(); + if(!_XGethostbyname((char *)_name, host_buf)) + { + /* this gets a little verbose - you see one for every + * client, so if-0 out. Leave for future debugging + * though... + */ +#if 0 + _tt_syslog(0, LOG_WARNING, "_XGethostbyname(%s) failed," + " defaulting to localhost", + (const char *)_name); +#endif + + /* fall back to localhost */ + _name = "localhost"; + } + /* clear host_buf again, for the final run below */ + memset((char*) &host_buf, 0, sizeof(_Xgethostbynameparams)); } else { qual = name.split(':',_name); if (_name.len()== 0) { diff --git a/cde/programs/dtmail/dtmail/FindDialog.C b/cde/programs/dtmail/dtmail/FindDialog.C index 1f489b5b2..cef88a7d5 100644 --- a/cde/programs/dtmail/dtmail/FindDialog.C +++ b/cde/programs/dtmail/dtmail/FindDialog.C @@ -729,13 +729,13 @@ FindDialog::compareMessage(DtMailMessageHandle handle) return(found); } -#if !defined(CSRG_BASED) && !defined(__linux__) && !defined(sun) +#if !defined(CSRG_BASED) && !defined(__linux__) // // See if string 'toFind' is anyware in string 'str'. // A case-insensitive version of strstr(). // static const char * -strcasestr(const char *str, const char *toFind) +FindDialog::strcasestr(const char *str, const char *toFind) { const char *result = NULL; // Default to not found. diff --git a/cde/programs/dtmail/dtmail/FindDialog.h b/cde/programs/dtmail/dtmail/FindDialog.h index b3dc141db..2b99d44b1 100644 --- a/cde/programs/dtmail/dtmail/FindDialog.h +++ b/cde/programs/dtmail/dtmail/FindDialog.h @@ -102,6 +102,11 @@ private: Boolean compareMessage(DtMailMessageHandle handle); + #if !defined(CSRG_BASED) && !defined(__linux__) + static const char * strcasestr(const char *str, + const char *toFind); + #endif + Boolean compareHeader(DtMailEnv & error, DtMailValueSeq & seq, const char * cmpToString);