From dd3d8b10c30337c005afb56a9657b2565e52d8fd Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 12 May 2009 06:25:06 -0500 Subject: [PATCH 1/3] io.bakend.windows.nt: fix bootstrap error --- basis/io/backend/windows/nt/nt.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/io/backend/windows/nt/nt.factor b/basis/io/backend/windows/nt/nt.factor index c102cae8c25..69a695ac720 100755 --- a/basis/io/backend/windows/nt/nt.factor +++ b/basis/io/backend/windows/nt/nt.factor @@ -143,6 +143,6 @@ M: winnt (wait-to-read) ( port -- ) M: winnt init-stdio console-app? [ init-c-stdio ] - [ null-reader null-writer null-writer init-stdio ] if ; + [ null-reader null-writer null-writer set-stdio ] if ; winnt set-io-backend From 1b17bca1196f28ca578e2f02c8446e4596f218b8 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 12 May 2009 10:32:19 -0500 Subject: [PATCH 2/3] make output>array a macro to avoid subtle bugs --- basis/combinators/smart/smart.factor | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/basis/combinators/smart/smart.factor b/basis/combinators/smart/smart.factor index 9519847810c..751a1f52e10 100644 --- a/basis/combinators/smart/smart.factor +++ b/basis/combinators/smart/smart.factor @@ -11,8 +11,8 @@ MACRO: output>sequence ( quot exemplar -- newquot ) [ dup infer out>> ] dip '[ @ _ _ nsequence ] ; -: output>array ( quot -- newquot ) - { } output>sequence ; inline +MACRO: output>array ( quot -- newquot ) + '[ _ { } output>sequence ] ; MACRO: input> ] keep @@ -25,8 +25,8 @@ MACRO: input> 1 [-] ] dip n*quot compose ; -: sum-outputs ( quot -- n ) - [ + ] reduce-outputs ; inline +MACRO: sum-outputs ( quot -- n ) + '[ _ [ + ] reduce-outputs ] ; MACRO: map-reduce-outputs ( quot mapper reducer -- newquot ) [ dup infer out>> ] 2dip @@ -37,5 +37,5 @@ MACRO: map-reduce-outputs ( quot mapper reducer -- newquot ) MACRO: append-outputs-as ( quot exemplar -- newquot ) [ dup infer out>> ] dip '[ @ _ _ nappend-as ] ; -: append-outputs ( quot -- seq ) - { } append-outputs-as ; inline +MACRO: append-outputs ( quot -- seq ) + '[ _ { } append-outputs-as ] ; From 462a9a4a19d3f231ce48c522ceb5d3a191126ef0 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Tue, 12 May 2009 16:23:09 -0500 Subject: [PATCH 3/3] Link VM with OpenSSL on NetBSD otherwise it can't find some symbols --- basis/openssl/libcrypto/libcrypto.factor | 1 + basis/openssl/libssl/libssl.factor | 1 + vm/Config.netbsd | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/basis/openssl/libcrypto/libcrypto.factor b/basis/openssl/libcrypto/libcrypto.factor index b9e00b6c8d8..0eba1d28542 100644 --- a/basis/openssl/libcrypto/libcrypto.factor +++ b/basis/openssl/libcrypto/libcrypto.factor @@ -13,6 +13,7 @@ IN: openssl.libcrypto << { { [ os openbsd? ] [ ] } ! VM is linked with it + { [ os netbsd? ] [ ] } { [ os winnt? ] [ "libcrypto" "libeay32.dll" "cdecl" add-library ] } { [ os macosx? ] [ "libcrypto" "libcrypto.dylib" "cdecl" add-library ] } { [ os unix? ] [ "libcrypto" "libcrypto.so" "cdecl" add-library ] } diff --git a/basis/openssl/libssl/libssl.factor b/basis/openssl/libssl/libssl.factor index 21f712fdc85..520c7175c6a 100644 --- a/basis/openssl/libssl/libssl.factor +++ b/basis/openssl/libssl/libssl.factor @@ -9,6 +9,7 @@ IN: openssl.libssl << { { [ os openbsd? ] [ ] } ! VM is linked with it + { [ os netbsd? ] [ ] } { [ os winnt? ] [ "libssl" "ssleay32.dll" "cdecl" add-library ] } { [ os macosx? ] [ "libssl" "libssl.dylib" "cdecl" add-library ] } { [ os unix? ] [ "libssl" "libssl.so" "cdecl" add-library ] } diff --git a/vm/Config.netbsd b/vm/Config.netbsd index d1267475892..a6ec997ecdf 100644 --- a/vm/Config.netbsd +++ b/vm/Config.netbsd @@ -2,4 +2,4 @@ include vm/Config.unix PLAF_DLL_OBJS += vm/os-genunix.o vm/os-netbsd.o CFLAGS += -export-dynamic LIBPATH = -L/usr/X11R6/lib -Wl,-rpath,/usr/X11R6/lib -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib -LIBS = -lm -lopenal -lalut $(X11_UI_LIBS) +LIBS = -lm -lssl -lcrypto $(X11_UI_LIBS)