diff --git a/contrib/encodings/generate.lisp b/contrib/encodings/generate.lisp index 05dce94d6d059b064675262c007faa977959515f..0ce10f1ae7321da81d29aa8cadbbccd7c0a14179 100644 --- a/contrib/encodings/generate.lisp +++ b/contrib/encodings/generate.lisp @@ -17,7 +17,7 @@ ;;for orig = (make-pathname :name name :type "BIN" :defaults "ext:encodings;") ;;for copy = (ensure-directories-exist (merge-pathnames "build:encodings;" orig)) for orig = (make-pathname :name name :type "BIN" :defaults "../contrib/encodings/") - for copy = (ensure-directories-exist (make-pathname :directory '(:relative "encodings") :defaults orig)) + for copy = (ensure-directories-exist (make-pathname :directory '(:relative "ENCODINGS") :defaults orig)) do (progn (unless (probe-file orig) (format t "~&Mapping file ~A is missing. Update needed.~%" orig) @@ -88,15 +88,15 @@ (loop for (name . aliases) in +aliases+ do (loop for alias in aliases - ;;for filename0 = (make-pathname :name (symbol-name alias) :defaults "build:encodings;") - for filename0 = (make-pathname :name (symbol-name alias) :defaults "./encodings/") + ;;for filename0 = (make-pathname :name (symbol-name alias) :defaults "build:ENCODINGS;") + for filename0 = (make-pathname :name (symbol-name alias) :defaults "./ENCODINGS/") for filename = (ensure-directories-exist filename0) do (with-open-file (out filename :direction :output :if-exists :supersede :if-does-not-exist :create :external-format '(:ascii :lf)) (when *generate-verbose* (format t "~%;;; Creating alias ~A -> ~A, ~A" alias name filename)) (format out "(defparameter mk-ext::~A (si::make-encoding 'mk-ext::~A))~%" alias name)))) -;;(copy-file "../contrib/encodings/tools.lisp" "./encodings/tools.lisp" :verbose *generate-verbose*) -(copy-file "../contrib/encodings/ISO-2022-JP" "./encodings/ISO-2022-JP" :verbose *generate-verbose*) -(copy-file "../contrib/encodings/ISO-2022-JP-1" "./encodings/ISO-2022-JP-1" :verbose *generate-verbose*) +;;(copy-file "../contrib/encodings/tools.lisp" "./ENCODINGS/tools.lisp" :verbose *generate-verbose*) +(copy-file "../contrib/encodings/ISO-2022-JP" "./ENCODINGS/ISO-2022-JP" :verbose *generate-verbose*) +(copy-file "../contrib/encodings/ISO-2022-JP-1" "./ENCODINGS/ISO-2022-JP-1" :verbose *generate-verbose*) (when *generate-verbose* (terpri) (terpri)) diff --git a/src/Makefile.in b/src/Makefile.in index f47709f85f3b43a794cda9fe64db4697420448e4..ae149733972990b943564ed5d847ea285f1d34a9 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -22,8 +22,6 @@ srcdir = @srcdir@ @SET_MAKE@ CC = @MKCL_CC@ LIBS = @TCP_LIBS@ @LIBS@ -FASL_LIBS = @FASL_LIBS@ -CORE_LIBS = @CORE_LIBS@ LDFLAGS = @LDFLAGS@ RM = @RM@ LN_S = @LN_S@ @@ -68,12 +66,13 @@ MKCL_HFILES = mkcl/config.h \ mkcl/mkcl-gc.h \ mkcl/mkcl-inl.h \ mkcl/mkcl-math.h \ + mkcl/mkcl-unicode.h \ mkcl/number.h \ mkcl/object.h \ mkcl/stacks.h -# mkcl/cs.h \ -ASDF_FASLS = asdf.fasb ../contrib/asdf-bundle/mkcl.fas + +ASDF_FASLS = asdf.fasb ../contrib/asdf-bundle/asdf-bundle.fas CONTRIB_FASLS = \ bytecmp.fasb \ @@ -98,7 +97,7 @@ BUILTINS = asdf profile rt serve-event sockets MKCL_STATIC_PARTS = @LIBPREFIX@mkcltop.@LIBEXT@ liblsp.a @LIBPREFIX@mkclmin.@LIBEXT@ -all: bin/mkcl-config $(TARGETS) $(ASDF_FASLS) $(CONTRIB_FASLS) help.doc +all: bin/mkcl-config $(TARGETS) $(ASDF_FASLS) $(CONTRIB_FASLS) HELP.DOC .PHONY: all Makefile: Makefile.in config.status @@ -109,7 +108,7 @@ mkcl/config.h: mkcl/config.h.in touch mkcl/config.h -bin/mkcl-small$(EXE) liblsp.a $(LSP_LIBRARIES) encodings: mkcl_min$(EXE) @LIBPREFIX@mkcltop.@LIBEXT@ compile.lsp lsp/config.lsp cmp/cmpdefs.lsp lsp/*.lsp clos/*.lsp cmp/*.lsp mkcl/mkcl-cmp.h mkcl/config.h BUILD-STAMP ucd.dat +bin/mkcl-small$(EXE) liblsp.a $(LSP_LIBRARIES) ENCODINGS: compile.lsp lsp/config.lsp cmp/cmpdefs.lsp lsp/*.lsp clos/*.lsp cmp/*.lsp mkcl/mkcl-cmp.h mkcl/config.h BUILD-STAMP mkcl_min$(EXE) @LIBPREFIX@mkcltop.@LIBEXT@ MKCL_LIBDIR=`pwd`/ ./mkcl_min$(EXE) compile for i in $(LSP_LIBRARIES) ; do \ if test -s $$i ; then \ @@ -120,9 +119,6 @@ bin/mkcl-small$(EXE) liblsp.a $(LSP_LIBRARIES) encodings: mkcl_min$(EXE) @LIBPRE fi \ done -ucd.dat: ../contrib/unicode/ucd.dat - cp ../contrib/unicode/ucd.dat . - asdf.fasb libasdf.a: bin/mkcl-small$(EXE) build-asdf.lsp ../contrib/asdf/*.lisp MKCL_LIBDIR=$$(pwd)/ bin/mkcl-small$(EXE) -norc -q --external-format "(:ascii :lf)" -load build-asdf.lsp @@ -149,7 +145,7 @@ walker.fasb walker.a: bin/mkcl-small$(EXE) build-serve-event.lsp ../contrib/walk MKCL_LIBDIR=$$(pwd)/ bin/mkcl-small$(EXE) -norc -q --external-format "(:ascii :lf)" -load build-walker.lsp -../contrib/asdf-bundle/mkcl.fas: bin/mkcl-small$(EXE) build-asdf-bundle.lsp ../contrib/asdf-bundle/*.lisp +../contrib/asdf-bundle/asdf-bundle.fas: bin/mkcl-small$(EXE) build-asdf-bundle.lsp ../contrib/asdf-bundle/*.lisp if [ "$${LOCALAPPDATA}" ]; then (cd "$${LOCALAPPDATA}"; rm -rf ./common-lisp/cache/mkcl-*); elif [ "$${APPDATA}" ]; then (cd "$${APPDATA}"; rm -rf ./common-lisp/cache/mkcl-*); else rm -rf $$HOME/.cache/common-lisp/mkcl-*/$$(cd ..;pwd -P)/contrib/asdf-bundle; fi MKCL_LIBDIR=$$(pwd)/ bin/mkcl-small$(EXE) -norc -q --external-format "(:ascii :lf)" -load build-asdf-bundle.lsp @@ -212,15 +208,12 @@ bin/mkcl-full$(EXE): bin/mkcl-small$(EXE) build-full-mkcl.lsp $(BUILTINS) MKCL_LIBDIR=$$(pwd)/ bin/mkcl-small$(EXE) -norc -q --external-format "(:ascii :lf)" -load build-full-mkcl.lsp -- $(BUILTINS) endif -help.doc: dump-doc.lsp bin/mkcl$(EXE) doc/help.lsp - MKCL_LIBDIR=$$(pwd)/ bin/mkcl$(EXE) -norc -q --external-format "(:ascii :lf)" -load dump-doc.lsp - -#encodings: bin/mkcl-small$(EXE) generate-encodings.lsp -# MKCL_LIBDIR=$$(pwd)/ bin/mkcl-small$(EXE) -norc -q --external-format "(:ascii :lf)" -load generate-encodings.lsp +HELP.DOC: dump-doc.lsp bin/mkcl$(EXE) doc/help.lsp + MKCL_LIBDIR=$$(pwd)/ bin/mkcl-small$(EXE) -norc -q --external-format "(:ascii :lf)" -load dump-doc.lsp mkcl_min$(EXE): $(LIBRARIES) @LIBPREFIX@mkclgc.@LIBEXT@ @LIBPREFIX@mkclmin.@LIBEXT@ c/cinit.o c/all_symbols.o .gdbinit - $(CC) $(LDFLAGS) -o $@ c/cinit.o c/all_symbols.o @LIBPREFIX@mkclmin.@LIBEXT@ $(LIBRARIES) $(FASL_LIBS) $(LIBS) + $(CC) $(LDFLAGS) -o $@ c/cinit.o c/all_symbols.o @LIBPREFIX@mkclmin.@LIBEXT@ $(LIBRARIES) $(LIBS) .gdbinit: util/gdbinit @@ -287,13 +280,6 @@ gc/.libs/@LIBPREFIX@gc.@LIBEXT@: mkdir -p mkcl/gc cp -p gc/include/*.h mkcl/gc -# gmp/.libs/@LIBPREFIX@gmp.@LIBEXT@: -# cd gmp; $(MAKE) - -# @LIBPREFIX@mkclgmp.@LIBEXT@: gmp/.libs/@LIBPREFIX@gmp.@LIBEXT@ -# cp -p gmp/.libs/@LIBPREFIX@gmp.@LIBEXT@ ./@LIBPREFIX@mkclgmp.@LIBEXT@ -# cp -p gmp/gmp.h mkcl/ - mkcl/mkcl-cmp.h: mkcl/mkcl.h c/symbols_list.h touch $@ @@ -320,23 +306,21 @@ install-base: all mkcl/config-install.h for i in $(TARGETS); do \ $(INSTALL_PROGRAM) $$i $(bindir); \ done - $(INSTALL_DATA) ucd.dat $(mkcldir)/ - if [ -d encodings ]; then \ - $(mkinstalldirs) $(mkcldir)/encodings; \ - for i in ./encodings/*; do \ - $(INSTALL_DATA) $$i $(mkcldir)/encodings; \ + if [ -d ENCODINGS ]; then \ + $(mkinstalldirs) $(mkcldir)/ENCODINGS; \ + for i in ./ENCODINGS/*; do \ + $(INSTALL_DATA) $$i $(mkcldir)/ENCODINGS; \ done \ fi $(INSTALL_DATA) ./mkcl/*.h $(includedir)/mkcl if (echo $(SUBDIRS) | grep gc); then \ $(mkinstalldirs) $(includedir)/mkcl/gc; \ $(INSTALL_DATA) ./mkcl/gc/*.h $(includedir)/mkcl/gc; \ - #$(INSTALL_DATA) ./mkcl/gc/private/*.h $(includedir)/mkcl/gc/private; \ fi rm $(includedir)/mkcl/config.h mv $(includedir)/mkcl/config-install.h $(includedir)/mkcl/config.h $(INSTALL_SCRIPT) bin/mkcl-config $(bindir) - for i in BUILD-STAMP help.doc ; do \ + for i in BUILD-STAMP HELP.DOC ; do \ $(INSTALL_DATA) $$i $(mkcldir); \ done for i in $(LSP_LIBRARIES); do \ @@ -366,7 +350,7 @@ install-base: all mkcl/config-install.h if [ -f libcmp.a ] ; then $(INSTALL_DATA) libcmp.a $(mkcldir); fi $(INSTALL_PROGRAM) cmp.fasb $(mkcldir) -install-contribs: $(ASDF_FASLS) $(CONTRIB_FASLS) # $(CONTRIB_STATIC_LIBS) +install-contribs: $(ASDF_FASLS) $(CONTRIB_FASLS) $(mkinstalldirs) $(mkcldir)/contrib/ for i in *.asd; do $(INSTALL_DATA) $${i} $(mkcldir)/contrib/; done for i in asdf.fasb $(CONTRIB_FASLS) $(CONTRIB_STATIC_LIBS); do \ @@ -391,11 +375,10 @@ install-base-local: all mkcl/config-install.h $(localmkcldir) ./include/ ./include//mkcl $(INSTALL_DATA) ../Copyright ../LGPL $(localmkcldir) $(INSTALL_DATA) ../Copyright ../LGPL ./include/mkcl - $(INSTALL_DATA) ucd.dat $(localmkcldir)/ - if [ -d encodings ]; then \ - $(mkinstalldirs) $(localmkcldir)/encodings; \ - for i in ./encodings/*; do \ - $(INSTALL_DATA) $$i $(localmkcldir)/encodings; \ + if [ -d ENCODINGS ]; then \ + $(mkinstalldirs) $(localmkcldir)/ENCODINGS; \ + for i in ./ENCODINGS/*; do \ + $(INSTALL_DATA) $$i $(localmkcldir)/ENCODINGS; \ done \ fi $(INSTALL_DATA) ./mkcl/*.h ./include//mkcl @@ -405,7 +388,7 @@ install-base-local: all mkcl/config-install.h fi rm ./include//mkcl/config.h mv ./include//mkcl/config-install.h ./include//mkcl/config.h - for i in BUILD-STAMP help.doc ; do \ + for i in BUILD-STAMP HELP.DOC ; do \ $(INSTALL_DATA) $$i $(localmkcldir); \ done for i in $(LSP_LIBRARIES); do \ @@ -469,8 +452,8 @@ clean: clean_lisp clean_contribs $(RM) mkcl_min$(EXE) bin/mkcl$(EXE) bin/mkcl-dyn bin/mkcl-small$(EXE) bin/mkcl-full$(EXE) $(RM) MKCLINIT* bin/MKCLINIT* $(RM) MKC*.c MKC*.tmp bin/MKC*.c bin/MKC*.tmp - $(RM) -r encodings - $(RM) MODULES help.doc TAGS *.asd ucd.dat + $(RM) -r ENCODINGS + $(RM) MODULES HELP.DOC TAGS *.asd $(RM) mkcl/gc/*.h ./@LIBPREFIX@mkclgc.@LIBEXT@ $(RM) mkcl/gmp.h ./@LIBPREFIX@mkclgmp.@LIBEXT@ $(RM) *.dll bin/*.dll @@ -487,7 +470,7 @@ clean_lisp: for i in lsp cmp clos; \ do $(RM) lib$$i.a $$i/?*.{o,data,c,sdat,h,fasb,fas}; done $(RM) lsp/config.lsp cmp/cmpdefs.lsp - $(RM) help.doc + $(RM) HELP.DOC distclean: clean cd c; $(MAKE) distclean diff --git a/src/Makefile.w64 b/src/Makefile.w64 index f9299ebda06f3870787dab3b0aa08a5050d1c78f..3113b83266efc68f7db45b6e930b409025c8bb78 100644 --- a/src/Makefile.w64 +++ b/src/Makefile.w64 @@ -13,8 +13,8 @@ # See file '../Copyright' for full details. # # -top_srcdir= /usr/home/Jean-Claude/mkcl/src -srcdir = /usr/home/Jean-Claude/mkcl/src +top_srcdir= /usr/home/Jean-Claude/mkcl-1.1.2/src +srcdir = /usr/home/Jean-Claude/mkcl-1.1.2/src # Programs used by "make": # @@ -22,8 +22,6 @@ srcdir = /usr/home/Jean-Claude/mkcl/src CC = gcc LIBS = /mingw/lib/libgmp.a -lws2_32 -lm -FASL_LIBS = -CORE_LIBS = libmkclgc.a LDFLAGS = RM = rm -f LN_S = ln -s @@ -40,8 +38,8 @@ exec_prefix=${prefix} bindir=${exec_prefix}/bin/ libdir=${exec_prefix}/lib/ includedir=${prefix}/include/ -mkcldir=${exec_prefix}/lib/mkcl-1.1.1/ -localmkcldir=./lib/mkcl-1.1.1/ +mkcldir=${exec_prefix}/lib/mkcl-1.1.2/ +localmkcldir=./lib/mkcl-1.1.2/ # Programs used by "make install": # @@ -57,7 +55,7 @@ mkinstalldirs = $(SHELL) ./gc/mkinstalldirs SUBDIRS = c gc LIBRARIES = libmkclgc.a -LSP_LIBRARIES = mkcl_1.1.1.dll +LSP_LIBRARIES = mkcl_1.1.2.dll TARGETS = bin/mkcl$(EXE) MKCL_HFILES = mkcl/config.h \ @@ -68,12 +66,13 @@ MKCL_HFILES = mkcl/config.h \ mkcl/mkcl-gc.h \ mkcl/mkcl-inl.h \ mkcl/mkcl-math.h \ + mkcl/mkcl-unicode.h \ mkcl/number.h \ mkcl/object.h \ mkcl/stacks.h -# mkcl/cs.h \ -ASDF_FASLS = asdf.fasb ../contrib/asdf-bundle/mkcl.fas + +ASDF_FASLS = asdf.fasb ../contrib/asdf-bundle/asdf-bundle.fas CONTRIB_FASLS = \ bytecmp.fasb \ @@ -98,7 +97,7 @@ BUILTINS = asdf profile rt serve-event sockets MKCL_STATIC_PARTS = libmkcltop.a liblsp.a libmkclmin.a -all: bin/mkcl-config $(TARGETS) $(ASDF_FASLS) $(CONTRIB_FASLS) help.doc +all: bin/mkcl-config $(TARGETS) $(ASDF_FASLS) $(CONTRIB_FASLS) HELP.DOC .PHONY: all Makefile: Makefile.in config.status @@ -109,7 +108,7 @@ mkcl/config.h: mkcl/config.h.in touch mkcl/config.h -bin/mkcl-small$(EXE) liblsp.a $(LSP_LIBRARIES) encodings: mkcl_min$(EXE) libmkcltop.a compile.lsp lsp/config.lsp cmp/cmpdefs.lsp lsp/*.lsp clos/*.lsp cmp/*.lsp mkcl/mkcl-cmp.h mkcl/config.h BUILD-STAMP ucd.dat +bin/mkcl-small$(EXE) liblsp.a $(LSP_LIBRARIES) ENCODINGS: compile.lsp lsp/config.lsp cmp/cmpdefs.lsp lsp/*.lsp clos/*.lsp cmp/*.lsp mkcl/mkcl-cmp.h mkcl/config.h BUILD-STAMP mkcl_min$(EXE) libmkcltop.a MKCL_LIBDIR=`pwd`/ ./mkcl_min$(EXE) compile for i in $(LSP_LIBRARIES) ; do \ if test -s $$i ; then \ @@ -120,9 +119,6 @@ bin/mkcl-small$(EXE) liblsp.a $(LSP_LIBRARIES) encodings: mkcl_min$(EXE) libmkcl fi \ done -ucd.dat: ../contrib/unicode/ucd.dat - cp ../contrib/unicode/ucd.dat . - asdf.fasb libasdf.a: bin/mkcl-small$(EXE) build-asdf.lsp ../contrib/asdf/*.lisp MKCL_LIBDIR=$$(pwd)/ bin/mkcl-small$(EXE) -norc -q --external-format "(:ascii :lf)" -load build-asdf.lsp @@ -149,7 +145,7 @@ walker.fasb walker.a: bin/mkcl-small$(EXE) build-serve-event.lsp ../contrib/walk MKCL_LIBDIR=$$(pwd)/ bin/mkcl-small$(EXE) -norc -q --external-format "(:ascii :lf)" -load build-walker.lsp -../contrib/asdf-bundle/mkcl.fas: bin/mkcl-small$(EXE) build-asdf-bundle.lsp ../contrib/asdf-bundle/*.lisp +../contrib/asdf-bundle/asdf-bundle.fas: bin/mkcl-small$(EXE) build-asdf-bundle.lsp ../contrib/asdf-bundle/*.lisp if [ "$${LOCALAPPDATA}" ]; then (cd "$${LOCALAPPDATA}"; rm -rf ./common-lisp/cache/mkcl-*); elif [ "$${APPDATA}" ]; then (cd "$${APPDATA}"; rm -rf ./common-lisp/cache/mkcl-*); else rm -rf $$HOME/.cache/common-lisp/mkcl-*/$$(cd ..;pwd -P)/contrib/asdf-bundle; fi MKCL_LIBDIR=$$(pwd)/ bin/mkcl-small$(EXE) -norc -q --external-format "(:ascii :lf)" -load build-asdf-bundle.lsp @@ -212,15 +208,12 @@ bin/mkcl-full$(EXE): bin/mkcl-small$(EXE) build-full-mkcl.lsp $(BUILTINS) MKCL_LIBDIR=$$(pwd)/ bin/mkcl-small$(EXE) -norc -q --external-format "(:ascii :lf)" -load build-full-mkcl.lsp -- $(BUILTINS) endif -help.doc: dump-doc.lsp bin/mkcl$(EXE) doc/help.lsp - MKCL_LIBDIR=$$(pwd)/ bin/mkcl$(EXE) -norc -q --external-format "(:ascii :lf)" -load dump-doc.lsp - -#encodings: bin/mkcl-small$(EXE) generate-encodings.lsp -# MKCL_LIBDIR=$$(pwd)/ bin/mkcl-small$(EXE) -norc -q --external-format "(:ascii :lf)" -load generate-encodings.lsp +HELP.DOC: dump-doc.lsp bin/mkcl$(EXE) doc/help.lsp + MKCL_LIBDIR=$$(pwd)/ bin/mkcl-small$(EXE) -norc -q --external-format "(:ascii :lf)" -load dump-doc.lsp mkcl_min$(EXE): $(LIBRARIES) libmkclgc.a libmkclmin.a c/cinit.o c/all_symbols.o .gdbinit - $(CC) $(LDFLAGS) -o $@ c/cinit.o c/all_symbols.o libmkclmin.a $(LIBRARIES) $(FASL_LIBS) $(LIBS) + $(CC) $(LDFLAGS) -o $@ c/cinit.o c/all_symbols.o libmkclmin.a $(LIBRARIES) $(LIBS) .gdbinit: util/gdbinit @@ -287,13 +280,6 @@ libmkclgc.a: gc/.libs/libgc.a mkdir -p mkcl/gc cp -p gc/include/*.h mkcl/gc -# gmp/.libs/libgmp.a: -# cd gmp; $(MAKE) - -# libmkclgmp.a: gmp/.libs/libgmp.a -# cp -p gmp/.libs/libgmp.a ./libmkclgmp.a -# cp -p gmp/gmp.h mkcl/ - mkcl/mkcl-cmp.h: mkcl/mkcl.h c/symbols_list.h touch $@ @@ -320,23 +306,21 @@ install-base: all mkcl/config-install.h for i in $(TARGETS); do \ $(INSTALL_PROGRAM) $$i $(bindir); \ done - $(INSTALL_DATA) ucd.dat $(mkcldir)/ - if [ -d encodings ]; then \ - $(mkinstalldirs) $(mkcldir)/encodings; \ - for i in ./encodings/*; do \ - $(INSTALL_DATA) $$i $(mkcldir)/encodings; \ + if [ -d ENCODINGS ]; then \ + $(mkinstalldirs) $(mkcldir)/ENCODINGS; \ + for i in ./ENCODINGS/*; do \ + $(INSTALL_DATA) $$i $(mkcldir)/ENCODINGS; \ done \ fi $(INSTALL_DATA) ./mkcl/*.h $(includedir)/mkcl if (echo $(SUBDIRS) | grep gc); then \ $(mkinstalldirs) $(includedir)/mkcl/gc; \ $(INSTALL_DATA) ./mkcl/gc/*.h $(includedir)/mkcl/gc; \ - #$(INSTALL_DATA) ./mkcl/gc/private/*.h $(includedir)/mkcl/gc/private; \ fi rm $(includedir)/mkcl/config.h mv $(includedir)/mkcl/config-install.h $(includedir)/mkcl/config.h $(INSTALL_SCRIPT) bin/mkcl-config $(bindir) - for i in BUILD-STAMP help.doc ; do \ + for i in BUILD-STAMP HELP.DOC ; do \ $(INSTALL_DATA) $$i $(mkcldir); \ done for i in $(LSP_LIBRARIES); do \ @@ -366,7 +350,7 @@ install-base: all mkcl/config-install.h if [ -f libcmp.a ] ; then $(INSTALL_DATA) libcmp.a $(mkcldir); fi $(INSTALL_PROGRAM) cmp.fasb $(mkcldir) -install-contribs: $(ASDF_FASLS) $(CONTRIB_FASLS) # $(CONTRIB_STATIC_LIBS) +install-contribs: $(ASDF_FASLS) $(CONTRIB_FASLS) $(mkinstalldirs) $(mkcldir)/contrib/ for i in *.asd; do $(INSTALL_DATA) $${i} $(mkcldir)/contrib/; done for i in asdf.fasb $(CONTRIB_FASLS) $(CONTRIB_STATIC_LIBS); do \ @@ -391,11 +375,10 @@ install-base-local: all mkcl/config-install.h $(localmkcldir) ./include/ ./include//mkcl $(INSTALL_DATA) ../Copyright ../LGPL $(localmkcldir) $(INSTALL_DATA) ../Copyright ../LGPL ./include/mkcl - $(INSTALL_DATA) ucd.dat $(localmkcldir)/ - if [ -d encodings ]; then \ - $(mkinstalldirs) $(localmkcldir)/encodings; \ - for i in ./encodings/*; do \ - $(INSTALL_DATA) $$i $(localmkcldir)/encodings; \ + if [ -d ENCODINGS ]; then \ + $(mkinstalldirs) $(localmkcldir)/ENCODINGS; \ + for i in ./ENCODINGS/*; do \ + $(INSTALL_DATA) $$i $(localmkcldir)/ENCODINGS; \ done \ fi $(INSTALL_DATA) ./mkcl/*.h ./include//mkcl @@ -405,7 +388,7 @@ install-base-local: all mkcl/config-install.h fi rm ./include//mkcl/config.h mv ./include//mkcl/config-install.h ./include//mkcl/config.h - for i in BUILD-STAMP help.doc ; do \ + for i in BUILD-STAMP HELP.DOC ; do \ $(INSTALL_DATA) $$i $(localmkcldir); \ done for i in $(LSP_LIBRARIES); do \ @@ -469,8 +452,8 @@ clean: clean_lisp clean_contribs $(RM) mkcl_min$(EXE) bin/mkcl$(EXE) bin/mkcl-dyn bin/mkcl-small$(EXE) bin/mkcl-full$(EXE) $(RM) MKCLINIT* bin/MKCLINIT* $(RM) MKC*.c MKC*.tmp bin/MKC*.c bin/MKC*.tmp - $(RM) -r encodings - $(RM) MODULES help.doc TAGS *.asd ucd.dat + $(RM) -r ENCODINGS + $(RM) MODULES HELP.DOC TAGS *.asd $(RM) mkcl/gc/*.h ./libmkclgc.a $(RM) mkcl/gmp.h ./libmkclgmp.a $(RM) *.dll bin/*.dll @@ -487,7 +470,7 @@ clean_lisp: for i in lsp cmp clos; \ do $(RM) lib$$i.a $$i/?*.{o,data,c,sdat,h,fasb,fas}; done $(RM) lsp/config.lsp cmp/cmpdefs.lsp - $(RM) help.doc + $(RM) HELP.DOC distclean: clean cd c; $(MAKE) distclean diff --git a/src/bare.lsp.in b/src/bare.lsp.in index 9be4b2cdf8e51beb59b8add445d65acb00f1ba62..eb91b1238361a0cec3b42319381b66cd5a419edf 100644 --- a/src/bare.lsp.in +++ b/src/bare.lsp.in @@ -32,17 +32,13 @@ ;;; About to load lsp/load.lsp ;;; ") -;;(if (member "MKCL-MIN" *features* :test #'string-equal) - (load "lsp/load.lsp" :verbose nil :external-format '(:ascii :lf)) -;;) +(load "lsp/load.lsp" :verbose nil :external-format '(:ascii :lf)) (defun si::process-command-args () ) ;;; ;;; * Load PCL-based Common-Lisp Object System ;;; -;;(setf sys::*gc-verbose* nil) -;;#+mkcl-min (progn (terpri) (princ ";;; Loading clos/load.lsp") @@ -60,8 +56,6 @@ ;;; ;;; * Go back to build directory to start compiling ;;; -;;#+mkcl-min -;;(setq *features* (delete :mkcl-min *features*)) (setq *features* (remove :mkcl-min *features*)) (terpri) diff --git a/src/build-asdf-bundle.lsp b/src/build-asdf-bundle.lsp index a959994886d6b6327931b0325214040d572e62ff..f2fe262c3c92189e1739fce50a62efa6fce74bb8 100644 --- a/src/build-asdf-bundle.lsp +++ b/src/build-asdf-bundle.lsp @@ -19,18 +19,16 @@ (load "compile-utils" :external-format '(:ascii :lf)) -(setq cl:*compile-verbose* t cl:*load-verbose* nil) +(setq cl:*compile-verbose* t cl:*load-verbose* t) ;;(setq compiler::*trace-cc* t) -;(defparameter arg-base 5) (defparameter arg-base 7) (load "asdf.fasb") ;; load the local one. ;; Let's get rid of the compiler output cache! #+asdf2 -;;(asdf:initialize-output-translations "/:") ;; it would be "/;" on MS-windows. (asdf:disable-output-translations) #+asdf2 (setq asdf::*asdf-verbose* nil) @@ -43,7 +41,8 @@ ) |# -(let ((asdf:*central-registry* (cons (translate-logical-pathname #P"CONTRIB:asdf-bundle;") +(let ((asdf:*central-registry* (cons (make-pathname :directory '(:relative "asdf-bundle") + :defaults (translate-logical-pathname #P"CONTRIB:")) asdf:*central-registry*))) (asdf::clear-system :asdf-bundle) ;; we hope to force a reload. (multiple-value-bind (result bundling-error) diff --git a/src/build-asdf-contrib.lsp b/src/build-asdf-contrib.lsp index 402ab5428f4f881de45f5148aa7091d65ad4c096..ac8384543ffb5ee3c59272b84f8c2d27c18f6fc5 100644 --- a/src/build-asdf-contrib.lsp +++ b/src/build-asdf-contrib.lsp @@ -23,14 +23,12 @@ ;;(setq compiler::*trace-cc* t) -;(defparameter arg-base 5) (defparameter arg-base 7) (load "asdf.fasb") ;; load the local one. ;; Let's get rid of the compiler output cache! #+asdf2 -;;(asdf:initialize-output-translations "/:") ;; it would be "/;" on MS-windows. (asdf:disable-output-translations) #+asdf2 (setq asdf::*asdf-verbose* nil) @@ -96,7 +94,7 @@ (build-substitute-asd-file sys-name sys-attr) ) -(unless (progn #|ignore-errors|# (asdf:bundle-system sys)) +(unless (ignore-errors (asdf:bundle-system sys)) (format t "~%asdf:bundle-system failed.~%") (finish-output) (mkcl:quit :exit-code 1)) diff --git a/src/build-cmp.lsp b/src/build-cmp.lsp index ce2ca855c67be6154288508557b76d3c8c02c476..b11ace4dd069a3484439def2f0be11f61d816fce 100644 --- a/src/build-cmp.lsp +++ b/src/build-cmp.lsp @@ -12,16 +12,16 @@ ;;; ;;; +(push :mkcl-bootstrap *features*) + ;;(setq compiler::*trace-cc* t) -;;(si::pathname-translations "SRC" `(("**;*.*.*" "./**/*.*"))) (load "cmp/load.lsp" :external-format '(:ascii :lf)) (load "compile-utils" :external-format '(:ascii :lf)) (build-module "cmp" +cmp-module-files+ :dir (pathname "./cmp/") - #|:prefix "CMP"|# ) (mkcl:quit :exit-code 0) ;; signal to "make" that all is well. diff --git a/src/build-dynamic-mkcl.lsp b/src/build-dynamic-mkcl.lsp index 9ece9198c39d3f463418e05e0c300ca921120d2b..bc9eadd507fdcec4ee96df4dc90a0f0848bd9501 100644 --- a/src/build-dynamic-mkcl.lsp +++ b/src/build-dynamic-mkcl.lsp @@ -14,7 +14,6 @@ ;;(setq compiler::*trace-cc* t) -;;(si::pathname-translations "SRC" `(("**;*.*.*" "./**/*.*"))) ;;(load "cmp/load.lsp" :external-format '(:ascii :lf)) (load "cmp.fasb") @@ -22,25 +21,11 @@ compiler::*mkcl-library-directory* (truename (pathname ".")) ) -(let (;;(compiler::*suppress-compiler-messages* nil) - ;;(compiler::*suppress-compiler-warnings* nil) - ;;(compiler::*suppress-compiler-notes* nil) - ;;(*compile-verbose* t) - ;;(*compile-print* t) - (compiler::*ld-flags* compiler::*external-ld-flags*) - (mkcl-lib-name (concatenate 'base-string - compiler::+shared-library-prefix+ - "mkcl." - compiler::+shared-library-extension+)) - ) - (unless (compiler::build-program - #+msvc "mkcl2" - #+unix "bin/mkcl-dyn" - #+mingw32 "bin/mkcl" - ;;:object-files '( "@SHAREDPREFIX@mkcl.@SHAREDEXT@" ) - :object-files (list mkcl-lib-name) - ) - (mkcl:quit :exit-code 1)) - ) +(unless (compiler::build-program + #+msvc "mkcl2" + #+unix "bin/mkcl-dyn" + #+mingw32 "bin/mkcl" + ) + (mkcl:quit :exit-code 1)) (mkcl:quit :exit-code 0) diff --git a/src/build-full-mkcl.lsp b/src/build-full-mkcl.lsp index 00c40fdbb08e73678fdb3be883a1115818a094f3..d229e2c943b650d85440831f20336067be725e77 100644 --- a/src/build-full-mkcl.lsp +++ b/src/build-full-mkcl.lsp @@ -28,26 +28,11 @@ ;;(format t "~&i = ~D, arg = ~S~%" i (si:argv i)) ) -;;(format t "~&modules: ~S ~%" *modules*) - - -(let (;;(compiler::*suppress-compiler-messages* nil) - ;;(compiler::*suppress-compiler-warnings* nil) - ;;(compiler::*suppress-compiler-notes* nil) - ;;(*compile-verbose* t) - ;;(*compile-print* t) - (compiler::*ld-flags* (concatenate - 'base-string - " -rdynamic libmkcltop.a libmkcllsp.a " - "libmkclmin.a libmkclgc.a " - compiler::*external-ld-flags* - )) - ) - (unless (compiler::build-program - "bin/mkcl-full" - :lisp-object-files (list* "libcmp.a" *modules*) ;; list of built-ins. - ) - (mkcl:quit :exit-code 1)) - ) +(unless (compiler::build-program + "bin/mkcl-full" + :lisp-object-files (list* "libcmp.a" *modules*) ;; list of built-ins. + :use-mkcl-shared-libraries nil ;; force static linking + ) + (mkcl:quit :exit-code 1)) (mkcl:quit :exit-code 0) diff --git a/src/build-mkcl.lsp b/src/build-mkcl.lsp index ba15a4d8082b884970b8776477f19813eedf6c78..996647a0cba893287fdaddd664961c4bdf54ca36 100644 --- a/src/build-mkcl.lsp +++ b/src/build-mkcl.lsp @@ -11,8 +11,10 @@ ;;; ;;; +(push :mkcl-bootstrap *features*) -(load "cmp.fasb") +;;(load "cmp.fasb") +(load "cmp/load.lsp" :external-format '(:ascii :lf)) ;;(proclaim '(optimize (debug 1))) ;; faster, no debug info. (proclaim '(optimize (debug 0))) ;; faster, no debug info. @@ -36,54 +38,23 @@ ) #+unix -(let (;;(compiler::*suppress-compiler-messages* nil) - ;;(compiler::*suppress-compiler-warnings* nil) - ;;(compiler::*suppress-compiler-notes* nil) - ;;(*compile-verbose* t) - ;;(*compile-print* t) - #+(or) - (compiler::*ld-flags* (concatenate - 'base-string - " -rdynamic libmkcltop.a liblsp.a " - ;;"libmkclmin.a libmkclgc.a " - "libmkclmin.a " - compiler::*support-libraries* - compiler::*external-ld-flags* - )) - (compiler::*ld-flags* compiler::*external-ld-flags*) ;; prevent -lmkcl from showing up. - (object-files (list "libmkcltop.a" "liblsp.a" "libmkclmin.a" compiler::*support-libraries*)) - ) - (unless (compiler::build-program - "bin/mkcl" - :lisp-object-files '( "libcmp.a" ) ;; list of built-ins. - :object-files object-files - :extra-ld-flags "-rdynamic" ;; export main executable symbols to loaded modules and fasls. -;; :extra-ld-flags "-pg -rdynamic" ;; for profiling - ) - (mkcl:quit :exit-code 1)) - ) +(unless (compiler::build-program + "bin/mkcl" + :lisp-object-files '( "libcmp.a" ) ;; list of pre-loads. + :use-mkcl-shared-libraries nil ;; force static linking + ;;:extra-ld-flags "-pg" ;; for profiling + ) + (mkcl:quit :exit-code 1)) #+windows -(let (;;(compiler::*suppress-compiler-messages* nil) - ;;(compiler::*suppress-compiler-warnings* nil) - ;;(compiler::*suppress-compiler-notes* nil) - ;;(*compile-verbose* t) - ;;(*compile-print* t) - (compiler::*ld-flags* compiler::*external-ld-flags*) ;; prevent -lmkcl from showing up. - (mkcl-lib-name (concatenate 'base-string - compiler::+shared-library-prefix+ - "mkcl_" (si:mkcl-version) "." - compiler::+shared-library-extension+)) - ) - (unless (compiler::build-program - "bin/mkcl" - :extra-ld-flags "-Wl,--stack,0x800000" ;; Stack of 8MB. - :object-files (list mkcl-lib-name) - :epilogue-code '(PROGN (REQUIRE "CMP") (SI::TOP-LEVEL)) - ) - (mkcl:quit :exit-code 1)) - ) +(unless (compiler::build-program + "bin/mkcl" + :extra-ld-flags "-Wl,--stack,0x800000" ;; Stack of 8MB. + :epilogue-code '(PROGN (REQUIRE "CMP") (SI::TOP-LEVEL)) + ) + (mkcl:quit :exit-code 1)) + (mkcl:quit :exit-code 0) ;; tell make that all is well. diff --git a/src/c/Makefile.in b/src/c/Makefile.in index 6f2cf32549ccf4710507bc753537b9205b2efcec..2dcc1db6e2c7148d65079fed2e8ea73d1fceefae 100644 --- a/src/c/Makefile.in +++ b/src/c/Makefile.in @@ -1,7 +1,7 @@ # # Makefile for MKCL core library # -# Copyright (c) 2010-2011, Jean-Claude Beaudoin. +# Copyright (c) 2010-2012, Jean-Claude Beaudoin. # Copyright by a number of previous anonymous authors # presumed to be the same as for the rest of MKCL. # @@ -48,7 +48,7 @@ HDIR = ../mkcl HFILES = $(HDIR)/config.h $(HDIR)/mkcl.h $(HDIR)/mkcl-cmp.h\ $(HDIR)/object.h $(HDIR)/stacks.h\ $(HDIR)/external.h $(HDIR)/eval.h\ - $(HDIR)/number.h $(HDIR)/mkcl-inl.h # $(HDIR)/page.h + $(HDIR)/number.h $(HDIR)/mkcl-inl.h OBJS = main.o symbol.o package.o list.o \ @@ -63,6 +63,7 @@ OBJS = main.o symbol.o package.o list.o \ time.o unixint.o \ mapfun.o multival.o hash.o format.o pathname.o \ structure.o load.o unixfsys.o unixsys.o \ + unicode.o \ ffi.o @EXTRA_OBJS@ DCFILES = $(OBJS:%.o=%.c) @@ -82,8 +83,8 @@ all: ../libmkclmin.a ../libmkcltop.a all_symbols.o all_symbols2.o cinit.o .d.c: $(DPP) $< $@ -unixfsys.o: unixfsys.c - $(CC) -DMKCL_LIBDIR="\"@mkcldir@\"" -DMKCL_VERSION="\"@PACKAGE_VERSION@\"" $(CFLAGS) -o $@ -c $< +#unixfsys.o: unixfsys.c +# $(CC) -DMKCL_LIBDIR="\"@mkcldir@\"" -DMKCL_VERSION="\"@PACKAGE_VERSION@\"" $(CFLAGS) -o $@ -c $< $(DCFILES) all_symbols.c cinit.c: $(DPP) @@ -126,7 +127,6 @@ symbols_list2.h: symbols_list.h sed -e 's%{{\([A-Z ]*.*".*"\),[^,]*,[ ]*NULL,.*}}%{\1,NULL,-1}%g' \ -e 's%{{\([A-Z ]*.*".*"\),[^,]*,[ ]*\([^,]*\),[ ]*\([^,]*\),.*}}%{\1,"\2",\3}%g' \ -e 's%{{NULL.*%{NULL,NULL,-1}};%' > $@ -# cat symbols_list.h | \ $(OBJS): $(DPP) diff --git a/src/c/Makefile.w64 b/src/c/Makefile.w64 index 009820fd3e5176bb0bbd9ed3f648252a1fcac605..a81b0f02e51ba6a6ebc9b832f3f5c5d39585e118 100644 --- a/src/c/Makefile.w64 +++ b/src/c/Makefile.w64 @@ -1,7 +1,7 @@ # # Makefile for MKCL core library # -# Copyright (c) 2010-2011, Jean-Claude Beaudoin. +# Copyright (c) 2010-2012, Jean-Claude Beaudoin. # Copyright by a number of previous anonymous authors # presumed to be the same as for the rest of MKCL. # @@ -13,9 +13,9 @@ # See file '../../Copyright' for full details. # # -top_srcdir= /home/Jean-Claude/mkcl-1.1.1/src -srcdir = /home/Jean-Claude/mkcl-1.1.1/src/c -VPATH = /home/Jean-Claude/mkcl-1.1.1/src/c +top_srcdir= /usr/home/Jean-Claude/mkcl-1.1.2/src +srcdir = /usr/home/Jean-Claude/mkcl-1.1.2/src/c +VPATH = /usr/home/Jean-Claude/mkcl-1.1.2/src/c # Programs used by "make": # @@ -48,7 +48,7 @@ HDIR = ../mkcl HFILES = $(HDIR)/config.h $(HDIR)/mkcl.h $(HDIR)/mkcl-cmp.h\ $(HDIR)/object.h $(HDIR)/stacks.h\ $(HDIR)/external.h $(HDIR)/eval.h\ - $(HDIR)/number.h $(HDIR)/mkcl-inl.h # $(HDIR)/page.h + $(HDIR)/number.h $(HDIR)/mkcl-inl.h OBJS = main.o symbol.o package.o list.o \ @@ -63,6 +63,7 @@ OBJS = main.o symbol.o package.o list.o \ time.o unixint.o \ mapfun.o multival.o hash.o format.o pathname.o \ structure.o load.o unixfsys.o unixsys.o \ + unicode.o \ ffi.o threads.o alloc_2.o ffi_x86_64_w64.o big.o DCFILES = $(OBJS:%.o=%.c) @@ -82,9 +83,6 @@ all: ../libmkclmin.a ../libmkcltop.a all_symbols.o all_symbols2.o cinit.o .d.c: $(DPP) $< $@ -unixfsys.o: unixfsys.c - $(CC) -DMKCL_LIBDIR="\"${exec_prefix}/lib/mkcl-1.1.1\"" -DMKCL_VERSION="\"1.1.1\"" $(CFLAGS) -o $@ -c $< - $(DCFILES) all_symbols.c cinit.c: $(DPP) apply_x86.c: arch/apply_x86.d $(DPP) @@ -129,7 +127,6 @@ symbols_list2.h: symbols_list.h sed -e 's%{{\([A-Z ]*.*".*"\),[^,]*,[ ]*NULL,.*}}%{\1,NULL,-1}%g' \ -e 's%{{\([A-Z ]*.*".*"\),[^,]*,[ ]*\([^,]*\),[ ]*\([^,]*\),.*}}%{\1,"\2",\3}%g' \ -e 's%{{NULL.*%{NULL,NULL,-1}};%' > $@ -# cat symbols_list.h | \ $(OBJS): $(DPP) diff --git a/src/c/assignment.d b/src/c/assignment.d index ffdf82c420668873948726884cef1183dbe9aa88..9d40e49a12cbfbe83e2b75b006b86b4defbd73d0 100644 --- a/src/c/assignment.d +++ b/src/c/assignment.d @@ -78,7 +78,6 @@ mk_cl_set(MKCL, mkcl_object var, mkcl_object val) MKCL_SYM_FUN(sym) = def; if (!MKCL_INSTANCEP(def) && mkcl_Null(mk_si_compiled_function_name(env, def))) mk_si_set_compiled_function_name(env, def, sym); - mkcl_clear_compiler_properties(env, sym); } else { if (mflag) mkcl_FEerror(env, "~S is not a valid name for a macro.", 1, fname); @@ -112,7 +111,6 @@ mk_cl_fmakunbound(MKCL, mkcl_object fname) "Ignore lock and proceed", 2, fname, pack); } if (MKCL_SYMBOLP(fname)) { - mkcl_clear_compiler_properties(env, sym); MKCL_SYM_FUN(sym) = mk_cl_Cnil; mkcl_symbol_type_set(env, sym, mkcl_symbol_type(env, sym) & ~mkcl_stp_macro); } else { @@ -124,32 +122,6 @@ mk_cl_fmakunbound(MKCL, mkcl_object fname) @(return fname); } -void -mkcl_clear_compiler_properties(MKCL, mkcl_object sym) -{ - mkcl_object fun = mkcl_core.clear_compiler_properties; /* fun cache */ - - if (mkcl_likely(!mkcl_Null(fun))) - mkcl_funcall1(env, fun, sym); - else if (mkcl_get_option(MKCL_OPT_BOOTED)) - { - static const mkcl_base_string_object(compiler_pkg_name_obj, "COMPILER"); - mkcl_object compiler_pkg = mk_cl_find_package(env, (mkcl_object) &compiler_pkg_name_obj); - - if (!mkcl_Null(compiler_pkg)) - { - static const mkcl_base_string_object(fun_name_obj, "CLEAR-COMPILER-PROPERTIES"); - int intern_flag; - mkcl_object fun_sym = mkcl_find_symbol(env, (mkcl_object) &fun_name_obj, compiler_pkg, &intern_flag); - - if (!mkcl_Null(fun_sym)) - mkcl_core.clear_compiler_properties = fun = MKCL_SYM_FUN(fun_sym); - if (!mkcl_Null(fun)) - mkcl_funcall1(env, fun, sym); - } - } -} - mkcl_object mk_si_get_sysprop(MKCL, mkcl_object sym, mkcl_object prop) diff --git a/src/c/macros.d b/src/c/macros.d index d23d40a606924c41dc985b4e47dce65a07014c10..acb322c5c7a8dbe8f5331512ae0a85ab57b36e72 100644 --- a/src/c/macros.d +++ b/src/c/macros.d @@ -182,12 +182,22 @@ when_macro(MKCL, mkcl_object whole, mkcl_object lex_env) return mk_cl_list(env, 3, @'if', MKCL_CAR(args), MKCL_CONS(env, @'progn', MKCL_CDR(args))); } +static mkcl_object +unless_macro(MKCL, mkcl_object whole, mkcl_object lex_env) +{ + mkcl_object args = MKCL_CDR(whole); + if (mkcl_endp(env, args)) + mkcl_FEprogram_error(env, "Syntax error: ~S.", 1, whole); + return mk_cl_list(env, 3, @'if', mk_cl_list(env, 2, @'not', MKCL_CAR(args)), MKCL_CONS(env, @'progn', MKCL_CDR(args))); +} + void mkcl_init_macros(MKCL) { - MKCL_SET(@'*macroexpand-hook*', @'funcall'); - mkcl_def_c_macro(env, @'or', or_macro, 2); - mkcl_def_c_macro(env, @'and', and_macro, 2); - mkcl_def_c_macro(env, @'when', when_macro, 2); + MKCL_SET(@'*macroexpand-hook*', @'funcall'); + mkcl_def_c_macro(env, @'or', or_macro, 2); + mkcl_def_c_macro(env, @'and', and_macro, 2); + mkcl_def_c_macro(env, @'when', when_macro, 2); + mkcl_def_c_macro(env, @'unless', unless_macro, 2); } diff --git a/src/c/main.d b/src/c/main.d index 826355238f3af6b25da80ed437b52542069806af..ee04db38aac89a8804dc4e6d4bc1c9a84c1ed33a 100644 --- a/src/c/main.d +++ b/src/c/main.d @@ -24,20 +24,9 @@ #if defined(MKCL_WINDOWS) # include # include -/* # define MAXPATHLEN 512 */ # include #endif -#if 0 -#ifndef MAXPATHLEN -# ifdef PATH_MAX -# define MAXPATHLEN PATH_MAX -# else -# define NO_PATH_MAX -# endif -#endif -#endif - #include #ifdef __unix @@ -151,70 +140,6 @@ mkcl_set_option(mkcl_option option, mkcl_word value) #include "iso_latin_names.h" -static void -read_char_database(MKCL) -{ - static const mkcl_base_string_object(ucd_basename_obj, "ucd.dat"); - mkcl_object ucd_filename = mk_si_concatenate_strings(env, 2, - mkcl_namestring(env, mk_si_get_library_pathname(env), FALSE), - (mkcl_object) &ucd_basename_obj); -#if 0 - mkcl_object os_ucd_filename = mkcl_string_to_OSstring(env, ucd_filename); -#else - mkcl_dynamic_extent_OSstring(env, os_ucd_filename, ucd_filename); -#endif - -#ifdef MKCL_WINDOWS - FILE *f = _wfopen(mkcl_OSstring_self(os_ucd_filename), L"rb"); -#else - FILE *f = fopen(mkcl_OSstring_self(os_ucd_filename), "rb"); -#endif - if (f) { - mkcl_object output = mk_cl_Cnil; - mkcl_index size, read; - if (!fseek(f, 0, SEEK_END)) { - size = ftell(f); - fseek(f, 0, SEEK_SET); - output = mk_si_make_vector(env, @'mkcl::natural8', MKCL_MAKE_FIXNUM(size), - mk_cl_Cnil, mk_cl_Cnil, mk_cl_Cnil, mk_cl_Cnil); - - read = 0; - while (read < size) { - mkcl_index res; - res = fread(output->vector.self.b8 + read, 1, size - read, f); - if (res > 0) { - read += res; - } else if (ferror(f) || (feof(f) && read < size)) { - output = mk_cl_Cnil; -#ifdef MKCL_WINDOWS - fwprintf(stderr, L"\nMKCL: Unable to read Unicode character database: %s\n", mkcl_OSstring_self(os_ucd_filename)); -#else - fprintf(stderr, "\nMKCL: Unable to read Unicode character database: %s\n", mkcl_OSstring_self(os_ucd_filename)); -#endif - perror("MKCL Error"); - mk_mt_abandon_thread(env, @':aborted'); /* Maybe a tad too radical. JCB */ - } - } - } - mkcl_safe_fclose(env, f, mk_cl_Cnil); - { - uint8_t *p = output->vector.self.b8; - mkcl_core.unicode_database = output; - mkcl_core.ucd_misc = p + 2; - mkcl_core.ucd_pages = mkcl_core.ucd_misc + (p[0] + (p[1]<<8)); - mkcl_core.ucd_data = mkcl_core.ucd_pages + (0x110000 / 256); - } - MKCL_SET(@'si::+unicode-database+', output); - } else { -#ifdef MKCL_WINDOWS - fwprintf(stderr, L"\nMKCL: Unable to open Unicode character database file: %s\n", mkcl_OSstring_self(os_ucd_filename)); -#else - fprintf(stderr, "\nMKCL: Unable to open Unicode character database file: %s\n", mkcl_OSstring_self(os_ucd_filename)); -#endif - perror("MKCL Error"); - mk_mt_abandon_thread(env, @':aborted'); /* Maybe a tad too radical. JCB */ - } -} static mkcl_object mkcl_true_self(MKCL) @@ -234,7 +159,7 @@ static mkcl_object mkcl_true_self(MKCL) } #elif defined(MKCL_WINDOWS) { - wchar_t buf[48 * 1024]; /* UNC paths are said in MS documentation to be more or less 32k long. */ + wchar_t buf[48 * 1024]; /* UNC paths are said in MS documentation to be more or less 32k long maximum. */ DWORD nSize = MKCL_NB_ELEMS(buf); DWORD rc; @@ -368,7 +293,9 @@ static void _mkcl_boot_inner(MKCL) mk_cl_Ct->symbol.stype = mkcl_stp_constant; +#if 1 mkcl_core.packages = mk_cl_Cnil; +#endif mkcl_core.packages_to_be_created = mk_cl_Cnil; mkcl_core.lisp_package = @@ -500,11 +427,6 @@ static void _mkcl_boot_inner(MKCL) mkcl_core.detached_children = mk_cl_Cnil; /* Should be unused in MS-Windows.*/ #endif - /* - * Initialize Unicode character database. - */ - read_char_database(env); - /* * Load character names. The following hash table is a map * from names to character codes and viceversa. Note that we @@ -635,9 +557,6 @@ static void _mkcl_boot_inner(MKCL) MKCL_SET(@'*package*', mkcl_core.lisp_package); - mkcl_core.clear_compiler_properties = mk_cl_Cnil; - - { mkcl_object fpe_set = mk_si_initial_floating_point_exception_set(env); @@ -699,13 +618,6 @@ static void get_basic_OS_params(void) usleep(1); } -#if 0 - { - long pagesize = getpagesize(); /* The old way! sysconf() is better. */ - if (pagesize != mkcl_core.pagesize) - printf("\nIncoherent page size!\n"); - } -#endif #elif defined(MKCL_WINDOWS) { SYSTEM_INFO siSysInfo; @@ -995,11 +907,7 @@ int mkcl_shutdown_watchdog(MKCL) /* We expect to run this function with interrup = mk_si_shutdown_mkcl(env, own_thread->thread.result_value, watchdog_thread, mk_cl_Ct, mk_cl_Ct); else { -#if 0 - own_thread->thread.result_value = mk_mt_thread_join(env, shutdown_thread); -#else own_thread->thread.result_value = join_thread(env, shutdown_thread); -#endif } } MKCL_CATCH_ALL_IF_CAUGHT { own_thread->thread.result_value = @':invalid-value'; @@ -1157,11 +1065,7 @@ mkcl_object mkcl_getenv(MKCL, mkcl_object var) { mkcl_OSstring_raw_type raw_os_value; mkcl_unlock_process_env unlocker = NULL; -#if 0 - mkcl_object os_var = mkcl_string_to_OSstring(env, var); -#else mkcl_dynamic_extent_OSstring(env, os_var, var); -#endif if (process_lock_unlock_callback) unlocker = process_lock_unlock_callback(); #ifdef MKCL_WINDOWS @@ -1214,11 +1118,7 @@ mkcl_setenv(MKCL, mkcl_object var, mkcl_object value) # endif # endif } else { -#if 0 - mkcl_object os_value = mkcl_string_to_OSstring(env, value); -#else mkcl_dynamic_extent_OSstring(env, os_value, value); -#endif # ifdef HAVE_SETENV ret_val = setenv((char*)mkcl_OSstring_self(os_var), (char*)mkcl_OSstring_self(os_value), TRUE); diff --git a/src/c/pathname.d b/src/c/pathname.d index 42aa580e734b52d430b25e2ef7b59d9f7a181ff4..eb9b76b69320799dab77ba2a75d30621e502c3bf 100644 --- a/src/c/pathname.d +++ b/src/c/pathname.d @@ -410,20 +410,20 @@ parse_word(MKCL, mkcl_object s, delim_fn delim, int flags, mkcl_index start, mkc wild_inferiors = (i > start && mkcl_char(env, s, i-1) == '*'); valid_char = TRUE; /* single "*" */ } -#if 0 - } else if (c == ';' && (flags & WORD_DISALLOW_SEMICOLON)) { -#else - } else if (is_semicolon(c) && (flags & WORD_DISALLOW_SEMICOLON)) { -#endif + } else if (is_semicolon(c) && (flags & (WORD_DISALLOW_SEMICOLON | WORD_LOGICAL))) { valid_char = FALSE; -#if 0 - } else if (c == '/' && (flags & WORD_DISALLOW_SLASH)) { -#else - } else if (is_slash(c) && (flags & WORD_DISALLOW_SLASH)) { -#endif + } else if (is_slash(c) && (flags & (WORD_DISALLOW_SLASH | WORD_LOGICAL))) { valid_char = FALSE; } else { - valid_char = c != 0; + if (flags & WORD_LOGICAL) + { + if ((mkcl_alphanumericp(c) && mkcl_upper_case_p(c)) || c == '-') + valid_char = TRUE; + else + valid_char = FALSE; + } + else + valid_char = c != 0; /* What is wrong with character code 0? JCB */ } if (!valid_char) { *end_of_word = start; diff --git a/src/c/unixfsys.d b/src/c/unixfsys.d index a7175770e9304af899be4e5597b0496ebfb1eb8b..cd4c5a4c1b500581f837cd202be79f4d77c32883 100644 --- a/src/c/unixfsys.d +++ b/src/c/unixfsys.d @@ -1620,7 +1620,7 @@ mk_si_get_library_pathname(MKCL) } else { - mkcl_object lib_dir_tip = mkcl_make_simple_base_string(env, "../lib/mkcl-" MKCL_VERSION "/"); + mkcl_object lib_dir_tip = mkcl_make_simple_base_string(env, "../lib/mkcl-" MKCL_VERSION_STRING "/"); mkcl_object lib_dir_root = mk_cl_make_pathname(env, 8, @':name', mk_cl_Cnil, @':type', mk_cl_Cnil, @@ -1630,13 +1630,31 @@ mk_si_get_library_pathname(MKCL) if (mkcl_Null(mk_mkcl_probe_file_p(env, lib_pathname))) { - mkcl_object default_libdir_pathstring = mkcl_cstring_to_string(env, MKCL_LIBDIR "/"); - libdir = mk_cl_parse_namestring(env, 1, default_libdir_pathstring); + int i; +#ifdef MKCL_WINDOWS + char os_dir0[] = "c:\\Program Files\\MKCL " MKCL_VERSION_STRING "\\"; + char os_dir1[] = "c:\\Program Files\\MKCL " MKCL_MAJOR_VERSION_STRING "." MKCL_MINOR_VERSION_STRING "\\"; +#else + char os_dir0[] = "/usr/local/lib/mkcl-" MKCL_VERSION_STRING "/"; + char os_dir1[] = "/usr/lib/mkcl-" MKCL_VERSION_STRING "/"; +#endif + mkcl_base_string_object(dir0_obj, os_dir0); + mkcl_base_string_object(dir1_obj, os_dir1); + mkcl_object dirnames[] = { (mkcl_object) &dir0_obj, (mkcl_object) &dir1_obj }; + + for (i = 0; i < MKCL_NB_ELEMS(dirnames); i++) + if (!mkcl_Null(mk_mkcl_probe_file_p(env, dirnames[i]))) + { libdir = mk_cl_pathname(env, dirnames[i]); break;} + + if (mkcl_Null(libdir)) + { + mkcl_object default_libdir_pathstring = mkcl_cstring_to_string(env, MKCL_LIBDIR_DEFAULT "/"); + libdir = mk_cl_parse_namestring(env, 1, default_libdir_pathstring); + } } else libdir = lib_pathname; } - mkcl_core.library_pathname = libdir; } @(return libdir); diff --git a/src/clos/inspect.lsp b/src/clos/inspect.lsp index 3f93104d58c49fbb2456fa4c541aa66a253fe685..1980e34d0c892ec4566edf6e2b3183c9f8f6b914 100644 --- a/src/clos/inspect.lsp +++ b/src/clos/inspect.lsp @@ -1,8 +1,9 @@ ;;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: CLOS -*- ;;;; ;;;; Copyright (c) 1992, Giuseppe Attardi. +;;;; Copyright (c) 2010-2012, Jean-Claude Beaudoin. ;;;; -;;;; This program is free software; you can redistribute it and/or +;;;; MKCL is free software; you can redistribute it and/or ;;;; modify it under the terms of the GNU Lesser General Public ;;;; License as published by the Free Software Foundation; either ;;;; version 3 of the License, or (at your option) any later version. @@ -17,7 +18,7 @@ (defmethod select-clos-N ((instance standard-object)) (let* ((class (si:instance-class instance)) - (local-slotds (class-local-slots class) #|(slot-value class 'CLOS::SLOTS)|#) + (local-slotds (class-local-slots class)) (class-slotds (class-shared-slots class)) ) (if local-slotds @@ -61,7 +62,7 @@ (defmethod select-clos-N ((instance standard-class)) (let* ((class (si:instance-class instance)) - (local-slotds (class-local-slots class) #|(slot-value class 'CLOS::SLOTS)|#)) + (local-slotds (class-local-slots class))) (if local-slotds (progn (si::inspect-indent) @@ -84,7 +85,7 @@ (defmethod select-clos-N ((instance t)) (let* ((class (si:instance-class instance)) - (local-slotds (class-local-slots class) #|(slot-value class 'CLOS::SLOTS)|#)) + (local-slotds (class-local-slots class))) (if local-slotds (progn (si::inspect-indent) @@ -107,7 +108,7 @@ (defmethod select-clos-L ((instance standard-object)) (let* ((class (si:instance-class instance)) - (local-slotds (class-local-slots class) #|(slot-value class 'CLOS::SLOTS)|#) + (local-slotds (class-local-slots class)) (class-slotds (class-shared-slots class)) ) (terpri) @@ -130,7 +131,7 @@ (defmethod select-clos-L ((instance standard-class)) (let* ((class (si:instance-class instance)) - (local-slotds (class-local-slots class) #|(slot-value class 'CLOS::SLOTS)|#)) + (local-slotds (class-local-slots class))) (terpri) (if local-slotds (progn @@ -143,7 +144,7 @@ (defmethod select-clos-L ((instance t)) (let* ((class (si:instance-class instance)) - (local-slotds (class-local-slots class) #|(slot-value class 'CLOS::SLOTS)|#)) + (local-slotds (class-local-slots class))) (terpri) (if local-slotds (progn @@ -156,7 +157,7 @@ (defmethod select-clos-J ((instance standard-object)) (let* ((class (si:instance-class instance)) - (local-slotds (class-local-slots class) #|(slot-value class 'CLOS::SLOTS)|#) + (local-slotds (class-local-slots class)) (class-slotds (class-shared-slots class)) io-slot-name (slotd (car (member (prog1 @@ -213,7 +214,7 @@ (defmethod select-clos-J ((instance standard-class)) (let* ((class (si:instance-class instance)) - (local-slotds (class-local-slots class) #|(slot-value class 'CLOS::SLOTS)|#) + (local-slotds (class-local-slots class)) io-slot-name (slotd (car (member (prog1 (setq io-slot-name @@ -243,7 +244,7 @@ (defmethod select-clos-J ((instance t)) (let* ((class (si:instance-class instance)) - (local-slotds (class-local-slots class) #|(slot-value class 'CLOS::SLOTS)|#) + (local-slotds (class-local-slots class)) io-slot-name (slotd (car (member (prog1 (setq io-slot-name @@ -295,7 +296,7 @@ q (or Q): quits the inspection.~%~ (throw 'SI::ABORT-INSPECT nil)) (decf si::*inspect-level*) (let* ((class (si:instance-class instance)) - (local-slotds (class-local-slots class) #|(slot-value class 'CLOS::SLOTS)|#) + (local-slotds (class-local-slots class)) (class-slotds (class-shared-slots class)) ) (declare (type class class)) @@ -347,7 +348,7 @@ q (or Q): quits the inspection.~%~ (defmethod inspect-obj ((instance standard-class)) (decf si::*inspect-level*) (let* ((class (si:instance-class instance)) - (local-slotds (class-local-slots class) #|(class-slots class)|#) + (local-slotds (class-local-slots class)) ) (declare (type class class)) (loop @@ -398,7 +399,7 @@ q (or Q): quits the inspection.~%~ (defmethod inspect-obj ((instance t)) (decf si::*inspect-level*) (let* ((class (si:instance-class instance)) - (local-slotds (class-local-slots class) #|(slot-value class 'CLOS::SLOTS)|#)) + (local-slotds (class-local-slots class))) (declare (type class)) (loop (format t "~S - clos object:" instance) @@ -459,49 +460,21 @@ q (or Q): quits the inspection.~%~ (defmethod documentation ((object symbol) doc-type) (when (member doc-type +valid-documentation-types+) - (case doc-type - (type - (let ((c (find-class object nil))) - (or - (documentation c t) - (si::get-documentation object doc-type)))) - (function - (or (and (fboundp object) - (documentation (or (macro-function object) - (fdefinition object)) - doc-type)) - (si::get-documentation object doc-type))) - (otherwise - (si::get-documentation object doc-type))))) + (si::get-documentation object doc-type) + )) (defmethod (setf documentation) (new-value (object symbol) doc-type) (when (member doc-type +valid-documentation-types+) - (case doc-type - (type - (let ((c (find-class object nil))) - (if c - (progn - (si::set-documentation object 'type nil) - (si::set-documentation object 'structure nil) - (setf (documentation c t) new-value)) - (si::set-documentation object doc-type new-value)))) - (function - (if (fboundp object) - (let ((c (or (macro-function object) (fdefinition object)))) - (si::set-documentation c 'function nil) - (setf (documentation c 'function) new-value)) - (si::set-documentation object doc-type new-value))) - (otherwise - (si::set-documentation object doc-type new-value)))) - new-value) + (si::set-documentation object doc-type new-value) + )) (defmethod documentation ((object package) doc-type) (when (member doc-type '(t package)) - (si::get-documentation object 'package))) + (si::get-documentation (intern (package-name object) :keyword) 'package))) (defmethod (setf documentation) (new-value (object package) doc-type) (when (member doc-type '(t package)) - (si::set-documentation object 'package new-value))) + (si::set-documentation (intern (package-name object) :keyword) 'package new-value))) (defmethod documentation ((object class) doc-type) (when (and (member doc-type '(t type)) (slot-boundp object 'documentation)) @@ -522,12 +495,13 @@ q (or Q): quits the inspection.~%~ (defmethod documentation ((object list) doc-type) (when (and (si::valid-function-name-p object) (member doc-type '(function compiler-macro))) - (si::get-documentation object doc-type))) + (documentation (fdefinition object) doc-type))) (defmethod (setf documentation) (new-value (object list) doc-type) (when (and (si::valid-function-name-p object) (member doc-type '(function compiler-macro))) - (si::set-documentation object doc-type new-value))) + (setf (documentation (fdefinition object) doc-type) new-value) + )) (defmethod documentation ((object standard-generic-function) doc-type) (when (member doc-type '(t function)) @@ -547,11 +521,15 @@ q (or Q): quits the inspection.~%~ (defmethod documentation ((object function) doc-type) (when (member doc-type '(t function)) - (si::get-documentation object doc-type))) + (let ((fun-name (compiled-function-name object))) + (when (and fun-name (symbolp fun-name)) + (si::get-documentation object doc-type))))) (defmethod (setf documentation) (new-value (object function) doc-type) (when (member doc-type '(t function)) - (si::set-documentation object doc-type new-value))) + (let ((fun-name (compiled-function-name object))) + (when (and fun-name (symbolp fun-name)) + (si::set-documentation object doc-type new-value))))) (defmethod documentation ((object slot-definition) doc-type) (when (member doc-type '(t function)) @@ -561,3 +539,12 @@ q (or Q): quits the inspection.~%~ (when (member doc-type '(t function)) (setf (slot-value object 'documentation) new-value))) +(defmethod documentation ((object method-combination) doc-type) + (when (member doc-type '(t method-combination)) + nil ;; FIXME + )) + +(defmethod (setf documentation) (new-value (object method-combination) doc-type) + (when (member doc-type '(t method-combination)) + new-value)) ;; FIXME + diff --git a/src/cmp/cmpdefs.lsp.in b/src/cmp/cmpdefs.lsp.in index 289813180bb98a223df6afc8c08205f4f1482b05..41099516fe63bd629a50bb653ac3bd02db5b3e6f 100644 --- a/src/cmp/cmpdefs.lsp.in +++ b/src/cmp/cmpdefs.lsp.in @@ -490,24 +490,24 @@ coprocessor).") (defvar *cc-optimize* #-msvc "" #+msvc "@CFLAGS_OPTIMIZE@") -(defvar *ld-format* #-msvc "\"~A\" -o \"~A\" ~A ~{\"~A\" ~} ~@?" - #+msvc "\"~A\" -Fe\"~A\" ~A ~{\"~A\" ~} ~@?") +(defvar *ld-format* #-msvc "\"~A\" -o \"~A\" ~A ~{\"~A\" ~} ~A ~@?" + #+msvc "\"~A\" -Fe\"~A\" ~A ~{\"~A\" ~} ~A ~@?") (defvar *cc-format* #-msvc "\"~A\" ~A ~:[~*~;~A~] \"-I~A\" -c \"~A\" -o \"~A\"" #+msvc "\"~A\" ~A ~:[~*~;~A~] -I\"~A\" -w -c \"~A\" -Fo\"~A\"") -(defvar *support-libraries* "@LIBRARIES@") +(defvar *support-libraries* (mkcl:split-string "@LIBRARIES@" #\space)) +(defvar *mkcl-shared-libs* (list (mkcl:bstr+ "@SHAREDPREFIX@mkcl_" (si:mkcl-version) ".@SHAREDEXT@"))) +(defvar *mkcl-static-libs* (list* "libmkcltop.a" "liblsp.a" "libmkclmin.a" *support-libraries*)) -(defvar *external-ld-flags* "@LDFLAGS@ @FASL_LIBS@ @TCP_LIBS@ @LIBS@ ") ;; @TCP_LIBS@ ?? +(defvar *external-ld-flags* "@LDFLAGS@ @TCP_LIBS@ @LIBS@ ") -(defvar *ld-flags* - #+unix (mkcl:bstr+ "\"~A@SHAREDPREFIX@mkcl_" (si:mkcl-version) ".@SHAREDEXT@\" " *external-ld-flags*) - #+(or mingw32 mingw64) (mkcl:bstr+ "\"~Amkcl_" (si:mkcl-version) ".dll\" " *external-ld-flags*) - #+msvc (mkcl:bstr+ "mkcl.lib " *external-ld-flags*) - ) -(defvar *ld-shared-flags* (mkcl:bstr+ "@SHARED_LDFLAGS@ " *ld-flags*)) -(defvar *ld-bundle-flags* (mkcl:bstr+ "@BUNDLE_LDFLAGS@ " #+windows *ld-flags*)) +(defvar *shared-ld-flags* "@SHARED_LDFLAGS@") +(defvar *bundle-ld-flags* "@BUNDLE_LDFLAGS@") +(defvar *program-ld-flags* + #+linux "-rdynamic -Wl,--enable-new-dtags -Wl,-rpath,$ORIGIN/../lib" + #-linux "") (defvar +shared-library-prefix+ "@SHAREDPREFIX@") (defvar +shared-library-extension+ "@SHAREDEXT@") @@ -516,6 +516,7 @@ coprocessor).") (defvar +static-library-extension+ "@LIBEXT@") (defvar +static-library-format+ "@LIBPREFIX@~a.@LIBEXT@") (defvar +object-file-extension+ "@OBJEXT@") +(defvar +executable-file-extension+ "@EXEEXT@") (defvar +executable-file-format+ "~a@EXEEXT@") (defvar *mkcl-include-directory* (pathname @includedir\@)) diff --git a/src/cmp/cmpdefs.pre.w64 b/src/cmp/cmpdefs.pre.w64 index de5fcf23a89969a0acde57672805085cc61d4149..51a5f616a4d280a12dc7fd9155b4ab2fea110938 100644 --- a/src/cmp/cmpdefs.pre.w64 +++ b/src/cmp/cmpdefs.pre.w64 @@ -490,24 +490,24 @@ coprocessor).") (defvar *cc-optimize* #-msvc "" #+msvc "@CFLAGS_OPTIMIZE@") -(defvar *ld-format* #-msvc "\"~A\" -o \"~A\" ~A ~{\"~A\" ~} ~@?" - #+msvc "\"~A\" -Fe\"~A\" ~A ~{\"~A\" ~} ~@?") +(defvar *ld-format* #-msvc "\"~A\" -o \"~A\" ~A ~{\"~A\" ~} ~A ~@?" + #+msvc "\"~A\" -Fe\"~A\" ~A ~{\"~A\" ~} ~A ~@?") (defvar *cc-format* #-msvc "\"~A\" ~A ~:[~*~;~A~] \"-I~A\" -c \"~A\" -o \"~A\"" #+msvc "\"~A\" ~A ~:[~*~;~A~] -I\"~A\" -w -c \"~A\" -Fo\"~A\"") -(defvar *support-libraries* "libmkclgc.a") +(defvar *support-libraries* (mkcl:split-string "libmkclgc.a" #\space)) +(defvar *mkcl-shared-libs* (list (mkcl:bstr+ "mkcl_" (si:mkcl-version) ".dll"))) +(defvar *mkcl-static-libs* (list* "libmkcltop.a" "liblsp.a" "libmkclmin.a" *support-libraries*)) -(defvar *external-ld-flags* " -lws2_32 -lm ") ;; -lws2_32 ?? +(defvar *external-ld-flags* " -lws2_32 -lm ") -(defvar *ld-flags* - #+unix (mkcl:bstr+ "\"~Amkcl_" (si:mkcl-version) ".dll\" " *external-ld-flags*) - #+(or mingw32 mingw64) (mkcl:bstr+ "\"~Amkcl_" (si:mkcl-version) ".dll\" " *external-ld-flags*) - #+msvc (mkcl:bstr+ "mkcl.lib " *external-ld-flags*) - ) -(defvar *ld-shared-flags* (mkcl:bstr+ "-shared " *ld-flags*)) -(defvar *ld-bundle-flags* (mkcl:bstr+ "-shared " #+windows *ld-flags*)) +(defvar *shared-ld-flags* "-shared ") +(defvar *bundle-ld-flags* "-shared ") +(defvar *program-ld-flags* + #+linux "-rdynamic -Wl,--enable-new-dtags -Wl,-rpath,$ORIGIN/../lib" + #-linux "") (defvar +shared-library-prefix+ "") (defvar +shared-library-extension+ "dll") @@ -516,6 +516,7 @@ coprocessor).") (defvar +static-library-extension+ "a") (defvar +static-library-format+ "lib~a.a") (defvar +object-file-extension+ "o") +(defvar +executable-file-extension+ ".exe") (defvar +executable-file-format+ "~a.exe") (defvar *mkcl-include-directory* (pathname @includedir\@)) diff --git a/src/cmp/cmpmac.lsp b/src/cmp/cmpmac.lsp index 9ab45f610c0818959a4882b19eb769c0bfd0a780..18b74ab734a5de7b09cd8473b230ba48fef7c378 100644 --- a/src/cmp/cmpmac.lsp +++ b/src/cmp/cmpmac.lsp @@ -3,8 +3,18 @@ ;;; ---------------------------------------------------------------------- ;;; Macros only used in the code of the compiler itself: +;;;; Copyright by a number of previous anonymous authors +;;;; presumed to be the same as for the rest of MKCL. +;;;; Copyright (c) 2012. Jean-Claude Beaudoin. +;;;; +;;;; MKCL is free software; you can redistribute it and/or +;;;; modify it under the terms of the GNU Lesser General Public +;;;; License as published by the Free Software Foundation; either +;;;; version 3 of the License, or (at your option) any later version. +;;;; +;;;; See file '../../Copyright' for full details. + (in-package "COMPILER") -;;(import 'sys::arglist "COMPILER") (defun same-fname-p (name1 name2) (equal name1 name2)) diff --git a/src/cmp/cmpmain.lsp b/src/cmp/cmpmain.lsp index d9dfe653faa2082d74d91e1d22308321e2ed98f7..18009284b3252f5733d46e33366062fc6ec4be51 100644 --- a/src/cmp/cmpmain.lsp +++ b/src/cmp/cmpmain.lsp @@ -125,9 +125,6 @@ ((and *mkcl-include-directory* (mkcl:probe-file-p (merge-pathnames #P"mkcl/mkcl.h" *mkcl-include-directory*))) *mkcl-include-directory*) - ((mkcl:probe-file-p #P"SYS:..;..;include;mkcl;mkcl.h") - (setf *mkcl-include-directory* - (namestring (translate-logical-pathname #P"SYS:..;..;include;")))) ((error "Unable to find include directory"))))) (let* ((bin-dir (make-pathname :name nil :type nil :version nil :defaults (si:self-truename))) @@ -142,56 +139,79 @@ lib-dir ) ((and *mkcl-library-directory* - (probe-file (merge-pathnames (builder-internal-pathname shared-lib-pathname-name :shared-library) - *mkcl-library-directory*))) + #-mkcl-bootstrap + (mkcl:probe-file-p (merge-pathnames (builder-internal-pathname shared-lib-pathname-name :shared-library) + *mkcl-library-directory*))) *mkcl-library-directory*) - ((mkcl:probe-file-p #P"SYS:BUILD-STAMP") - (setf *mkcl-library-directory* (namestring (translate-logical-pathname #P"SYS:..;")))) ((error "Unable to find library directory"))))) -(defun linker-cc (out-pathname extra-ld-flags o-files &optional (working-directory ".")) - (run-command - (format nil - *ld-format* - *ld* - out-pathname - (or extra-ld-flags "") - o-files - *ld-flags* (mkcl-library-directory)) - (namestring working-directory))) - -(defun shared-cc (out-pathname extra-ld-flags o-files &optional (working-directory ".")) - (run-command - (format nil - *ld-format* - *ld* - (merge-pathnames out-pathname (builder-internal-pathname out-pathname :dll)) - (or extra-ld-flags "") - #+msvc o-files - #-msvc (cons "-Wl,--whole-archive" (nconc o-files '("-Wl,--no-whole-archive"))) - *ld-shared-flags* (mkcl-library-directory)) - (namestring working-directory))) - -(defun bundle-cc (out-pathname init-name extra-ld-flags o-files &optional (working-directory ".")) +(defun libs-ld-flags (libraries mkcl-libraries mkcl-shared external-shared) + (declare (ignorable mkcl-shared)) + (let ((libdir (namestring (mkcl-library-directory))) + (out (reverse libraries))) + #-mkcl-bootstrap + (unless mkcl-shared (setq libdir (mkcl:bstr+ libdir "mkcl-" (si:mkcl-version) "/"))) + (dolist (lib mkcl-libraries) + (push (mkcl:bstr+ "\"" libdir lib "\" ") out) + ) + (unless external-shared + (push "-Wl,-Bstatic " out) + ) + (push *external-ld-flags* out) + (apply #'concatenate 'base-string (nreverse out)) + ) + ) + +(defun link-program (out-pathname extra-ld-flags o-files libraries mkcl-shared external-shared &optional (working-directory ".")) + (run-command (format nil + *ld-format* + *ld* + out-pathname + (or extra-ld-flags "") + o-files + *program-ld-flags* + (libs-ld-flags libraries (if mkcl-shared *mkcl-shared-libs* *mkcl-static-libs*) mkcl-shared external-shared) + ) + (namestring working-directory))) + +(defun link-shared-lib (out-pathname extra-ld-flags o-files libraries mkcl-shared external-shared &optional (working-directory ".")) + (run-command (format nil + *ld-format* + *ld* + (merge-pathnames out-pathname (builder-internal-pathname out-pathname :dll)) + (or extra-ld-flags "") + #+msvc o-files + #-msvc (cons "-Wl,--whole-archive" (nconc o-files '("-Wl,--no-whole-archive"))) + *shared-ld-flags* + ;; during bootstrap the only shared lib we will build is MKCL's main lib which cannot depend on itself. + (libs-ld-flags libraries + (and #+unix nil #+mkcl-bootstrap nil *mkcl-shared-libs*) + mkcl-shared external-shared)) + (namestring working-directory))) + +(defun link-fasl (out-pathname init-name extra-ld-flags o-files libraries mkcl-shared external-shared &optional (working-directory ".")) (declare (ignorable init-name)) - (run-command - (format nil - *ld-format* - *ld* - out-pathname - (or extra-ld-flags "") - o-files - #-msvc *ld-bundle-flags* #-msvc (mkcl-library-directory) - #+msvc (concatenate 'string - *ld-bundle-flags* - " /EXPORT:" - init-name - " /LIBPATH:" - (mkcl-library-directory) - " /IMPLIB:" - (builder-internal-pathname out-pathname :import-library))) - (namestring working-directory))) + (run-command (format nil + *ld-format* + *ld* + out-pathname + (or extra-ld-flags "") + o-files + *bundle-ld-flags* + #-msvc (libs-ld-flags libraries + (if mkcl-shared + (and #+unix nil *mkcl-shared-libs*) + *mkcl-static-libs*) + mkcl-shared external-shared) + #+msvc (concatenate 'string + " /EXPORT:" + init-name + " /LIBPATH:" + (mkcl-library-directory) + " /IMPLIB:" + (builder-internal-pathname out-pathname :import-library))) + (namestring working-directory))) (defun preserve-escapes (string) (let ((new (prin1-to-string string))) @@ -199,16 +219,14 @@ ) (defun compiler-cc (c-pathname o-pathname &optional (working-directory ".")) - (run-command - (format nil - *cc-format* - *cc* *cc-flags* (>= (cmp-env-optimization 'speed) 2) *cc-optimize* - (preserve-escapes (namestring (mkcl-include-directory))) - c-pathname - o-pathname - ) - (namestring working-directory) - )) + (run-command (format nil + *cc-format* + *cc* *cc-flags* (>= (cmp-env-optimization 'speed) 2) *cc-optimize* + (preserve-escapes (namestring (mkcl-include-directory))) + c-pathname + o-pathname + ) + (namestring working-directory))) (defconstant +lisp-program-full-header+ "~ @@ -573,6 +591,9 @@ filesystem or in the database of ASDF modules." (init-name nil) (prologue-code "" prologue-p) (epilogue-code (when (eq target :program) '(SI::TOP-LEVEL))) + (libraries nil) ;; a list of strings, each naming a library + (use-mkcl-shared-libraries t) + (use-external-shared-libraries t) #+windows (subsystem :console) ;; only for :program target on :windows &aux (*builder-to-delete* nil) @@ -670,7 +691,8 @@ filesystem or in the database of ASDF modules." (ecase subsystem (:console (push "-mconsole" object-files)) (:windows (push "-mwindows" object-files))) - (linker-cc output-internal-name extra-ld-flags (cons (namestring o-pathname) object-files) cwd)) + (link-program output-internal-name extra-ld-flags (cons (namestring o-pathname) object-files) + libraries use-mkcl-shared-libraries use-external-shared-libraries cwd)) ((:static-library :library :lib) (let ((output-filename output-internal-name)) (format c-file +lisp-program-init+ init-name prologue-code submodules epilogue-code) @@ -699,14 +721,16 @@ filesystem or in the database of ASDF modules." (close c-file) (rename-file c-file c-pathname) (compiler-cc c-basename o-basename work-dir) - (shared-cc output-internal-name extra-ld-flags (cons o-pathname object-files) cwd)) + (link-shared-lib output-internal-name extra-ld-flags (cons o-pathname object-files) + libraries use-mkcl-shared-libraries use-external-shared-libraries cwd)) ((:fasl :fasb) #+windows (format c-file +lisp-program-init-export+ init-name) (format c-file +lisp-program-init+ init-name prologue-code submodules epilogue-code) (close c-file) (rename-file c-file c-pathname) (compiler-cc c-basename o-basename work-dir) - (bundle-cc output-internal-name init-name extra-ld-flags (cons o-pathname object-files) cwd)) + (link-fasl output-internal-name init-name extra-ld-flags (cons o-pathname object-files) + libraries use-mkcl-shared-libraries use-external-shared-libraries cwd)) ) (unless (equal output-name output-internal-name) @@ -861,6 +885,7 @@ filesystem or in the database of ASDF modules." (h-file *h-file*) (data-file *data-file*) (fasl-p t) + (libraries nil) ;; a list of strings, each naming a foreign library &aux (*standard-output* *standard-output*) (*error-output* *error-output*) @@ -979,7 +1004,7 @@ compiled successfully, returns the pathname of the compiled file." (when fasl-p (push o-pathname to-delete) (setq tmp-output (compile-file-internal-pathname output-file :fasl)) - (bundle-cc (mkcl:file-pathname tmp-output) init-name "" (list o-basename) tool-wd)) + (link-fasl (mkcl:file-pathname tmp-output) init-name "" (list o-basename) libraries t t tool-wd)) (unless (equal output-file tmp-output) ;;(format t "~&MKCL;; compiler had to rename its output from ~A to ~A.~%" tmp-output output-file) (finish-output) (rename-file tmp-output output-file)) @@ -1004,6 +1029,7 @@ compiled successfully, returns the pathname of the compiled file." ) (defun cl:compile (name &optional (definition nil definition-supplied-p) + &key (libraries nil) ;; a list of strings, each naming a foreign library &aux form data-pathname @@ -1087,7 +1113,7 @@ returned as the value of COMPILE." (setf si:*compiler-constants* (data-dump data-file #|data-pathname|# :close-when-done t)) (compiler-cc (file-namestring c-pathname) (file-namestring o-pathname) tool-wd) - (bundle-cc (file-namestring so-pathname) init-name "" (list (file-namestring o-pathname)) tool-wd) + (link-fasl (file-namestring so-pathname) init-name "" (list (file-namestring o-pathname)) libraries t t tool-wd) (cond ((mkcl:probe-file-p so-pathname) (load so-pathname :verbose nil) diff --git a/src/cmp/load.lsp.in b/src/cmp/load.lsp.in index 1fa9effc8b42298dfe342c3cdeb6aadd5b3dfee5..dc70ebde131aa337e47a380cc26642425c19024a 100644 --- a/src/cmp/load.lsp.in +++ b/src/cmp/load.lsp.in @@ -108,6 +108,7 @@ (finish-output) (load x :verbose nil :external-format '(:ascii :lf))) +cmp-module-files+ - )) + ) + (terpri)) diff --git a/src/compile-utils.lsp b/src/compile-utils.lsp index d248dc962eec42e8cf6742f445bdfaa5dc987093..da20a6e478794f326d8762b9a2dd7aa823ebf6aa 100644 --- a/src/compile-utils.lsp +++ b/src/compile-utils.lsp @@ -73,30 +73,35 @@ (defun compile-if-old (destdir sources &rest options) (unless (probe-file destdir) (si::mkdir destdir #o0777)) - (mapcar #'(lambda (source &aux (orig-source source)) - #+(or) - (format t "~&In compile-if-old in ~S for ~S~%" destdir source) - (setq source (translate-logical-pathname source)) - (let ((object (object-file-pathname destdir source)) - (*print-pretty* nil)) - (unless (and (probe-file object) - (>= (file-write-date object) (file-write-date source)) - (>= (file-write-date object) - (file-write-date "./mkcl/mkcl-cmp.h"))) - (format t "~&(compile-file ~S :output-file ~S~{ ~S~})~%" - source object (append options *compile-extra-options*)) - (unless (apply #'compile-file source - :output-file object - :fasl-p nil - (append options *compile-extra-options*)) - (clean-up destdir sources) - #+(or) - (format t "~&Bailing out from compile-if-old!~%") (finish-output) - (mkcl:quit :exit-code 1) ;; exit if compilation failed + (with-compilation-unit () + (mapcar #'(lambda (source &aux (orig-source source)) + #+(or) + (format t "~&In compile-if-old in ~S for ~S~%" destdir source) + (setq source (translate-logical-pathname source)) + (let ((object (object-file-pathname destdir source)) + (*print-pretty* nil)) + (unless (and (probe-file object) + (>= (file-write-date object) (file-write-date source)) + (>= (file-write-date object) + (file-write-date "./mkcl/mkcl-cmp.h"))) + (format t "~&(compile-file ~S :output-file ~S~{ ~S~})~%" + source object (append options *compile-extra-options*)) + (multiple-value-bind (output-truename warnings-p failure-p) + (apply #'compile-file source + :output-file object + :fasl-p nil + (append options *compile-extra-options*)) + (declare (ignorable output-truename warnings-p)) + (when failure-p + (clean-up destdir sources) + #+(or) + (format t "~&Bailing out from compile-if-old!~%") (finish-output) + (mkcl:quit :exit-code 1) ;; exit if compilation failed + ) + ) ) - ) - object)) - sources)) + object)) + sources))) (defun build-substitute-asd-file (name system-attribs #|depends-on|#) @@ -136,11 +141,6 @@ (mkcl:quit :exit-code 1)) ) (let* ((objects (compile-if-old dir sources)) - ;;(compiler::*suppress-compiler-messages* nil) - ;;(compiler::*suppress-compiler-warnings* nil) - ;;(compiler::*suppress-compiler-notes* nil) - ;;(*compile-verbose* t) - ;;(*compile-print* t) ) (let (result) (format t "~&(compiler::build-bundle ~S :lisp-object-files ~S)" name objects) @@ -157,7 +157,6 @@ (clean-up dir sources) (format t "~&Bailing out from build-module static library step!~%") (finish-output) (mkcl:quit :exit-code 1))) - (terpri) - ))))) + (terpri)))))) diff --git a/src/compile.lsp.in b/src/compile.lsp.in index bee527b42dbddd3d77e2ed9de2ecffd768eb8e8b..9192b6dc6499788af518a1874d9cca63e92d4b2d 100644 --- a/src/compile.lsp.in +++ b/src/compile.lsp.in @@ -41,16 +41,6 @@ ) -;;(setq compiler::*trace-cc* t) - -#| -(setq *compile-verbose* t - *compile-print* t - compiler::*suppress-compiler-messages* nil - compiler::*suppress-compiler-warnings* nil - compiler::*suppress-compiler-notes* nil) -|# - (load "compile-utils.lsp" :external-format '(:ascii :lf)) ;;; @@ -60,100 +50,36 @@ (rename-package "CL" "CL" '("COMMON-LISP" "LISP")) -;(setq compiler::*compiler-break-enable* t) ;; to drop into the debugger on an error. -(setf compiler::*ld-flags* compiler::*external-ld-flags* -#| - compiler::*ld-shared-flags* - (concatenate 'base-string - "@SHARED_LDFLAGS@ @SHAREDPREFIX@mkcl.@SHAREDEXT@ " compiler::*ld-flags*) - compiler::*ld-bundle-flags* - #+:mingw32 ;; I bet this one is not even needed on mingw32! JCB - (concatenate 'base-string - "@BUNDLE_LDFLAGS@ @SHAREDPREFIX@mkcl.@SHAREDEXT@ " compiler::*ld-flags*) - #-:mingw32 - "@BUNDLE_LDFLAGS@" -|# - ) - ;;; ;;; * Compile and link Common-Lisp base library ;;; -(setq si::*keep-documentation* nil) ;; Remove documentation from compiled files - (let* (#+windows (compiler::*cc-flags* (concatenate 'string "-DMKCL_API " compiler::*cc-flags*)) - ;;(lsp-objects (compile-if-old "src:lsp;" +lisp-module-files+ :fasl-p nil)) (lsp-objects (compile-if-old "./lsp/" +lisp-module-files+ :fasl-p nil)) ) - (let* ((compiler::*compile-to-linking-call* nil)) - (setq lsp-objects - (append lsp-objects - ;;(compile-if-old "src:clos;" +clos-module-files+ :fasl-p nil) - (compile-if-old "./clos/" +clos-module-files+ :fasl-p nil) - ))) - - (let (;;(compiler::*suppress-compiler-messages* nil) - ;;(compiler::*suppress-compiler-warnings* nil) - ;;(compiler::*suppress-compiler-notes* nil) - ;;(*compile-verbose* t) - ;;(*compile-print* t) - ) - (format t "~&;;About to build static library liblsp.a~%") - (unless (compiler:build-static-library "lsp" :lisp-object-files lsp-objects) - (mkcl:quit :exit-code 1)) - (format t "~&;;Done building liblsp.a!~%") - )) + (setq lsp-objects (append lsp-objects (compile-if-old "./clos/" +clos-module-files+ :fasl-p nil))) + + (format t "~&;;About to build static library liblsp.a~%") + (unless (compiler:build-static-library "lsp" :lisp-object-files lsp-objects) + (mkcl:quit :exit-code 1)) + (format t "~&;;Done building liblsp.a!~%")) ;;; ;;; -(let* ((compiler::*ld-shared-flags* - #+unix - ;;"@SHARED_LDFLAGS@ @LDFLAGS@ @SONAME_LDFLAGS@ @CORE_LIBS@ @FASL_LIBS@ @LIBS@" - "@SHARED_LDFLAGS@ @LDFLAGS@ @FASL_LIBS@ @LIBS@" - #+mingw64 - "-shared c:/Users/Jean-Claude/GNU2/mingw64/lib/libgmp.a -lws2_32 -lm" - #+(or mingw32 cygwin) - ;;"@SHARED_LDFLAGS@ @LDFLAGS@ @SONAME_LDFLAGS@ @TCP_LIBS@ @LIBS@" - "@SHARED_LDFLAGS@ @LDFLAGS@ @TCP_LIBS@ @LIBS@" - #+msvc - "@SHARED_LDFLAGS@ @LDFLAGS@ @STATICLIBS@ @CLIBS@" - ) - ;;(extra-ld-flags "@SONAME_LDFLAGS@") - (extra-ld-flags #+unix (mkcl:bstr+ "-Wl,-soname,@SHAREDPREFIX@mkcl_" (si:mkcl-version) ".@SHAREDEXT@")) - ;;#+windows - ;;(compiler::*cc-flags* (concatenate 'string "-DMKCL_API " compiler::*cc-flags*)) - ;;(extra-args nil) - ) - ;; #+(or mingw32 mingw64 cygwin) - ;; (progn - ;; ;; We need these two to force dllwrap to export the symbols - ;; ;; in these libraries. Otherwise it will not be possible to - ;; ;; call functions from GMP or GC in code that embeds MKCL. - ;; (when (probe-file "@LIBPREFIX@mkclgc.@LIBEXT@") - ;; (push "@LIBPREFIX@mkclgc.@LIBEXT@" extra-args)) - ;; ;; (when (probe-file "@LIBPREFIX@mkclgmp.@LIBEXT@") - ;; ;; (push "@LIBPREFIX@mkclgmp.@LIBEXT@" extra-args)) - ;; ) - (let (;;(compiler::*suppress-compiler-messages* nil) - ;;(compiler::*suppress-compiler-warnings* nil) - ;;(compiler::*suppress-compiler-notes* nil) - ;;(*compile-verbose* t) - ;;(*compile-print* t) - ) - (format t "~&;;About to build shared library @SHAREDPREFIX@mkcl_~A.@SHAREDEXT@~%" (si:mkcl-version)) - (unless (compiler:build-shared-library (mkcl:bstr+ "@SHAREDPREFIX@mkcl_" (si:mkcl-version) ".@SHAREDEXT@") - ;;"mkcl" ;;(compile-file-pathname "mkcl" :type :dll) - :extra-ld-flags extra-ld-flags - :object-files (list "c/all_symbols2.@OBJEXT@" - "@LIBPREFIX@lsp.@LIBEXT@" - "@LIBPREFIX@mkclmin.@LIBEXT@" - "@LIBRARIES@" - ;;extra-args - ) - ) - (mkcl:quit :exit-code 1)) - (format t "~&;;Done building libmkcl.so!~%") - ) +(let* ((extra-ld-flags #+unix (mkcl:bstr+ "-Wl,-soname,@SHAREDPREFIX@mkcl_" (si:mkcl-version) ".@SHAREDEXT@"))) + (format t "~&;;About to build shared library @SHAREDPREFIX@mkcl_~A.@SHAREDEXT@~%" (si:mkcl-version)) + (unless (compiler:build-shared-library (mkcl:bstr+ "@SHAREDPREFIX@mkcl_" (si:mkcl-version) ".@SHAREDEXT@") + :extra-ld-flags extra-ld-flags + :object-files (list "c/all_symbols2.@OBJEXT@" + "@LIBPREFIX@lsp.@LIBEXT@" + "@LIBPREFIX@mkclmin.@LIBEXT@" + "@LIBRARIES@" + #+mingw64 + "c:/Users/Jean-Claude/GNU2/mingw64/lib/libgmp.a" + ) + ) + (mkcl:quit :exit-code 1)) + (format t "~&;;Done building shared library @SHAREDPREFIX@mkcl_~A.@SHAREDEXT@!~%" (si:mkcl-version)) ) @@ -165,47 +91,18 @@ (terpri) (princ ";;; About to build main executable mkcl.") #+unix -(let (;;(compiler::*suppress-compiler-messages* nil) - ;;(compiler::*suppress-compiler-warnings* nil) - ;;(compiler::*suppress-compiler-notes* nil) - ;;(*compile-verbose* t) - ;;(*compile-print* t) - #+(or) - (compiler::*ld-flags* (concatenate - 'base-string - " -rdynamic libmkcltop.a liblsp.a " - "libmkclmin.a " - "@LIBRARIES@ " - compiler::*external-ld-flags* - )) - (compiler::*ld-flags* compiler::*external-ld-flags*) ;; prevent -lmkcl from showing up. - (object-files '("libmkcltop.a" "liblsp.a" "libmkclmin.a" "@LIBRARIES@")) - ) - (unless (compiler:build-program - "bin/mkcl-small" - :object-files object-files - :extra-ld-flags "-rdynamic" ;; export main executable symbols to loaded modules and fasls. -;; :extra-ld-flags "-pg -rdynamic" ;; for profiling - ) - (mkcl:quit :exit-code 1)) - ) +(unless (compiler:build-program + "bin/mkcl-small" + :use-mkcl-shared-libraries nil ;; force static linking + ;;:extra-ld-flags "-pg" ;; for profiling + ) + (mkcl:quit :exit-code 1)) + #+windows -(let (;;(compiler::*suppress-compiler-messages* nil) - ;;(compiler::*suppress-compiler-warnings* nil) - ;;(compiler::*suppress-compiler-notes* nil) - ;;(*compile-verbose* t) - ;;(*compile-print* t) - (compiler::*ld-flags* compiler::*external-ld-flags*) ;; prevent -lmkcl from showing up. - (mkcl-lib-name (concatenate 'base-string - compiler::+shared-library-prefix+ - "mkcl_" (si:mkcl-version) "." - compiler::+shared-library-extension+)) - (target-name #+msvc "bin/mkcl2" #+(or mingw32 mingw64) "bin/mkcl-small") - ) +(let ((target-name #+msvc "bin/mkcl2" #+(or mingw32 mingw64) "bin/mkcl-small")) (unless (compiler:build-program target-name - :object-files (list mkcl-lib-name) ) (mkcl:quit :exit-code 1)) ) @@ -229,3 +126,4 @@ (finish-output) (mkcl:quit :exit-code 0) ;; signal to "make" that all is well. + diff --git a/src/configure b/src/configure index 3c173d88b9bd9a2c7db5e2ab8318eebde58a07c3..322977bb7da069f86056ece75aca74ec873738e8 100755 --- a/src/configure +++ b/src/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.in Revision. # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.67 for mkcl 1.1.1. +# Generated by GNU Autoconf 2.67 for mkcl 1.1.2. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -550,8 +550,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='mkcl' PACKAGE_TARNAME='mkcl' -PACKAGE_VERSION='1.1.1' -PACKAGE_STRING='mkcl 1.1.1' +PACKAGE_VERSION='1.1.2' +PACKAGE_STRING='mkcl 1.1.2' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1285,7 +1285,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures mkcl 1.1.1 to adapt to many kinds of systems. +\`configure' configures mkcl 1.1.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1350,7 +1350,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of mkcl 1.1.1:";; + short | recursive ) echo "Configuration of mkcl 1.1.2:";; esac cat <<\_ACEOF @@ -1448,7 +1448,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -mkcl configure 1.1.1 +mkcl configure 1.1.2 generated by GNU Autoconf 2.67 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1905,7 +1905,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by mkcl $as_me 1.1.1, which was +It was created by mkcl $as_me 1.1.2, which was generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ @@ -2397,7 +2397,7 @@ enable_smallcons=no enable_gengc=no -mkcldir="${libdir}/mkcl-${PACKAGE_VERSION}" +mkcldir="${prefix}/lib/mkcl-${PACKAGE_VERSION}" test -z "${docdir}" && docdir="${datadir}/doc/mkcl-${PACKAGE_VERSION}" @@ -8443,7 +8443,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by mkcl $as_me 1.1.1, which was +This file was extended by mkcl $as_me 1.1.2, which was generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -8505,7 +8505,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -mkcl config.status 1.1.1 +mkcl config.status 1.1.2 configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" diff --git a/src/configure.in b/src/configure.in index 29b68990c1455cc51cf029fc189055bec41816fd..c224f28e5ed3218ea6087911ecbb8e938c221e94 100644 --- a/src/configure.in +++ b/src/configure.in @@ -9,7 +9,7 @@ dnl Giuseppe Attardi 25.1.1994 dnl Jean-Claude Beaudoin 2012.04.28 dnl -AC_INIT([mkcl],[1.1.1],[]) +AC_INIT([mkcl],[1.1.2],[]) AC_REVISION([$Revision$]) AC_CONFIG_SRCDIR([bare.lsp.in]) AC_CONFIG_AUX_DIR([${srcdir}/gc]) @@ -265,7 +265,8 @@ enable_gengc=no dnl ----------------------------------------------------------------------- dnl Installation directories -mkcldir="${libdir}/mkcl-${PACKAGE_VERSION}" +dnl mkcldir="${libdir}/mkcl-${PACKAGE_VERSION}" +mkcldir="${prefix}/lib/mkcl-${PACKAGE_VERSION}" AC_SUBST([mkcldir]) test -z "${docdir}" && docdir="${datadir}/doc/mkcl-${PACKAGE_VERSION}" AC_SUBST([docdir]) @@ -274,9 +275,9 @@ dnl ----------------------------------------------------------------------- dnl Initialize variables. boehm_configure_flags="" -AC_EXEEXT dnl Guess whether .exe is needed for executables +AC_EXEEXT dnl Guess whether .exe is needed for executables AC_SUBST(buildir) dnl For top-level Makefile.in -AC_SUBST(MKCL_CFLAGS) dnl Similar, but specific to MKCL (see src/util/mkcl-config) +AC_SUBST(MKCL_CFLAGS) dnl Similar, but specific to MKCL (see src/util/mkcl-config) AC_SUBST(DEBUG_CFLAGS) dnl Additional flags when debugging AC_SUBST(GMP_CFLAGS) dnl CFLAGS needed for compiling with system GMP library AC_SUBST(GMP_LDFLAGS) dnl LDFLAGS needed for compiling with system GMP library @@ -292,7 +293,7 @@ AC_SUBST(SUBDIRS, [c]) dnl Subdirectories that make should process AC_SUBST(LIBRARIES, []) dnl GMP, Boehm's GC, etc AC_SUBST(LSP_LIBRARIES) dnl Libraries produced by lisp translator dnl AC_SUBST(LSP_FEATURES, ['*features*']) dnl Symbols to add to *FEATURES* for conditional compilation -AC_SUBST(LSP_FEATURES, []) dnl Symbols to add to *FEATURES* for conditional compilation +AC_SUBST(LSP_FEATURES, []) dnl Symbols to add to *FEATURES* for conditional compilation AC_SUBST(TCP_LIBS) diff --git a/src/doc/help.lsp b/src/doc/help.lsp index c965ced4cf533d85baf0260be60f9df90fdf2d79..17a377a6b83bcde5b67d5c0da5f54bbe4dec8f76 100644 --- a/src/doc/help.lsp +++ b/src/doc/help.lsp @@ -1,7 +1,8 @@ ;;;; Copyright (c) 1984, Taiichi Yuasa and Masami Hagiya. ;;;; Copyright (c) 1990, Giuseppe Attardi. +;;;; Copyright (c) 2012, Jean-Claude Beaudoin. ;;;; -;;;; This program is free software; you can redistribute it and/or modify +;;;; MKCL is free software; you can redistribute it and/or modify ;;;; it under the terms of the GNU General Public License as published by ;;;; the Free Software Foundation; either version 2 of the License, or ;;;; (at your option) any later version. @@ -12,7 +13,6 @@ ;;;; ;;;; Sets doc-strings for built-in symbols. -(in-package "COMPILER") ; in case it does not exist (in-package "SYSTEM") (si::reopen-package "SYSTEM") @@ -20,7 +20,6 @@ (do-docfun symbol kind args doc)) (defun do-docfun (symbol kind args doc) - ;(print symbol) (cond ((and doc (search "Syntax:" doc)) (setf args nil)) ((and doc (search "Args:" doc)) @@ -44,7 +43,6 @@ (do-docvar symbol kind doc)) (defun do-docvar (symbol kind doc) - ;(print symbol) (si::set-documentation symbol 'variable (format nil "~@(~A~) in ~A package:~A~%" @@ -54,7 +52,6 @@ (do-doctype symbol doc)) (defun do-doctype (symbol doc) - ;(print symbol) (si::set-documentation symbol 'type doc)) (defun tree-search (tree x) @@ -135,6 +132,12 @@ The top-level form MKCL is currently evaluating.") (docvar * variable " The value of the last top-level form.") +(docvar ** variable " +The value of the last-but-one top-level form.") + +(docvar *** variable " +The value of the last-but-two top-level form.") + (docfun * function (&rest numbers) " Returns the product of the args. With no args, returns 1.") @@ -1917,7 +1920,7 @@ Returns RATIONAL if it is an integer.") Returns T if INTEGER is an odd number; NIL otherwise.") (docfun open function (filespec &key (direction :input) element-type - if-exists if-does-not-exist) " + if-exists if-does-not-exist (external-format :default)) " Opens the specified file and returns a file stream to/from the file. FILESPEC may be a symbol, a string, a pathname, or a file stream. DIRECTION may be :INPUT, :OUTPUT, :IO, or :PROBE. ELEMENT-TYPE is simply ignored in MKCL. IF- @@ -2844,3 +2847,4 @@ Outputs STRING to STREAM. Returns STRING.") Returns T if the arg is zero; NIL otherwise.") ;;;---------------------------------------------------------------------- + diff --git a/src/dump-doc.lsp b/src/dump-doc.lsp index 18f2424e80f3724d43b0b1a3401f3280cca3b3ed..15a46990b7d60e8c54cb53e006007e9497507b48 100644 --- a/src/dump-doc.lsp +++ b/src/dump-doc.lsp @@ -11,6 +11,6 @@ (let ((*features* (cons :clos *features*))) (load "./doc/help.lsp" :external-format '(:ascii :lf)) - (si::dump-documentation "./help.doc")) + (si::dump-documentation "./HELP.DOC")) (mkcl:quit :exit-code 0) diff --git a/src/lsp/autoload.lsp b/src/lsp/autoload.lsp index e450ffe2de5e3d947fa4157b294dc91f7316d183..ef3c7c26948843fc75f0600c5420d20c5f7afdc9 100644 --- a/src/lsp/autoload.lsp +++ b/src/lsp/autoload.lsp @@ -24,11 +24,11 @@ Returns the string \"MKCL\"." ;;; Compiler functions. -(defun autoload (pathname &rest function-names) +(defun autoload (module &rest function-names) (dolist (fname function-names) (let ((thename fname)) (fset fname #'(lambda (&rest args) - (load pathname) + (require module) (apply thename args)))))) (unless (fboundp 'compile) @@ -37,9 +37,28 @@ Returns the string \"MKCL\"." Gives a global declaration. See DECLARE for possible DECL-SPECs." (when (eq (car d) 'SPECIAL) (mapc #'sys::*make-special (cdr d)))) - (autoload "SYS:cmp" 'compile-file 'compile 'compile-file-pathname 'disassemble) + (autoload "cmp" 'compile-file 'compile 'compile-file-pathname 'disassemble) ) + + +;;; +;;; These default settings are equivalent to (optimize (speed 3) (space 0) (safety 2) (debug 2)) +;;; +(defvar *safety* 2) +(defvar *speed* 3) +(defvar *space* 0) +(defvar *debug* 2) +(defvar *compilation-speed* 0) + +(defvar *compilation-unit-environment* nil) ;; NIL stands for the null lexical environment. + +(defvar *compiler-floating-point-exclusion-set* '(floating-point-inexact + floating-point-invalid-operation + floating-point-underflow + floating-point-overflow + division-by-zero)) + ;; This definition of with-compilation-unit is a dummy place holder ;; to be redefined by a more specific version when the compiler is loaded. (defmacro with-compilation-unit ((&rest options) &rest body) @@ -109,6 +128,4 @@ Good luck! ;;; Import functions which are useful for user interaction -;; (in-package "CL-USER") -;; (import '(sys::help sys::help* mkcl::quit)) -(import '(sys::help sys::help* mkcl::quit) (find-package "CL-USER")) \ No newline at end of file +(import '(sys::help sys::help* mkcl::quit) (find-package "CL-USER")) diff --git a/src/lsp/ffi.lsp b/src/lsp/ffi.lsp index 5488503aba9ff98dbbb025d74583c9f5768b8ec4..1bdfe7a85bb115647daaac5c7b0febccb67b92e5 100644 --- a/src/lsp/ffi.lsp +++ b/src/lsp/ffi.lsp @@ -17,8 +17,6 @@ (:export "CLINES" "DEFENTRY" "DEFLA" "DEFCBODY" "DEFINLINE" "C-INLINE" ;; extension to UFFI "DEFCALLBACK" "CALLBACK" ;; extension to UFFI - "VOID" "OBJECT" "CHAR*" "INT" "DOUBLE" ;; needed by DEFENTRY? JCB - ;; The UFFI Protocol "DEF-CONSTANT" "DEF-FOREIGN-TYPE" "DEF-ENUM" "DEF-STRUCT" "DEF-ARRAY-POINTER" "DEF-FUNCTION" "DEF-UNION" "DEF-ARRAY" @@ -37,7 +35,7 @@ "WITH-CAST-POINTER" "WITH-CSTRINGS" ) - (:import-from "SYS" "NULL-POINTER-P" #|"GET-SYSPROP" "PUT-SYSPROP"|#)) + (:import-from "SYS" "NULL-POINTER-P")) (in-package "FFI") @@ -640,11 +638,17 @@ ))))) nil) +#| +;; This code, here commented out, is useful only for the UFFI interface and only on +;; MS-Windows were the linker demands to have access to the linkee function object code +;; at link time. JCB +;; This whole facility is in deep need of a redesign anyway, so it is decommissoned for now. +;; Use CFFI instead. JCB (defvar +loaded-libraries+ nil) -(defun do-load-foreign-library (tmp &optional system-library) +(defun do-load-foreign-library (tmp &optional system-library) ;; What is the use of this? JCB (let* ((path (cond ((pathnamep tmp) tmp) - ((mkcl:probe-file-p (setf tmp (string tmp))) tmp) + ((mkcl:probe-file-p (setf tmp (pathname (string tmp)))) tmp) (t (compile-file-pathname tmp :type #+msvc :lib #-msvc :dll)))) (filename (namestring path)) (pack (find-package "COMPILER")) @@ -654,25 +658,27 @@ (unless (find filename ffi::+loaded-libraries+ :test #'string-equal) (setf (symbol-value (intern "*LD-FLAGS*" pack)) (concatenate 'string (symbol-value (intern "*LD-FLAGS*" pack)) " " flag)) - (setf (symbol-value (intern "*LD-BUNDLE-FLAGS*" pack)) - (concatenate 'string (symbol-value (intern "*LD-BUNDLE-FLAGS*" pack)) + (setf (symbol-value (intern "*BUNDLE-LD-FLAGS*" pack)) + (concatenate 'string (symbol-value (intern "*BUNDLE-LD-FLAGS*" pack)) " " flag)) - (setf (symbol-value (intern "*LD-SHARED-FLAGS*" pack)) - (concatenate 'string (symbol-value (intern "*LD-SHARED-FLAGS*" pack)) + (setf (symbol-value (intern "*SHARED-LD-FLAGS*" pack)) + (concatenate 'string (symbol-value (intern "*SHARED-LD-FLAGS*" pack)) " " flag)) (push filename ffi::+loaded-libraries+)) t)) +|# (defmacro load-foreign-library (filename &key module supporting-libraries force-load system-library) (declare (ignore module force-load supporting-libraries)) - (let ((compile-form (and (constantp filename) + (let (#|(compile-form (and (constantp filename) `((eval-when (:compile-toplevel) (do-load-foreign-library ,filename - ,system-library))))) + ,system-library)))))|# (dyn-form (unless system-library `((si:load-foreign-module ,filename))))) - `(progn ,@compile-form ,@dyn-form))) + ;;(declare (ignore compile-form)) ;; JCB + `(progn #|,@compile-form|# ,@dyn-form))) ;;;---------------------------------------------------------------------- ;;; CALLBACKS diff --git a/src/lsp/helpfile.lsp b/src/lsp/helpfile.lsp index 28e92806ff40238c9727664039c7766ceb04a617..18989d14aa75263cf6632a56fe9a3ce6524aa4cb 100644 --- a/src/lsp/helpfile.lsp +++ b/src/lsp/helpfile.lsp @@ -61,11 +61,10 @@ (defun search-help-file (key path &aux (pos 0)) (labels ((bin-search (file start end &aux (delta 0) (middle 0) sym) (declare (fixnum start end delta middle)) - (when (< start end) + (when (<= start end) (setq middle (round (+ start end) 2)) (file-position file middle) - (if (and (plusp (setq delta (scan-for #\^_ file))) - (<= delta (- end middle))) + (if (plusp (setq delta (scan-for #\^_ file))) (if (equal key (setq sym (read file))) t (if (string< key sym) @@ -79,7 +78,6 @@ ((or (eql v #\^_) (not v)) (if v n -1)) (declare (fixnum n))))) (when (not (mkcl:probe-file-p path)) - ;;(format t "~&search-help-file: file not found: ~S" path)(finish-output) ;; debug JCB (return-from search-help-file nil)) (ignore-errors (let* ((*package* (find-package "CL")) @@ -87,7 +85,9 @@ output) (when (and (not (consp key)) ;; we cannot yet handle (setf foo) as function name. JCB - (bin-search file 0 (file-length file))) + (let ((result (bin-search file 0 (file-length file)))) + result) + ) (setq output (read file))) ;; What if this read blows up! JCB (close file) output)))) @@ -104,34 +104,36 @@ (setq *keep-documentation* t)) #-mkcl-min (progn - (defvar *documentation-pool* (list (make-hash-table :test #'eq :size 128) #P"SYS:help.doc")) + (defvar *documentation-pool* + (list (make-hash-table :test #'eq :size 128) #P"SYS:HELP.DOC")) ;; should be #'equal for (setf foo) handling (defvar *keep-documentation* t)) (defun get-documentation (object doc-type &aux output doc-plist) + (unless (symbolp object) (return-from get-documentation nil)) (dolist (dict *documentation-pool*) (cond ((hash-table-p dict) (when (and (setq doc-plist (gethash object dict)) (setq output (getf doc-plist doc-type))) - ;;(format t "~&get-documentation: a hashtable returned: ~S" output)(finish-output) ;; debug JCB - (return-from get-documentation output))) + (return-from get-documentation output)) + ) ((and (or (pathnamep dict) (stringp dict)) - (or (symbolp object) - (functionp object))) - ;;(format t "~&get-documentation: about to search help-file: ~S" dict)(finish-output) ;; debug JCB - (when (and (setq doc-plist (search-help-file - (if (functionp object) - (compiled-function-name object) - object) - dict)) + #-(and) (or (symbolp object) (functionp object))) + (when (and (setq doc-plist (search-help-file object dict)) (setq output (getf doc-plist doc-type))) - ;;(format t "~&get-documentation: a help-file returned: ~S~%doc-plist = ~S.~%" output doc-plist)(finish-output) ;; debug JCB (return-from get-documentation output)) - ;;(format t "~&get-documentation: a help-file failed with output: ~S~%doc-plist = ~S.~%" output doc-plist)(finish-output) ;; debug JCB - )))) + ) + #-(and) + (t (format t "~&get-documentation: looking for documentation in unknown source: ~S" dict)(finish-output)) ;; debug JCB + ))) (defun set-documentation (object doc-type string) (when (not (or (stringp string) (null string))) (error "~S is not a valid documentation string" string)) + (unless (symbolp object) + (if (si::valid-function-name-p object) + ;; we silently ignore (setf foobar) function names until we implement proper support. JCB + (return-from set-documentation string) + (error "In set-documentation: first argument ~S must be a symbol" object))) (let ((dict (first *documentation-pool*))) (when (hash-table-p dict) (let ((plist (gethash object dict))) @@ -166,6 +168,7 @@ the help file." (rplaca *documentation-pool* file)))) #| +;; This stuff is CLTL1 at best. JCB #-clos (defun documentation (object type) "Args: (symbol doc-type) diff --git a/src/lsp/iolib.lsp b/src/lsp/iolib.lsp index 97dcd55416125541a2721e0cabb179c39a39e286..d86752d87030ae5a57cc59be1ad9ba8d6e693b71 100644 --- a/src/lsp/iolib.lsp +++ b/src/lsp/iolib.lsp @@ -413,9 +413,9 @@ the one defined in the ANSI standard. *print-base* is 10, *print-array* is t, (setf all-encodings basic-encodings) #+unicode (progn - (dolist (i (directory "sys:encodings;*")) + (dolist (i (directory "SYS:ENCODINGS;*")) (push (intern (pathname-name i) "KEYWORD") all-encodings)) - (dolist (i (directory "sys:encodings;*.BIN")) + (dolist (i (directory "SYS:ENCODINGS;*.BIN")) (push (intern (pathname-name i) "KEYWORD") all-encodings))) all-encodings)))) @@ -423,7 +423,7 @@ the one defined in the ANSI standard. *print-base* is 10, *print-array* is t, #-unicode (error "Cannot load encoding ~A because this MKCL instance does not have Unicode support" name) #+unicode - (let ((filename (make-pathname :name (symbol-name name) :defaults "sys:encodings;"))) + (let ((filename (make-pathname :name (symbol-name name) :defaults "SYS:ENCODINGS;"))) (cond ((mkcl:probe-file-p filename) (load filename :verbose nil) name) @@ -506,7 +506,7 @@ successfully, T is returned, else error." (let ((*autoload-translations* nil)) (unless (or (string-equal host "sys") (si::pathname-translations host)) - (with-open-file (in-str (make-pathname :defaults "sys:" + (with-open-file (in-str (make-pathname :defaults (translate-logical-pathname #P"SYS:") :name (string-downcase host) :type "translations")) (if *load-verbose* diff --git a/src/lsp/module.lsp b/src/lsp/module.lsp index 7b8632133875eabf1d0e0f1bf03540f9ebbd50a2..0279a209d259e2f7e81d35906949a4fd4a940ad8 100644 --- a/src/lsp/module.lsp +++ b/src/lsp/module.lsp @@ -83,7 +83,6 @@ module." (error "Error loading file: ~A, Condition: ~A" path condition))))) (let* ((sysdir (translate-logical-pathname #P"SYS:")) (contribdir (translate-logical-pathname #P"CONTRIB:")) - ;;(asdfdir (translate-logical-pathname #P"CONTRIB:asdf;")) (module (string module))) (or (try-load (merge-pathnames (make-pathname :name module) sysdir)) diff --git a/src/lsp/seq.lsp b/src/lsp/seq.lsp index 549e336f23ff9473097687d02ecc3f38d79f1361..c1d597a1743bd8842dd6f05c568b5b7aca686b10 100644 --- a/src/lsp/seq.lsp +++ b/src/lsp/seq.lsp @@ -343,6 +343,24 @@ stops when it reaches the end of one of the given sequences." (define-compiler-macro mkcl::bstr+ (&whole form &rest strings) `(concatenate 'base-string ,@strings)) - -(export '(mkcl::str+ mkcl::bstr+) :mkcl) +(defun mkcl::split-string (str delim) + (let ((start 0) (end 0) out) + (declare (fixnum start end)) + (dotimes (i (length str) (setq end i)) + (declare (fixnum i)) + (when (char= delim (char str i)) + (setq end i) + (when (> (- end start) 0) + (push (subseq str start end) out)) + (setq start (1+ end)) + ) + ) + (when (> (- end start) 0) + (push (subseq str start end) out)) + (nreverse out) + ) + ) + + +(export '(mkcl::str+ mkcl::bstr+ mkcl::split-string) :mkcl) diff --git a/src/mkcl/config.h.in b/src/mkcl/config.h.in index 0c9088e2916db1129d1af5b3ad06cb9f963b9d3c..e1ff8825b218de8cd8f4b5631877fc479376836e 100644 --- a/src/mkcl/config.h.in +++ b/src/mkcl/config.h.in @@ -51,6 +51,13 @@ #define MKCL_MAJOR_VERSION @MKCL_MAJOR_VERSION@ #define MKCL_MINOR_VERSION @MKCL_MINOR_VERSION@ #define MKCL_PATCH_LEVEL @MKCL_PATCH_LEVEL@ +#define MKCL_VERSION_STRING "@MKCL_MAJOR_VERSION@.@MKCL_MINOR_VERSION@.@MKCL_PATCH_LEVEL@" +#define MKCL_MAJOR_MINOR_VERSION_STRING "@MKCL_MAJOR_VERSION@.@MKCL_MINOR_VERSION@" +#define MKCL_MAJOR_VERSION_STRING "@MKCL_MAJOR_VERSION@" +#define MKCL_MINOR_VERSION_STRING "@MKCL_MINOR_VERSION@" +#define MKCL_PATCH_LEVEL_STRING "@MKCL_PATCH_LEVEL@" + +#define MKCL_LIBDIR_DEFAULT "@mkcldir@" /* * FEATURES LINKED IN diff --git a/src/mkcl/config.h.w64 b/src/mkcl/config.h.w64 index 235a429174b910bdc4f688a1dfbcdf84902b80ca..65789b2a618ece7643f52f5c26edcb6c07018266 100644 --- a/src/mkcl/config.h.w64 +++ b/src/mkcl/config.h.w64 @@ -48,10 +48,17 @@ #endif /* Decimal number made with the formula: MAJOR * 1000000 + MINOR * 10000 + PATCH */ -#define MKCL_VERSION_NUMBER 1010001 +#define MKCL_VERSION_NUMBER 1010002 #define MKCL_MAJOR_VERSION 1 #define MKCL_MINOR_VERSION 1 -#define MKCL_PATCH_LEVEL 1 +#define MKCL_PATCH_LEVEL 2 +#define MKCL_VERSION_STRING "1.1.2" +#define MKCL_MAJOR_MINOR_VERSION_STRING "1.1" +#define MKCL_MAJOR_VERSION_STRING "1" +#define MKCL_MINOR_VERSION_STRING "1" +#define MKCL_PATCH_LEVEL_STRING "2" + +#define MKCL_LIBDIR_DEFAULT "c:/Program Files/MKCL 1.1/lib/mkcl-1.1.2" /* * FEATURES LINKED IN @@ -108,7 +115,7 @@ */ #define MKCL_INT_BITS 32 #define MKCL_LONG_BITS 32 -#define MKCL_WORD_BITS 64 +#define MKCL_WORD_BITS 64 #define MKCL_MOST_POSITIVE_FIXNUM ((mkcl_word)2305843009213693951LL) #define MKCL_MOST_NEGATIVE_FIXNUM ((mkcl_word)-2305843009213693952LL) #define MKCL_MOST_POSITIVE_FIXNUM_RAW (2305843009213693951LL) @@ -146,7 +153,8 @@ typedef uintptr_t mkcl_hashkey; /* See cmplam.lsp if you change this value */ #define MKCL_C_ARGUMENTS_LIMIT 64 -/* Maximum number of output arguments (>= MKCL_C_ARGUMENTS_LIMIT) */ +/* Maximum number of values returned by a function + (must be >= MKCL_C_ARGUMENTS_LIMIT because of a hack on argument frames on some platforms. JCB) */ #define MKCL_MULTIPLE_VALUES_LIMIT 64 /* A setjmp that does not save signals */ @@ -202,7 +210,7 @@ typedef uintptr_t mkcl_hashkey; */ /* Argument list can be access as an array */ -#define MKCL_USE_VARARG_AS_POINTER 1 +/* #undef MKCL_USE_VARARG_AS_POINTER */ /* Most significant byte first */ /* #undef MKCL_WORDS_BIGENDIAN */ /* Has */