~ chicken-core (chicken-5) a70dddecb280e4a54e28c1a9843c7b8c76d0db83


commit a70dddecb280e4a54e28c1a9843c7b8c76d0db83
Author:     felix <felix@y.(none)>
AuthorDate: Sat Mar 20 10:02:37 2010 +0100
Commit:     felix <felix@y.(none)>
CommitDate: Sat Mar 20 10:02:37 2010 +0100

    removed unsafe libchicken and -unsafe-libraries options

diff --git a/Makefile.bsd b/Makefile.bsd
index e5939e0b..03a292ea 100644
--- a/Makefile.bsd
+++ b/Makefile.bsd
@@ -51,7 +51,6 @@ LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
 LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -shared -Wl,-R"$(RUNTIME_LINKER_PATH)" -Wl,-L.
 LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-R"$(RUNTIME_LINKER_PATH)"
 LIBCHICKEN_SO_LINKER_OPTIONS = -Wl,-soname,libchicken.so$(SONAME_VERSION)
-LIBUCHICKEN_SO_LINKER_OPTIONS = -Wl,-soname,libuchicken.so$(SONAME_VERSION)
 LIBRARIES = -lm
 NEEDS_RELINKING = yes
 USES_SONAME = yes
diff --git a/Makefile.cross-linux-mingw b/Makefile.cross-linux-mingw
index 70b50448..95c0253e 100644
--- a/Makefile.cross-linux-mingw
+++ b/Makefile.cross-linux-mingw
@@ -63,7 +63,6 @@ C_COMPILER_SHARED_OPTIONS = -DPIC
 LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
 LIBRARIES = -lm -lws2_32
 LIBCHICKEN_SO_LINKER_OPTIONS = -Wl,--out-implib,libchicken.dll.a
-LIBUCHICKEN_SO_LINKER_OPTIONS = -Wl,--out-implib,libuchicken.dll.a
 LIBCHICKEN_SO_LIBRARIES = -lws2_32 
 LIBUCHICKEN_SO_LIBRARIES = -lws2_32 
 LIBCHICKEN_IMPORT_LIBRARY = libchicken.dll.a
diff --git a/Makefile.cygwin b/Makefile.cygwin
index 66594d34..57eaf32b 100644
--- a/Makefile.cygwin
+++ b/Makefile.cygwin
@@ -68,17 +68,9 @@ LIBCHICKEN_SO_LINKER_OPTIONS = -Wl,--out-implib,libchicken.dll.a \
 	-Wl,--dll \
 	-Wl,--add-stdcall-alias \
 	-Wl,--no-whole-archive
-LIBUCHICKEN_SO_LINKER_OPTIONS = -Wl,--out-implib,libuchicken.dll.a \
-	-Wl,--export-all-symbols \
-	-Wl,--enable-auto-import \
-	-Wl,--image-base=0x10000000 \
-	-Wl,--dll \
-	-Wl,--add-stdcall-alias \
-	-Wl,--no-whole-archive
 
 LIBRARIES = -lm 
 LIBCHICKEN_IMPORT_LIBRARY = libchicken.dll.a
-LIBUCHICKEN_IMPORT_LIBRARY = libuchicken.dll.a
 
 
 # special files
@@ -92,7 +84,6 @@ CUSTOM_CHICKEN_DEFAULTS=1
 include $(SRCDIR)/defaults.make
 
 LIBCHICKEN_SO_LIBRARIES = $(LIBRARIES)
-LIBUCHICKEN_SO_LIBRARIES = $(LIBRARIES)
 
 chicken-config.h: chicken-defaults.h
 	echo "/* GENERATED */" >$@
diff --git a/Makefile.linux b/Makefile.linux
index 60bde8c7..efa33b9a 100644
--- a/Makefile.linux
+++ b/Makefile.linux
@@ -51,7 +51,6 @@ LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
 LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -L. -shared -Wl,-R"$(RUNTIME_LINKER_PATH)"
 LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-R"$(RUNTIME_LINKER_PATH)"
 LIBCHICKEN_SO_LINKER_OPTIONS = -Wl,-soname,libchicken.so$(SONAME_VERSION)
-LIBUCHICKEN_SO_LINKER_OPTIONS = -Wl,-soname,libuchicken.so$(SONAME_VERSION)
 LIBRARIES = -lm -ldl
 NEEDS_RELINKING = yes
 USES_SONAME = yes
diff --git a/Makefile.mingw b/Makefile.mingw
index 9903e592..c504261c 100644
--- a/Makefile.mingw
+++ b/Makefile.mingw
@@ -71,11 +71,8 @@ LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
 LIBRARIES = -lm -lws2_32
 LINKER_OPTIONS += -Wl,--enable-auto-import
 LIBCHICKEN_SO_LINKER_OPTIONS = -Wl,--out-implib,libchicken.dll.a
-LIBUCHICKEN_SO_LINKER_OPTIONS = -Wl,--out-implib,libuchicken.dll.a
 LIBCHICKEN_SO_LIBRARIES = -lm -lws2_32 
-LIBUCHICKEN_SO_LIBRARIES = -lm -lws2_32 
 LIBCHICKEN_IMPORT_LIBRARY = libchicken.dll.a
-LIBUCHICKEN_IMPORT_LIBRARY = libuchicken.dll.a
 MAKEDIR_COMMAND_OPTIONS =
 CUSTOM_RC_FILE = 1
 
diff --git a/Makefile.mingw-msys b/Makefile.mingw-msys
index b759e729..bdc37d76 100644
--- a/Makefile.mingw-msys
+++ b/Makefile.mingw-msys
@@ -64,11 +64,8 @@ LINKER_OPTIONS += -Wl,--enable-auto-import
 LINKER_LINK_SHARED_LIBRARY_OPTIONS = -shared
 LIBRARIES = -lm -lws2_32
 LIBCHICKEN_SO_LINKER_OPTIONS = -Wl,--out-implib,libchicken.dll.a
