Better initialization of ir2-component-constants on x86-64.
[sbcl.git] / src / runtime / runtime.c
index 7548e1c..cacc9c7 100644 (file)
@@ -95,7 +95,7 @@ void
 sigint_init(void)
 {
     SHOW("entering sigint_init()");
-    install_handler(SIGINT, sigint_handler);
+    install_handler(SIGINT, sigint_handler, 1);
     SHOW("leaving sigint_init()");
 }
 \f
@@ -287,6 +287,18 @@ search_for_executable(const char *argv0)
             return search;
         }
     }
+    /* The above for-loop fails to process the last part of PATH if PATH does
+     * not end with ':'. We may consider appending an extra ':' to the end of
+     * SEARCH.  -- houjingyi 2013-05-24 */
+    if (start != NULL && *start != '\0') {
+        snprintf(buf, PATH_MAX + 1, "%s/%s", start, argv0);
+        if (access(buf, F_OK) == 0) {
+            free(search);
+            search = copied_realpath(buf);
+            free(buf);
+            return search;
+        }
+    }
 
     free(search);
     free(buf);
@@ -362,7 +374,7 @@ void setup_locale()
 #ifndef LISP_FEATURE_WIN32
 
     fprintf(stderr, "WARNING: Setting locale failed.\n");
-    fprintf(stderr, "  Check the following varaibles for correct values:");
+    fprintf(stderr, "  Check the following variables for correct values:");
 
     if (setlocale(LC_CTYPE, "") == NULL) {
       print_locale_variable("LC_ALL");