From 0a2fef0775451dc231955df459fa73789da67fdb Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Wed, 12 Mar 2014 07:24:40 -0700 Subject: [PATCH] io.sockets: change protocol-port to handle ``f`` on all platforms. --- basis/io/sockets/sockets-tests.factor | 1 + basis/io/sockets/sockets.factor | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/basis/io/sockets/sockets-tests.factor b/basis/io/sockets/sockets-tests.factor index 64b6d88a63..7adcc93cb6 100644 --- a/basis/io/sockets/sockets-tests.factor +++ b/basis/io/sockets/sockets-tests.factor @@ -171,3 +171,4 @@ os unix? [ [ ] [ f 0 dispose ] unit-test [ 80 ] [ "http" protocol-port ] unit-test +[ f ] [ f protocol-port ] unit-test diff --git a/basis/io/sockets/sockets.factor b/basis/io/sockets/sockets.factor index 8afb4388e4..4e5c3a72a4 100644 --- a/basis/io/sockets/sockets.factor +++ b/basis/io/sockets/sockets.factor @@ -465,7 +465,7 @@ M: invalid-local-address summary ] dip with-variable ; inline : protocol-port ( protocol -- port ) - f getservbyname [ port>> htons ] [ f ] if* ; + [ f getservbyname [ port>> htons ] [ f ] if* ] [ f ] if* ; { { [ os unix? ] [ "io.sockets.unix" require ] }