-LIBUCHICKEN_SO_LINKER_OPTIONS = -Wl,--out-implib,libuchicken.dll.a
 LIBCHICKEN_SO_LIBRARIES = -lm -lws2_32 
-LIBUCHICKEN_SO_LIBRARIES = -lm -lws2_32 
 LIBCHICKEN_IMPORT_LIBRARY = libchicken.dll.a
-LIBUCHICKEN_IMPORT_LIBRARY = libuchicken.dll.a
 
 # Don't use "install" program as it is broken in some Mingw versions and 
 # Vista doesn't like it, anyway.
diff --git a/batch-driver.scm b/batch-driver.scm
index 9094eb1c..423bf272 100644
--- a/batch-driver.scm
+++ b/batch-driver.scm
@@ -205,8 +205,6 @@
     (when (memq 'optimize-leaf-routines options) (set! optimize-leaf-routines #t))
     (when (memq 'unsafe options) 
       (set! unsafe #t) )
-    (when (and dynamic (memq 'unsafe-libraries options))
-      (set! emit-unsafe-marker #t) )
     (when (memq 'setup-mode options)
       (set! ##sys#setup-mode #t))
     (when (memq 'disable-interrupts options) (set! insert-timer-checks #f))
diff --git a/c-backend.scm b/c-backend.scm
index 9d98517e..2cee404e 100644
--- a/c-backend.scm
+++ b/c-backend.scm
@@ -549,8 +549,6 @@
 		   [else
 		    (let ((uname (if unit-name (string-append unit-name "_toplevel") "toplevel")))
 		      (gen "C_noret_decl(C_" uname ")" #t)
-		      (when emit-unsafe-marker
-			(gen "C_externexport void C_dynamic_and_unsafe(void) {}" #t) )
 		      (gen "C_externexport void C_ccall ")
 		      (gen "C_" uname) ) ] )
 	     (gen #\()
diff --git a/c-platform.scm b/c-platform.scm
index 05688567..87f960c8 100644
--- a/c-platform.scm
+++ b/c-platform.scm
@@ -84,7 +84,7 @@
     profile inline keep-shadowed-macros ignore-repository
     fixnum-arithmetic disable-interrupts optimize-leaf-routines
     lambda-lift compile-syntax tag-pointers accumulate-profile
-    disable-stack-overflow-checks unsafe-libraries raw 
+    disable-stack-overflow-checks raw 
     emit-external-prototypes-first release local inline-global
     analyze-only dynamic scrutinize no-argc-checks no-procedure-checks
     no-bound-checks no-procedure-checks-for-usual-bindings no-compiler-syntax
diff --git a/chicken.h b/chicken.h
index 9ed726cf..f142b641 100644
--- a/chicken.h
+++ b/chicken.h
@@ -570,10 +570,8 @@ typedef unsigned __int64   uint64_t;
 #define C_BAD_ARGUMENT_TYPE_NO_UINTEGER_ERROR         30
 #define C_BAD_ARGUMENT_TYPE_NO_POINTER_ERROR          31
 #define C_BAD_ARGUMENT_TYPE_NO_TAGGED_POINTER_ERROR   32
-#define C_RUNTIME_UNSAFE_DLOAD_SAFE_ERROR             33
-#define C_RUNTIME_SAFE_DLOAD_UNSAFE_ERROR             34
-#define C_BAD_ARGUMENT_TYPE_NO_FLONUM_ERROR           35
-#define C_BAD_ARGUMENT_TYPE_NO_CLOSURE_ERROR          36
+#define C_BAD_ARGUMENT_TYPE_NO_FLONUM_ERROR           33
+#define C_BAD_ARGUMENT_TYPE_NO_CLOSURE_ERROR          34
 
 
 /* Platform information */
diff --git a/compiler-namespace.scm b/compiler-namespace.scm
index 2ba2b752..d3c26717 100644
--- a/compiler-namespace.scm
+++ b/compiler-namespace.scm
@@ -109,7 +109,6 @@
  emit-profile
  emit-syntax-trace-info
  emit-trace-info
- emit-unsafe-marker
  enable-inline-files
  encode-literal
  eq-inline-operator
diff --git a/compiler.scm b/compiler.scm
index 47fa3b7d..a1109947 100644
--- a/compiler.scm
+++ b/compiler.scm
@@ -322,7 +322,6 @@
 (define explicit-use-flag #f)
 (define disable-stack-overflow-checking #f)
 (define require-imports-flag #f)
-(define emit-unsafe-marker #f)
 (define external-protos-first #f)
 (define do-lambda-lifting #f)
 (define inline-max-size default-inline-max-size)
diff --git a/csc.scm b/csc.scm
index 780c7561..e1651ea5 100644
--- a/csc.scm
+++ b/csc.scm
@@ -121,11 +121,6 @@
    (if msvc "libchicken-static." "libchicken.")
    library-extension))
 
-(define default-unsafe-library
-  (string-append
-   (if msvc "libuchicken-static." "libuchicken.")
-   library-extension))
-
 (define default-compilation-optimization-options (string-split (if host-mode INSTALL_CFLAGS TARGET_CFLAGS)))
 (define best-compilation-optimization-options default-compilation-optimization-options)
 (define default-linking-optimization-options (string-split (if host-mode INSTALL_LDFLAGS TARGET_LDFLAGS)))
@@ -219,26 +214,6 @@
       (list (string-append "libchicken." library-extension))
       '("-lchicken")))
 
-(define unsafe-libraries #f)
-
-(define unsafe-library-files
-  (list
-   (quotewrap 
-    (prefix default-unsafe-library "lib"
-	    (string-append 
-	     (if host-mode INSTALL_LIB_HOME TARGET_LIB_HOME)
-	     (string-append "/" default-unsafe-library)))) ))
-
-(define unsafe-shared-library-files
-  (if msvc
-      (list (string-append "libuchicken." library-extension))
-      '("-luchicken")))
-
-(define (use-unsafe-libraries)
-  (set! unsafe-libraries #t)
-  (set! library-files unsafe-library-files)
-  (set! shared-library-files unsafe-shared-library-files))
-
 (define library-files default-library-files)
 (define shared-library-files default-shared-library-files)
 
@@ -386,7 +361,6 @@ Usage: #{csc} FILENAME | OPTION ...
     -disable-interrupts            disable interrupts in compiled code
     -f  -fixnum-arithmetic         assume all numbers are fixnums
     -lambda-lift                   perform lambda-lifting
-    -unsafe-libraries              link with unsafe runtime system
     -disable-stack-overflow-checks disables detection of stack-overflows
     -inline                        enable inlining
     -inline-limit                  set inlining threshold
@@ -730,9 +704,6 @@ EOF
 		(check s rest)
 		(set! link-options (append link-options (string-split (car rest))))
 		(set! rest (cdr rest)) ]
-	       [(-unsafe-libraries)
-		(t-options arg)
-		(use-unsafe-libraries) ]
 	       [(-rpath)
 		(check s rest)
 		(set! rpath (car rest))
@@ -745,9 +716,6 @@ EOF
 		(set! target-filename (make-pathname #f "a" executable-extension))
 		(set! scheme-files (append scheme-files '("-")))]
 	       [else
-		(when (memq s '(-unsafe -benchmark-mode))
-		  (when (eq? s '-benchmark-mode)
-			(use-unsafe-libraries) ) )
 		(when (eq? s '-to-stdout) 
 		  (set! to-stdout #t)
 		  (set! translate-only #t) )
@@ -923,9 +891,9 @@ EOF
     (when (and osx (or (not cross-chicken) host-mode))
       (command
        (string-append
-	"install_name_tool -change lib" (if unsafe-libraries "u" "") "chicken.dylib "
+	"install_name_tool -change libchicken.dylib "
 	(quotewrap 
-	 (let ((lib (if unsafe-libraries "libuchicken.dylib" "libchicken.dylib")) )
+	 (let ((lib "libchicken.dylib"))
 	   (if deployed
 	       (make-pathname "@executable_path" lib)
 	       (make-pathname
@@ -958,9 +926,7 @@ EOF
 (define (copy-libraries targetdir)
   (let ((lib (make-pathname
 	      (lib-path) 
-	      (if unsafe-libraries
-		  "libuchicken"
-		  "libchicken")
+	      "libchicken"
 	      (cond (osx "dylib")
 		    (win "dll")
 		    (else (conc "so." BINARY_VERSION))))))
diff --git a/defaults.make b/defaults.make
index 1b94ced8..f55bf8a8 100644
--- a/defaults.make
+++ b/defaults.make
@@ -169,7 +169,6 @@ C_COMPILER_OPTIMIZATION_OPTIONS ?= -g -Wall -Wno-unused
 endif
 endif
 C_COMPILER_BUILD_RUNTIME_OPTIONS ?= -DC_BUILDING_LIBCHICKEN
-C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS ?= $(C_COMPILER_BUILD_RUNTIME_OPTIONS) -DNDEBUG -DC_UNSAFE_RUNTIME
 C_COMPILER_SHARED_OPTIONS ?= -fPIC -DPIC
 LINKER_EXECUTABLE_OPTIONS ?= -L.
 LINKER_STATIC_OPTIONS ?= $(LINKER_EXECUTABLE_OPTIONS)
@@ -220,15 +219,12 @@ else
 ifeq ($(PLATFORM),cygwin)
 PRIMARY_LIBCHICKEN = cygchicken-0.dll
 LIBCHICKEN_SO_FILE = cygchicken-0.dll
-LIBUCHICKEN_SO_FILE = cyguchicken-0.dll
 else
 PRIMARY_LIBCHICKEN ?= libchicken$(SO)
 LIBCHICKEN_SO_FILE ?= libchicken$(SO)
-LIBUCHICKEN_SO_FILE ?= libuchicken$(SO)
 endif
 endif
 LIBCHICKEN_SO_LIBRARIES ?= $(LIBRARIES)
-LIBUCHICKEN_SO_LIBRARIES ?= $(LIBRARIES)
 
 # cross settings
 
@@ -335,7 +331,7 @@ CHICKEN_STATIC_EXECUTABLE = $(CHICKEN_PROGRAM)$(EXE)
 CSI_STATIC_EXECUTABLE = $(CSI_PROGRAM)$(EXE)
 CHICKEN_SHARED_EXECUTABLE = $(CHICKEN_PROGRAM)-shared$(EXE)
 CSI_SHARED_EXECUTABLE = $(CSI_PROGRAM)-shared$(EXE)
-TARGETLIBS ?= libchicken$(A) libuchicken$(A)
+TARGETLIBS ?= libchicken$(A)
 TARGETS += $(TARGETLIBS) $(CHICKEN_STATIC_EXECUTABLE) \
 	$(CSI_STATIC_EXECUTABLE) $(CHICKEN_PROFILE_PROGRAM)$(EXE) \
 	$(CSC_PROGRAM)$(EXE) \
@@ -345,8 +341,7 @@ CHICKEN_STATIC_EXECUTABLE = $(CHICKEN_PROGRAM)-static$(EXE)
 CSI_STATIC_EXECUTABLE = $(CSI_PROGRAM)-static$(EXE)
 CHICKEN_SHARED_EXECUTABLE = $(CHICKEN_PROGRAM)$(EXE)
 CSI_SHARED_EXECUTABLE = $(CSI_PROGRAM)$(EXE)
-TARGETLIBS ?= libchicken$(A) libuchicken$(A) \
-	$(LIBCHICKEN_SO_FILE) $(LIBUCHICKEN_SO_FILE)
+TARGETLIBS ?= libchicken$(A) $(LIBCHICKEN_SO_FILE)
 TARGETS += $(TARGETLIBS) $(CHICKEN_SHARED_EXECUTABLE) \
 	$(CSI_SHARED_EXECUTABLE) $(CHICKEN_PROFILE_PROGRAM)$(EXE) \
 	$(CSC_PROGRAM)$(EXE) $(CHICKEN_INSTALL_PROGRAM)$(EXE) $(CHICKEN_UNINSTALL_PROGRAM)$(EXE) \
diff --git a/library.scm b/library.scm
index 4ff37799..dd944517 100644
--- a/library.scm
+++ b/library.scm
@@ -3847,14 +3847,8 @@ EOF
 	((30) (apply ##sys#signal-hook #:type-error loc "bad argument type - not an unsigned integer" args))
 	((31) (apply ##sys#signal-hook #:type-error loc "bad argument type - not a pointer" args))
 	((32) (apply ##sys#signal-hook #:type-error loc "bad argument type - not a tagged pointer" args))
-	((33) (apply ##sys#signal-hook #:runtime-error loc
-		     "code to load dynamically was linked with safe runtime libraries, but executing runtime was not"
-		     args) )
-	((34) (apply ##sys#signal-hook #:runtime-error loc
-		     "code to load dynamically was linked with unsafe runtime libraries, but executing runtime was not"
-		     args) )
-	((35) (apply ##sys#signal-hook #:type-error loc "bad argument type - not a flonum" args))
-	((36) (apply ##sys#signal-hook #:type-error loc "bad argument type - not a procedure" args))
+	((33) (apply ##sys#signal-hook #:type-error loc "bad argument type - not a flonum" args))
+	((34) (apply ##sys#signal-hook #:type-error loc "bad argument type - not a procedure" args))
 	(else (apply ##sys#signal-hook #:runtime-error loc "unknown internal error" args)) ) ) ) )
 
 
diff --git a/manual/Using the compiler b/manual/Using the compiler
index f85c4fbd..aaff7eb0 100644
--- a/manual/Using the compiler	
+++ b/manual/Using the compiler	
@@ -207,8 +207,6 @@ Possible options are:
 
 ; -unsafe : Disable runtime safety checks.
 
-; -unsafe-libraries : Marks the generated file for being linked with the unsafe runtime system. This should be used when generating shared object files that are to be loaded dynamically. If the marker is present, any attempt to load code compiled with this option will signal an error.
-
 ; -uses NAME : Use definitions from the library unit {{NAME}}. This is equivalent to {{-prelude "(declare (uses NAME))"}}. Multiple arguments may be given, separated by {{,}}.
 
 ; -no-usual-integrations : Specifies that standard procedures and certain internal procedures may be redefined, and can not be inlined. This is equivalent to declaring {{(not usual-integrations)}}.
diff --git a/rules.make b/rules.make
index 41518336..a6cb1d60 100644
--- a/rules.make
+++ b/rules.make
@@ -35,13 +35,6 @@ LIBCHICKEN_OBJECTS_1 = \
 LIBCHICKEN_SHARED_OBJECTS = $(LIBCHICKEN_OBJECTS_1:=$(O))
 LIBCHICKEN_STATIC_OBJECTS = $(LIBCHICKEN_OBJECTS_1:=-static$(O))
 
-LIBUCHICKEN_OBJECTS_1 = \
-       ulibrary ueval udata-structures uports ufiles uextras ulolevel uutils utcp usrfi-1 usrfi-4 \
-       usrfi-13 usrfi-14 usrfi-18 usrfi-69 u$(POSIXFILE) uregex scheduler \
-       profiler stub expand chicken-syntax uruntime
-LIBUCHICKEN_SHARED_OBJECTS = $(LIBUCHICKEN_OBJECTS_1:=$(O))
-LIBUCHICKEN_STATIC_OBJECTS = $(LIBUCHICKEN_OBJECTS_1:=-static$(O))
-
 COMPILER_OBJECTS_1 = \
        chicken batch-driver compiler optimizer compiler-syntax scrutinizer unboxing support \
        c-platform c-backend
@@ -148,83 +141,6 @@ utils$(O): utils.c chicken.h $(CHICKEN_CONFIG_H)
 	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
 	  $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
 
-uruntime$(O): runtime.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
-	  $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-ueval$(O): ueval.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-udata-structures$(O): udata-structures.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-uports$(O): uports.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-ufiles$(O): ufiles.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-uextras$(O): uextras.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-ulibrary$(O): ulibrary.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-ulolevel$(O): ulolevel.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-uposixunix$(O): uposixunix.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-uposixwin$(O): uposixwin.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-uregex$(O): uregex.c chicken.h $(CHICKEN_CONFIG_H) 
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-usrfi-1$(O): usrfi-1.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-usrfi-13$(O): usrfi-13.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-usrfi-14$(O): usrfi-14.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-usrfi-18$(O): usrfi-18.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-usrfi-69$(O): usrfi-69.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-usrfi-4$(O): usrfi-4.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-utcp$(O): utcp.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-uutils$(O): uutils.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-
 runtime-static$(O): runtime.c chicken.h $(CHICKEN_CONFIG_H)
 	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
 	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
@@ -346,101 +262,6 @@ utils-static$(O): utils.c chicken.h $(CHICKEN_CONFIG_H)
 	  $(C_COMPILER_STATIC_OPTIONS) \
 	  $(C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
 
-uruntime-static$(O): runtime.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
-	  $(C_COMPILER_STATIC_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-ueval-static$(O): ueval.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
-	  $(C_COMPILER_STATIC_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-udata-structures-static$(O): udata-structures.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
-	  $(C_COMPILER_STATIC_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-uports-static$(O): uports.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
-	  $(C_COMPILER_STATIC_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-ufiles-static$(O): ufiles.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
-	  $(C_COMPILER_STATIC_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-uextras-static$(O): uextras.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
-	  $(C_COMPILER_STATIC_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-ulibrary-static$(O): ulibrary.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
-	  $(C_COMPILER_STATIC_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-ulolevel-static$(O): ulolevel.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
-	  $(C_COMPILER_STATIC_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-uposixunix-static$(O): uposixunix.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
-	  $(C_COMPILER_STATIC_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-uposixwin-static$(O): uposixwin.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
-	  $(C_COMPILER_STATIC_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-uregex-static$(O): uregex.c chicken.h $(CHICKEN_CONFIG_H) 
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
-	  $(C_COMPILER_STATIC_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-usrfi-1-static$(O): usrfi-1.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
-	  $(C_COMPILER_STATIC_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-usrfi-13-static$(O): usrfi-13.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
-	  $(C_COMPILER_STATIC_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-usrfi-14-static$(O): usrfi-14.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
-	  $(C_COMPILER_STATIC_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-usrfi-18-static$(O): usrfi-18.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
-	  $(C_COMPILER_STATIC_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-usrfi-69-static$(O): usrfi-69.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
-	  $(C_COMPILER_STATIC_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-usrfi-4-static$(O): usrfi-4.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
-	  $(C_COMPILER_STATIC_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-utcp-static$(O): utcp.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
-	  $(C_COMPILER_STATIC_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
-uutils-static$(O): uutils.c chicken.h $(CHICKEN_CONFIG_H)
-	$(C_COMPILER) $(C_COMPILER_OPTIONS) $(INCLUDES) \
-	  $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) \
-	  $(C_COMPILER_STATIC_OPTIONS) \
-	  $(C_COMPILER_BUILD_UNSAFE_RUNTIME_OPTIONS) $< $(C_COMPILER_OUTPUT)
 
 # import library objects
 
@@ -688,13 +509,6 @@ ifdef USES_SONAME
 	ln -sf $(LIBCHICKEN_SO_FILE) $(LIBCHICKEN_SO_FILE).$(BINARYVERSION)
 endif
 
-libuchicken$(SO): $(LIBUCHICKEN_SHARED_OBJECTS) $(APPLY_HACK_OBJECT)
-	$(LINKER) $(LINKER_OPTIONS) $(LINKER_LINK_SHARED_LIBRARY_OPTIONS) $(LIBUCHICKEN_SO_LINKER_OPTIONS) \
-	  $(LINKER_OUTPUT) $^ $(LIBUCHICKEN_SO_LIBRARIES)
-ifdef USES_SONAME
-	ln -sf $(LIBUCHICKEN_SO_FILE) $(LIBUCHICKEN_SO_FILE).$(BINARYVERSION)
-endif
-
 cygchicken-0.dll: $(LIBCHICKEN_SHARED_OBJECTS) $(APPLY_HACK_OBJECT)
 	gcc -shared -o $(LIBCHICKEN_SO_FILE) -Wl,--dll -Wl,--add-stdcall-alias \
 	    -Wl,--enable-stdcall-fixup -Wl,--warn-unresolved-symbols \
@@ -705,23 +519,9 @@ cygchicken-0.dll: $(LIBCHICKEN_SHARED_OBJECTS) $(APPLY_HACK_OBJECT)
 	    -Wl,--whole-archive $(LIBCHICKEN_SHARED_OBJECTS) $(APPLY_HACK_OBJECT) \
 	    -Wl,--no-whole-archive $(LIBCHICKEN_SO_LIBRARIES)
 
-cyguchicken-0.dll: $(LIBUCHICKEN_SHARED_OBJECTS) $(APPLY_HACK_OBJECT)
-	gcc -shared -o $(LIBUCHICKEN_SO_FILE) -Wl,--dll -Wl,--add-stdcall-alias \
-	    -Wl,--enable-stdcall-fixup -Wl,--warn-unresolved-symbols \
-	    -Wl,--dll-search-prefix=cyg -Wl,--allow-multiple-definition \
-	    -Wl,--allow-shlib-undefined -Wl,--export-dynamic \
-	    -Wl,--out-implib=libuchicken.dll.a -Wl,--export-all-symbols \
-	    -Wl,--enable-auto-import \
-	    -Wl,--whole-archive $(LIBUCHICKEN_SHARED_OBJECTS) $(APPLY_HACK_OBJECT) \
-	    -Wl,--no-whole-archive $(LIBUCHICKEN_SO_LIBRARIES)
-
-
 libchicken$(A): $(APPLY_HACK_OBJECT) $(LIBCHICKEN_STATIC_OBJECTS)
 	$(LIBRARIAN) $(LIBRARIAN_OPTIONS) $(LIBRARIAN_OUTPUT) $^
 
-libuchicken$(A): $(APPLY_HACK_OBJECT) $(LIBUCHICKEN_STATIC_OBJECTS)
-	$(LIBRARIAN) $(LIBRARIAN_OPTIONS) $(LIBRARIAN_OUTPUT) $^
-
 # import libraries and extensions
 
 .SUFFIXES: .so
@@ -790,32 +590,24 @@ $(CHICKEN_BUG_PROGRAM)$(EXE): chicken-bug$(O) libchicken$(A)
 
 install-libs:
 	$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_STATIC_LIBRARY_OPTIONS) libchicken$(A) "$(DESTDIR)$(ILIBDIR)"
-	$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_STATIC_LIBRARY_OPTIONS) libuchicken$(A) "$(DESTDIR)$(ILIBDIR)"
 ifneq ($(LIBCHICKEN_IMPORT_LIBRARY),) 
 	$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_STATIC_LIBRARY_OPTIONS) $(LIBCHICKEN_IMPORT_LIBRARY) "$(DESTDIR)$(ILIBDIR)"
-	$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_STATIC_LIBRARY_OPTIONS) $(LIBUCHICKEN_IMPORT_LIBRARY) "$(DESTDIR)$(ILIBDIR)"
 endif
 ifneq ($(POSTINSTALL_STATIC_LIBRARY),true)
 	$(POSTINSTALL_STATIC_LIBRARY) $(POSTINSTALL_STATIC_LIBRARY_FLAGS) \
 	  "$(ILIBDIR)$(SEP)libchicken$(A)"
-	$(POSTINSTALL_STATIC_LIBRARY) $(POSTINSTALL_STATIC_LIBRARY_FLAGS) \
-	  "$(ILIBDIR)$(SEP)libuchicken$(A)"
 endif
 	$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)chicken.h "$(DESTDIR)$(IINCDIR)"
 	$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(CHICKEN_CONFIG_H) "$(DESTDIR)$(IINCDIR)"
 ifndef STATICBUILD
 ifdef DLLSINPATH
 	$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_SHARED_LIBRARY_OPTIONS) $(LIBCHICKEN_SO_FILE) "$(DESTDIR)$(IBINDIR)"
-	$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_SHARED_LIBRARY_OPTIONS) $(LIBUCHICKEN_SO_FILE) "$(DESTDIR)$(IBINDIR)"
 else
 	$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_SHARED_LIBRARY_OPTIONS) $(LIBCHICKEN_SO_FILE) \
 	  "$(DESTDIR)$(ILIBDIR)$(SEP)$(LIBCHICKEN_SO_FILE)$(SONAME_VERSION)"
-	$(INSTALL_PROGRAM) $(INSTALL_PROGRAM_SHARED_LIBRARY_OPTIONS) $(LIBUCHICKEN_SO_FILE) \
-	  "$(DESTDIR)$(ILIBDIR)$(SEP)$(LIBUCHICKEN_SO_FILE)$(SONAME_VERSION)"
 endif
 ifdef USES_SONAME
 	cd "$(DESTDIR)$(ILIBDIR)" && ln -sf $(LIBCHICKEN_SO_FILE).$(BINARYVERSION) libchicken$(SO)
-	cd "$(DESTDIR)$(ILIBDIR)" && ln -sf $(LIBUCHICKEN_SO_FILE).$(BINARYVERSION) libuchicken$(SO)
 endif
 endif
 
@@ -839,7 +631,7 @@ install:
 	  $(CSI_PROGRAM)$(EXE) $(CSC_PROGRAM)$(EXE) $(CHICKEN_PROFILE_PROGRAM)$(EXE) \
 	  $(CHICKEN_INSTALL_PROGRAM)$(EXE) $(CHICKEN_UNINSTALL_PROGRAM)$(EXE) \
 	  $(CHICKEN_STATUS_PROGRAM)$(EXE) \
-	  $(LIBCHICKEN_SO_FILE) $(LIBUCHICKEN_SO_FILE) \
+	  $(LIBCHICKEN_SO_FILE) \
 	  $(IMPORT_LIBRARIES:%=%.so) $(IMPORT_LIBRARIES:%=%.import.so)
 	$(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) CONFIG=$(CONFIG) NEEDS_RELINKING=no \
 	  RUNTIME_LINKER_PATH="$(LIBDIR)" SONAME_VERSION=.$(BINARYVERSION) install
@@ -999,21 +791,16 @@ uninstall:
 	  "$(DESTDIR)$(IBINDIR)$(SEP)$(CSC_PROGRAM)$(EXE)" \
 	  "$(DESTDIR)$(IBINDIR)$(SEP)$(CHICKEN_BUG_PROGRAM)$(EXE)"
 	$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) "$(DESTDIR)$(ILIBDIR)$(SEP)libchicken$(A) "
-	$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) "$(DESTDIR)$(ILIBDIR)$(SEP)libuchicken$(A) "
 	$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) "$(DESTDIR)$(ILIBDIR)$(SEP)libchicken$(SO)"
-	$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) "$(DESTDIR)$(ILIBDIR)$(SEP)libuchicken$(SO)"
 ifdef USES_SONAME
 	$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) "$(DESTDIR)$(ILIBDIR)$(SEP)libchicken$(SO).$(BINARYVERSION)"
-	$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) "$(DESTDIR)$(ILIBDIR)$(SEP)libuchicken$(SO).$(BINARYVERSION)"
 endif
 ifdef WINDOWS
 	$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) "$(DESTDIR)$(IBINDIR)$(SEP)libchicken$(SO)"
-	$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) "$(DESTDIR)$(IBINDIR)$(SEP)libuchicken$(SO)"
 	$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) "$(DESTDIR)$(ILIBDIR)$(SEP)$(LIBCHICKEN_IMPORT_LIBRARY)"
-	$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) "$(DESTDIR)$(ILIBDIR)$(SEP)$(LIBUCHICKEN_IMPORT_LIBRARY)"
 endif
 ifdef ($(PLATFORM),cygwin)
-	$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) "$(DESTDIR)$(IBINDIR)$(SEP)cygchicken*" "$(DESTDIR)$(IBINDIR)$(SEP)cyguchicken*"
+	$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) "$(DESTDIR)$(IBINDIR)$(SEP)cygchicken*"
 endif
 	$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) "$(DESTDIR)$(IMANDIR)$(SEP)chicken.1" "$(DESTDIR)$(IMANDIR)$(SEP)csi.1" \
 	  "$(DESTDIR)$(IMANDIR)$(SEP)csc.1" "$(DESTDIR)$(IMANDIR)$(SEP)chicken-profile.1" "$(DESTDIR)$(IMANDIR)$(SEP)chicken-install.1" \
@@ -1252,16 +1039,14 @@ clean:
 	  $(CHICKEN_UNINSTALL_PROGRAM)$(EXE) \
 	  $(CHICKEN_STATUS_PROGRAM)$(EXE) \
 	  $(CHICKEN_BUG_PROGRAM)$(EXE) *$(O) \
-	  $(LIBCHICKEN_SO_FILE) $(LIBUCHICKEN_SO_FILE) \
-	  libchicken$(A) libuchicken$(A) libchicken$(SO) $(PROGRAM_IMPORT_LIBRARIES) \
+	  $(LIBCHICKEN_SO_FILE) \
+	  libchicken$(A) libchicken$(SO) $(PROGRAM_IMPORT_LIBRARIES) \
 	  $(IMPORT_LIBRARIES:=.import.so) $(LIBCHICKEN_IMPORT_LIBRARY) \
-	  $(LIBUCHICKEN_IMPORT_LIBRARY) \
 	  setup-api.so setup-api.import.scm setup-download.so \
 	  setup-download.import.scm
 	  setup-api.c setup-download.c
 ifdef USES_SONAME
 	$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) libchicken.so.$(BINARYVERSION)
-	$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) libuchicken.so.$(BINARYVERSION)
 endif
 
 confclean:
diff --git a/runtime.c b/runtime.c
index b72d7bba..81b454e7 100644
--- a/runtime.c
+++ b/runtime.c
@@ -217,19 +217,12 @@ extern void _C_do_apply_hack(void *proc, C_word *args, int count) C_noret;
 #define ptr_to_fptr(x)               ((((x) >> FORWARDING_BIT_SHIFT) & 1) | C_GC_FORWARDING_BIT | ((x) & ~1))
 #define fptr_to_ptr(x)               (((x) << FORWARDING_BIT_SHIFT) | ((x) & ~(C_GC_FORWARDING_BIT | 1)))
 
-#ifdef C_UNSAFE_RUNTIME
-# define C_check_flonum(x, w)
-# define C_check_real(x, w, v)       if(((x) & C_FIXNUM_BIT) != 0) v = C_unfix(x); \
-                                     else v = C_flonum_magnitude(x);
-# define resolve_procedure(x, w)     (x)
-#else
-# define C_check_flonum(x, w)        if(C_immediatep(x) || C_block_header(x) != C_FLONUM_TAG) \
+#define C_check_flonum(x, w)        if(C_immediatep(x) || C_block_header(x) != C_FLONUM_TAG) \
                                        barf(C_BAD_ARGUMENT_TYPE_NO_FLONUM_ERROR, w, x);
-# define C_check_real(x, w, v)       if(((x) & C_FIXNUM_BIT) != 0) v = C_unfix(x); \
+#define C_check_real(x, w, v)       if(((x) & C_FIXNUM_BIT) != 0) v = C_unfix(x); \
                                      else if(C_immediatep(x) || C_block_header(x) != C_FLONUM_TAG) \
                                        barf(C_BAD_ARGUMENT_TYPE_NO_NUMBER_ERROR, w, x); \
                                      else v = C_flonum_magnitude(x);
-#endif
 
 
 /* these could be shorter in unsafe mode: */
@@ -1574,16 +1567,6 @@ void barf(int code, char *loc, ...)
     c = 2;
     break;
 
-  case C_RUNTIME_UNSAFE_DLOAD_SAFE_ERROR:
-    msg = C_text("code to load dynamically was linked with safe runtime libraries, but executing runtime was not");
-    c = 0;
-    break;
-
-  case C_RUNTIME_SAFE_DLOAD_UNSAFE_ERROR:
-    msg = C_text("code to load dynamically was linked with unsafe runtime libraries, but executing runtime was not");
-    c = 0;
-    break;
-
   case C_BAD_ARGUMENT_TYPE_NO_FLONUM_ERROR:
     msg = C_text("bad argument type - not a flonum");
     c = 1;
@@ -1714,10 +1697,8 @@ C_word C_fcall C_restore_callback_continuation2(int level)
   C_word p = C_block_item(callback_continuation_stack_symbol, 0),
          k;
 
-#ifndef C_UNSAFE_RUNTIME
   if(level != callback_continuation_level || C_immediatep(p) || C_block_header(p) != C_PAIR_TAG)
     panic(C_text("unbalanced callback continuation stack"));
-#endif
 
   k = C_u_i_car(p);
 
@@ -1735,10 +1716,8 @@ C_word C_fcall C_callback(C_word closure, int argc)
     k = C_closure(&a, 1, (C_word)callback_return_continuation);
   int old = chicken_is_running;
 
-#ifndef C_UNSAFE_RUNTIME
   if(old && C_block_item(callback_continuation_stack_symbol, 0) == C_SCHEME_END_OF_LIST)
     panic(C_text("callback invoked in non-safe context"));
-#endif
 
   C_memcpy(&prev, &C_restart, sizeof(jmp_buf));
   callback_returned_flag = 0;       
@@ -3524,7 +3503,6 @@ C_regparm C_word C_fcall C_retrieve2(C_word val, char *name)
 }
 
 
-#ifndef C_UNSAFE_RUNTIME
 static C_word resolve_procedure(C_word closure, C_char *where)
 {
   C_word s;
@@ -3535,7 +3513,6 @@ static C_word resolve_procedure(C_word closure, C_char *where)
 
   return closure;
 }
-#endif
 
 
 C_regparm void *C_fcall C_retrieve_proc(C_word closure)
@@ -4075,11 +4052,7 @@ C_regparm C_word C_fcall C_fudge(C_word fudge_factor)
     return C_fix(j);
 
   case C_fix(20):
-#ifdef C_UNSAFE_RUNTIME
-    return C_SCHEME_TRUE;
-#else
     return C_SCHEME_FALSE;
-#endif
 
   case C_fix(21):
     return C_fix(C_MOST_POSITIVE_FIXNUM);
@@ -5652,9 +5625,7 @@ void C_ccall C_apply(C_word c, C_word closure, C_word k, C_word fn, ...)
   void *proc;
 #endif
 
-#ifndef C_UNSAFE_RUNTIME
   if(c < 4) C_bad_min_argc(c, 4);
-#endif
 
   fn2 = resolve_procedure(fn, "apply");
 
@@ -5671,27 +5642,21 @@ void C_ccall C_apply(C_word c, C_word closure, C_word k, C_word fn, ...)
 
   x = va_arg(v, C_word);
 
-#ifndef C_UNSAFE_RUNTIME
   if(x != C_SCHEME_END_OF_LIST && (C_immediatep(x) || C_block_header(x) != C_PAIR_TAG))
     barf(C_BAD_ARGUMENT_TYPE_ERROR, "apply", x);
-#endif
 
   for(skip = x; !C_immediatep(skip) && C_block_header(skip) == C_PAIR_TAG; skip = C_u_i_cdr(skip)) {
     x = C_u_i_car(skip);
 
 #ifdef C_HACKED_APPLY
-# ifndef C_UNSAFE_RUNTIME
     if(buf >= C_temporary_stack_bottom) barf(C_TOO_MANY_PARAMETERS_ERROR, "apply");
-# endif
 
     *(buf++) = x;
 #else
     C_save(x);
 
-# ifndef C_UNSAFE_RUNTIME
     if(C_temporary_stack < C_temporary_stack_limit)
       barf(C_TOO_MANY_PARAMETERS_ERROR, "apply");
-# endif
 #endif
     ++n;
   }
@@ -5899,9 +5864,7 @@ void C_ccall C_apply_values(C_word c, C_word closure, C_word k, C_word lst)
 {
   C_word n;
 
-#ifndef C_UNSAFE_RUNTIME
   if(c != 3) C_bad_argc(c, 3);
-#endif
 
   /* Check continuation wether it receives multiple values: */
   if(C_block_item(k, 0) == (C_word)values_continuation) {
@@ -5932,7 +5895,6 @@ void C_ccall C_call_with_values(C_word c, C_word closure, C_word k, C_word thunk
   C_word *a = C_alloc(4),
          kk;
 
-#ifndef C_UNSAFE_RUNTIME
   if(c != 4) C_bad_argc(c, 4);
 
   if(C_immediatep(thunk) || C_header_bits(thunk) != C_CLOSURE_TYPE)
@@ -5940,7 +5902,6 @@ void C_ccall C_call_with_values(C_word c, C_word closure, C_word k, C_word thunk
 
   if(C_immediatep(kont) || C_header_bits(kont) != C_CLOSURE_TYPE)
     barf(C_BAD_ARGUMENT_TYPE_ERROR, "call-with-values", kont);
-#endif
 
   kk = C_closure(&a, 3, (C_word)values_continuation, kont, k);
   C_do_apply(0, thunk, kk);
@@ -8015,7 +7976,6 @@ void dload_2(void *dummy)
   C_char *topname = (C_char *)C_data_pointer(entry);
   C_char *mname = (C_char *)C_data_pointer(name);
   C_char *tmp;
-  int ok;
 
   if(C_truep(reloadable) && (reload_lf = find_module_handle(mname)) != NULL) {
     if(C_dlclose(reload_lf->module_handle) != 0)
@@ -8037,24 +7997,6 @@ void dload_2(void *dummy)
     }
 
     if(p != NULL) {
-      /* check whether dloaded code is not a library unit */
-      if((p2 = C_dlsym(handle, C_text("C_dynamic_and_unsafe"))) == NULL)
-	p2 = C_dlsym(handle, C_text("_C_dynamic_and_unsafe"));
-
-#ifdef C_UNSAFE_RUNTIME
-      ok = p2 != NULL;		/* unsafe runtime, unsafe code */
-#else
-      ok = p2 == NULL;		/* safe runtime, safe code */
-#endif
-      
-      /* unsafe marker not found and this is not a library unit? */
-      if(!ok && !C_strcmp(topname, "C_toplevel"))
-#ifdef C_UNSAFE_RUNTIME
-	barf(C_RUNTIME_UNSAFE_DLOAD_SAFE_ERROR, NULL);
-#else
-	barf(C_RUNTIME_SAFE_DLOAD_UNSAFE_ERROR, NULL);
-#endif
-
       current_module_name = C_strdup(mname);
       current_module_handle = handle;
 
@@ -8086,7 +8028,6 @@ void dload_2(void *dummy)
 void dload_2(void *dummy)
 {
   HINSTANCE handle;
-  int ok;
   FARPROC p = NULL, p2;
   C_word
     reloadable = C_restore,
@@ -8113,25 +8054,6 @@ void dload_2(void *dummy)
 
   if((handle = LoadLibrary(mname)) != NULL) {
     if ((p = GetProcAddress(handle, topname)) != NULL) {
-      /* check whether dloaded code is not a library unit
-       * and matches current safety setting: */
-      p2 = GetProcAddress(handle, C_text("C_dynamic_and_unsafe"));
-
-#ifdef C_UNSAFE_RUNTIME
-      ok = p2 != NULL;		/* unsafe runtime, unsafe code */
-#else
-      ok = p2 == NULL;		/* safe runtime, safe code */
-#endif
-      
-      /* unsafe marker not found and this is not a library unit? */
-      if(!ok && !C_strcmp(topname, "C_toplevel")) {
-#ifdef C_UNSAFE_RUNTIME
-	barf(C_RUNTIME_UNSAFE_DLOAD_SAFE_ERROR, NULL);
-#else
-        barf(C_RUNTIME_SAFE_DLOAD_UNSAFE_ERROR, NULL);
-#endif
-      }
-
       current_module_name = C_strdup(mname);
       current_module_handle = handle;
 
Trap