aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authorolgeni <olgeni@FreeBSD.org>2005-03-19 19:24:22 +0800
committerolgeni <olgeni@FreeBSD.org>2005-03-19 19:24:22 +0800
commit6176e134ca6231dd833109436117d3fee054c47f (patch)
tree9230c9fe7c2f5fd897a8855a854aef3f84a9b784 /lang
parent552988160dda6cf51e91898d675db428c5367283 (diff)
downloadfreebsd-ports-gnome-6176e134ca6231dd833109436117d3fee054c47f.tar.gz
freebsd-ports-gnome-6176e134ca6231dd833109436117d3fee054c47f.tar.zst
freebsd-ports-gnome-6176e134ca6231dd833109436117d3fee054c47f.zip
Fix yield/1 bug in kernel/src/rpc.erl with code from R10B-4.
(from the erlang-questions mailing list) Obtained from: Bjorn Gustavsson <bjorn(at)erix.ericsson.se>
Diffstat (limited to 'lang')
-rw-r--r--lang/erlang/Makefile1
-rw-r--r--lang/erlang/files/patch-lib_kernel_src_rpc.erl28
-rw-r--r--lang/erlang14/Makefile1
-rw-r--r--lang/erlang14/files/patch-lib_kernel_src_rpc.erl28
4 files changed, 58 insertions, 0 deletions
diff --git a/lang/erlang/Makefile b/lang/erlang/Makefile
index 68f4eea11beb..1c0445cfc89d 100644
--- a/lang/erlang/Makefile
+++ b/lang/erlang/Makefile
@@ -7,6 +7,7 @@
PORTNAME= erlang
PORTVERSION= r10b3
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= lang parallel
MASTER_SITES= http://www.erlang.org/download/ \
diff --git a/lang/erlang/files/patch-lib_kernel_src_rpc.erl b/lang/erlang/files/patch-lib_kernel_src_rpc.erl
new file mode 100644
index 000000000000..7a94e2a96574
--- /dev/null
+++ b/lang/erlang/files/patch-lib_kernel_src_rpc.erl
@@ -0,0 +1,28 @@
+
+$FreeBSD$
+
+--- lib/kernel/src/rpc.erl.orig
++++ lib/kernel/src/rpc.erl
+@@ -495,16 +495,16 @@
+ ReplyTo ! {self(), {promise_reply, R}} %% self() is key
+ end).
+
+-yield(Key) when pid(Key) ->
+- {value, R} = do_yield(Key, infinite),
++yield(Key) when is_pid(Key) ->
++ {value,R} = do_yield(Key, infinity),
+ R.
+
+-nb_yield(Key, infinite) when pid(Key) ->
+- do_yield(Key, infinite);
+-nb_yield(Key, Timeout) when pid(Key), integer(Timeout), Timeout >= 0 ->
++nb_yield(Key, infinity=Inf) when is_pid(Key) ->
++ do_yield(Key, Inf);
++nb_yield(Key, Timeout) when is_pid(Key), is_integer(Timeout), Timeout >= 0 ->
+ do_yield(Key, Timeout).
+
+-nb_yield(Key) when pid(Key) ->
++nb_yield(Key) when is_pid(Key) ->
+ do_yield(Key, 0).
+
+ do_yield(Key, Timeout) ->
diff --git a/lang/erlang14/Makefile b/lang/erlang14/Makefile
index 68f4eea11beb..1c0445cfc89d 100644
--- a/lang/erlang14/Makefile
+++ b/lang/erlang14/Makefile
@@ -7,6 +7,7 @@
PORTNAME= erlang
PORTVERSION= r10b3
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= lang parallel
MASTER_SITES= http://www.erlang.org/download/ \
diff --git a/lang/erlang14/files/patch-lib_kernel_src_rpc.erl b/lang/erlang14/files/patch-lib_kernel_src_rpc.erl
new file mode 100644
index 000000000000..7a94e2a96574
--- /dev/null
+++ b/lang/erlang14/files/patch-lib_kernel_src_rpc.erl
@@ -0,0 +1,28 @@
+
+$FreeBSD$
+
+--- lib/kernel/src/rpc.erl.orig
++++ lib/kernel/src/rpc.erl
+@@ -495,16 +495,16 @@
+ ReplyTo ! {self(), {promise_reply, R}} %% self() is key
+ end).
+
+-yield(Key) when pid(Key) ->
+- {value, R} = do_yield(Key, infinite),
++yield(Key) when is_pid(Key) ->
++ {value,R} = do_yield(Key, infinity),
+ R.
+
+-nb_yield(Key, infinite) when pid(Key) ->
+- do_yield(Key, infinite);
+-nb_yield(Key, Timeout) when pid(Key), integer(Timeout), Timeout >= 0 ->
++nb_yield(Key, infinity=Inf) when is_pid(Key) ->
++ do_yield(Key, Inf);
++nb_yield(Key, Timeout) when is_pid(Key), is_integer(Timeout), Timeout >= 0 ->
+ do_yield(Key, Timeout).
+
+-nb_yield(Key) when pid(Key) ->
++nb_yield(Key) when is_pid(Key) ->
+ do_yield(Key, 0).
+
+ do_yield(Key, Timeout) ->