From: Douglas Carmichael Date: Sun, 14 Jun 2015 16:10:36 +0000 (-0500) Subject: Patches to enable compilation on OpenBSD 5.7/FreeBSD 10.1. X-Git-Tag: 2.2.4~32 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=aaab59761f9cf4c77099f06246c2b9a0945cb249;p=oweals%2Fcde.git Patches to enable compilation on OpenBSD 5.7/FreeBSD 10.1. --- diff --git a/cde/doc/util/dbtoman/instant/main.c b/cde/doc/util/dbtoman/instant/main.c index 712c1ec2..74a0addd 100644 --- a/cde/doc/util/dbtoman/instant/main.c +++ b/cde/doc/util/dbtoman/instant/main.c @@ -585,7 +585,7 @@ ReadESIS( stripNL(buf); if (do_DATAhack && (buf[0] == '\\') && (buf[1] == 'n') ) { buf[0] = -1; /* simulate "^" command */ - memcpy(&buf[1], &buf[2], strlen(buf)-1); + memmove(&buf[1], &buf[2], strlen(buf)-1); } cont[ncont].ch.data = strdup(buf); cont[ncont].type = CMD_DATA; diff --git a/cde/programs/dtlogin/genauth.c b/cde/programs/dtlogin/genauth.c index 357baf0b..38e81eeb 100644 --- a/cde/programs/dtlogin/genauth.c +++ b/cde/programs/dtlogin/genauth.c @@ -123,6 +123,9 @@ extern int errno; # ifdef __FreeBSD__ # define USE_CRYPT # endif +# ifdef __OpenBSD__ +# define USE_CRYPT +# endif # ifdef sun # define USE_CRYPT # if (OSMAJORVERSION >= 4) diff --git a/cde/programs/dtlogin/session.c b/cde/programs/dtlogin/session.c index 9a428447..5bdb48c2 100644 --- a/cde/programs/dtlogin/session.c +++ b/cde/programs/dtlogin/session.c @@ -644,8 +644,6 @@ int LoadXloginResources( struct display *d ) { char cmd[1024]; - char *language = NULL; - char *lang_key=""; char *authority=""; char *auth_key=""; char *resources = NULL; @@ -675,27 +673,6 @@ LoadXloginResources( struct display *d ) auth_key = "XAUTHORITY="; } - if (d->language && strlen(d->language) > 0 ) { - language = strdup(d->language); - lang_key = "-D"; - } - - /* - * replace any "-" or "." in the language name with "_". The C - * preprocessor used by xrdb does not accept "-" or "." in a name. - */ - - while ( (p = strchr(language, '-')) != NULL ) { - *p = '_'; - } - - while ( (p = strchr(language, '.')) != NULL ) { - *p = '_'; - } - - free(language); - - Debug("LoadXloginResources - loading resource db from %s\n", resources); if((XresourceDB = XrmGetFileDatabase(resources)) == NULL) Debug("LoadXloginResources - Loading resource db from %s failed\n",