int patch_version;
char *p;
uname(&name);
+
p=name.release;
major_version = atoi(p);
- p=strchr(p,'.')+1;
- minor_version = atoi(p);
- p=strchr(p,'.')+1;
- patch_version = atoi(p);
+ minor_version = patch_version = 0;
+ p=strchr(p,'.');
+ if (p != NULL) {
+ minor_version = atoi(++p);
+ p=strchr(p,'.');
+ if (p != NULL)
+ patch_version = atoi(++p);
+ }
+
if (major_version<2) {
lose("linux kernel version too old: major version=%d (can't run in version < 2.0.0)\n",
major_version);
* Since randomization is currently implemented only on x86 kernels,
* don't do this trick on other platforms.
*/
-#ifdef LISP_FEATURE_X86
+#if defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64)
if ((major_version == 2
/* Some old kernels will apparently lose unsupported personality flags
* on exec() */
fprintf(stderr, "WARNING: Couldn't re-execute SBCL with the proper personality flags (maybe /proc isn't mounted?). Trying to continue anyway.\n");
}
}
+#ifdef LISP_FEATURE_X86
/* Use SSE detector. Recent versions of Linux enable SSE support
* on SSE capable CPUs. */
/* FIXME: Are there any old versions that does not support SSE? */
fast_bzero_pointer = fast_bzero_detect;
#endif
+#endif
}
lose("An mprotect call failed with ENOMEM. This probably means that the maximum amount\n"
"of separate memory mappings was exceeded. To fix the problem, either increase\n"
"the maximum with e.g. 'echo 262144 > /proc/sys/vm/max_map_count' or recompile\n"
- "SBCL with a larger value for GENCGC-PAGE-SIZE in 'src/target/parms.lisp'.");
+ "SBCL with a larger value for GENCGC-CARD-BYTES in\n"
+ "'src/compiler/target/backend-parms.lisp'.");
} else {
perror("mprotect");
}
}
char *
-os_get_runtime_executable_path()
+os_get_runtime_executable_path(int external)
{
char path[PATH_MAX + 1];
int size;