#include <sys/file.h>
#include <sys/param.h>
#include <sys/stat.h>
-#include <signal.h>
+#include "runtime.h"
#ifndef LISP_FEATURE_WIN32
#include <sched.h>
#endif
#include <time.h>
#endif
+#if !(defined(LISP_FEATURE_WIN32) && defined(LISP_FEATURE_SB_THREAD))
#include "signal.h"
+#endif
#include "runtime.h"
#include "vars.h"
}
#endif /* LISP_FEATURE_WIN32 */
-long parse_size_arg(char *arg, char *arg_name)
+unsigned long parse_size_arg(char *arg, char *arg_name)
{
char *tail, *power_name;
- long power, res;
- res = strtol(arg, &tail, 0);
+ unsigned long power, res;
+
+ res = strtoul(arg, &tail, 0);
+
if (arg == tail) {
lose("%s argument is not a number: %s", arg_name, arg);
} else if (tail[0]) {
free(power_name);
}
if ((res <= 0) ||
- (res >= (LONG_MAX >> power))) {
+ (res > (ULONG_MAX >> power))) {
lose("%s argument is out of range: %s", arg_name, arg);
}
res <<= power;
struct runtime_options *runtime_options;
char *saved_runtime_path = NULL;
+#if defined(LISP_FEATURE_WIN32) && defined(LISP_FEATURE_SB_THREAD)
+void pthreads_win32_init();
+#endif
+
\f
int
main(int argc, char *argv[], char *envp[])
lispobj initial_function;
const char *sbcl_home = getenv("SBCL_HOME");
+#if defined(LISP_FEATURE_WIN32) && defined(LISP_FEATURE_SB_THREAD)
+ os_preinit();
+ pthreads_win32_init();
+#endif
+
interrupt_init();
block_blockable_signals(0, 0);
DYNAMIC_SPACE_START+dynamic_space_size) &&
(DYNAMIC_SPACE_START+dynamic_space_size <=
MAX_DYNAMIC_SPACE_END)))
- lose("--dynamic-space-size argument %s is too large, max %ldMiB",
+ lose("--dynamic-space-size argument %s is too large, max %lu",
argv[argi-1], MAX_DYNAMIC_SPACE_END-DYNAMIC_SPACE_START);
# endif
} else if (0 == strcmp(arg, "--control-stack-size")) {
* systems (e.g. Alpha) arch_init() needs need os_vm_page_size, so
* it must follow os_init(). -- WHN 2000-01-26 */
os_init(argv, envp);
+ dyndebug_init(); /* after os_init: do not print output before execve */
arch_init();
gc_init();
validate();