;;;; -*- coding: utf-8; -*-
+changes in sbcl-1.0.1 relative to sbcl-1.0:
+ * bug fix: fix handling of non-ascii command-line arguments (thanks to
+ Yaroslav Kavenchuk)
+
changes in sbcl-1.0 relative to sbcl-0.9.18:
* improvement: experimental support for threading on FreeBSD/x86.
(thanks to NIIMI Satoshi)
#!+sb-doc
"The absolute pathname of the running SBCL core.")
+(sb!alien:define-alien-variable ("posix_argv" *native-posix-argv*) (* (* char)))
+(sb!alien:define-alien-variable ("core_string" *native-core-string*) (* char))
+
;;; if something ever needs to be done differently for one OS, then
;;; split out the different part into per-os functions.
(defun os-cold-init-or-reinit ()
+ (/show0 "setting *CORE-STRING*")
+ (setf *core-string*
+ (sb!alien:cast *native-core-string* sb!alien:c-string))
+ (/show0 "setting *POSIX-ARGV*")
+ (setf sb!ext:*posix-argv*
+ (loop for i from 0
+ for arg = (sb!alien:deref *native-posix-argv* i)
+ until (sb!alien:null-alien arg)
+ collect (sb!alien:cast arg sb!alien:c-string)))
(/show0 "entering OS-COLD-INIT-OR-REINIT")
(setf *software-version* nil)
(/show0 "setting *DEFAULT-PATHNAME-DEFAULTS*")
return core;
}
- \f
+char **posix_argv;
+char *core_string;
+
+\f
int
main(int argc, char *argv[], char *envp[])
{
wos_install_interrupt_handlers(&exception_frame);
#endif
- /* Pass core filename into Lisp */
- SetSymbolValue(CORE_STRING, alloc_base_string(core),0);
- SHOW("freeing core");
- free(core);
-
- /* Convert remaining argv values to something that Lisp can grok. */
- SHOW("setting POSIX-ARGV symbol value");
- SetSymbolValue(POSIX_ARGV, alloc_base_string_list(sbcl_argv),0);
- free(sbcl_argv);
+ /* Pass core filename and the processed argv into Lisp. They'll
+ * need to be processed further there, to do locale conversion.
+ */
+ core_string = core;
+ posix_argv = sbcl_argv;
FSHOW((stderr, "/funcalling initial_function=0x%lx\n",
(unsigned long)initial_function));
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0"
+"1.0.0.1"