Patches to enable compilation on OpenBSD 5.7/FreeBSD 10.1.
authorDouglas Carmichael <dcarmich@dcarmichael.net>
Sun, 14 Jun 2015 16:10:36 +0000 (11:10 -0500)
committerJon Trulson <jon@radscan.com>
Wed, 17 Jun 2015 17:31:31 +0000 (11:31 -0600)
cde/doc/util/dbtoman/instant/main.c
cde/programs/dtlogin/genauth.c
cde/programs/dtlogin/session.c

index 712c1ec2c071738fbc6428d4a98c4c1ea3729f23..74a0adddbba6211cd1a3e0b519521fec01564b21 100644 (file)
@@ -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;
index 357baf0bb4aea91d7949be3b5ff478cf6043a3c5..38e81eeb7acae6ec36ac29daa83577baf6abd5c1 100644 (file)
@@ -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)
index 9a42844737f8f62f0cf4b8aa6723c4a205c404f0..5bdb48c287cae242da4d622d1eaedc9a0a9f5e57 100644 (file)
@@ -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",