summaryrefslogtreecommitdiff
path: root/net-im/ejabberd/files/patch-erlang-17-dict-queue
diff options
context:
space:
mode:
Diffstat (limited to 'net-im/ejabberd/files/patch-erlang-17-dict-queue')
-rw-r--r--net-im/ejabberd/files/patch-erlang-17-dict-queue212
1 files changed, 0 insertions, 212 deletions
diff --git a/net-im/ejabberd/files/patch-erlang-17-dict-queue b/net-im/ejabberd/files/patch-erlang-17-dict-queue
deleted file mode 100644
index ace41dd408e2..000000000000
--- a/net-im/ejabberd/files/patch-erlang-17-dict-queue
+++ /dev/null
@@ -1,212 +0,0 @@
-Fixes to make it work with Erlang R17
-
---- ../deps/riak_pb/src/riak_pb_kv_codec.erl.orig
-+++ ../deps/riak_pb/src/riak_pb_kv_codec.erl
-@@ -49,7 +49,11 @@
-
- -type symbolic_quorum() :: one | quorum | all | default.
- -type value() :: binary().
-+-ifdef(ERLANG_17).
-+-type metadata() :: dict:dict().
-+-else.
- -type metadata() :: dict().
-+-endif.
- -type contents() :: [{metadata(), value()}].
-
- %% @doc Convert a list of object {MetaData,Value} pairs to protocol
-
---- ../deps/riak_pb/rebar.config.orig
-+++ ../deps/riak_pb/rebar.config
-@@ -1,5 +1,5 @@
- %% -*- mode: erlang -*-
--{erl_opts, [debug_info]}.
-+{erl_opts, [{platform_define, "^1[78]-", 'ERLANG_17'},debug_info]}.
- {deps, [
- {protobuffs, "0.8.1", {git, "git://github.com/basho/erlang_protobuffs.git", {tag, "0.8.1p1"}}}
- ]}.
-
---- ../deps/esip/src/esip_listener.erl.orig
-+++ ../deps/esip/src/esip_listener.erl
-@@ -37,7 +37,11 @@
-
- -include("esip_lib.hrl").
- -define(TCP_SEND_TIMEOUT, 10000).
-+-ifdef(ERLANG_17).
-+-record(state, {listeners = dict:new() :: dict:dict()}).
-+-else.
- -record(state, {listeners = dict:new() :: dict()}).
-+-endif.
-
- %%%===================================================================
- %%% API
-
---- ../deps/esip/rebar.config.orig
-+++ ../deps/esip/rebar.config
-@@ -1,4 +1,5 @@
--{erl_opts, [{i, "include"},
-+{erl_opts, [{platform_define, "^1[78]-", 'ERLANG_17'},
-+ {i, "include"},
- {i, "deps/p1_stun/include"},
- {i, "../p1_stun/include"}]}.
-
-
---- ../deps/p1_stun/src/turn.erl.orig
-+++ ../deps/p1_stun/src/turn.erl
-@@ -56,6 +56,29 @@
-
- -type addr() :: {inet:ip_address(), inet:port_number()}.
-
-+-ifdef(ERLANG_17).
-+-record(state,
-+ {sock_mod = gen_udp :: gen_udp | gen_tcp | p1_tls,
-+ sock :: inet:socket() | p1_tls:tls_socket(),
-+ addr = {{0,0,0,0}, 0} :: addr(),
-+ owner = self() :: pid(),
-+ username = <<"">> :: binary(),
-+ realm = <<"">> :: binary(),
-+ key = {<<"">>, <<"">>, <<"">>} :: {binary(), binary(), binary()},
-+ server_name = <<"">> :: binary(),
-+ permissions = ?DICT:new() :: dict:dict(),
-+ channels = ?DICT:new() :: dict:dict(),
-+ max_permissions :: non_neg_integer() | atom(),
-+ relay_ip = {127,0,0,1} :: inet:ip_address(),
-+ min_port = 49152 :: non_neg_integer(),
-+ max_port = 65535 :: non_neg_integer(),
-+ relay_addr :: addr(),
-+ relay_sock :: inet:socket(),
-+ last_trid :: non_neg_integer(),
-+ last_pkt = <<>> :: binary(),
-+ seq = 1 :: non_neg_integer(),
-+ life_timer :: reference()}).
-+-else.
- -record(state,
- {sock_mod = gen_udp :: gen_udp | gen_tcp | p1_tls,
- sock :: inet:socket() | p1_tls:tls_socket(),
-@@ -77,6 +100,7 @@
- last_pkt = <<>> :: binary(),
- seq = 1 :: non_neg_integer(),
- life_timer :: reference()}).
-+-endif.
-
- %%====================================================================
- %% API
-
---- ../deps/p1_stun/rebar.config.orig
-+++ ../deps/p1_stun/rebar.config
-@@ -1,4 +1,5 @@
--{erl_opts, [debug_info, {i, "include"}]}.
-+{erl_opts, [{platform_define, "^1[78]-", 'ERLANG_17'},
-+ debug_info, {i, "include"}]}.
-
- {deps, [{p1_tls, ".*", {git, "git://github.com/processone/tls.git"}},
- {p1_utils, ".*", {git, "git://github.com/processone/p1_utils.git"}}]}.
-
---- ../deps/p1_stun/src/stun_listener.erl.orig
-+++ ../deps/p1_stun/src/stun_listener.erl
-@@ -36,7 +36,11 @@
- terminate/2, code_change/3]).
-
- -define(TCP_SEND_TIMEOUT, 10000).
-+-ifdef(ERLANG_17).
-+-record(state, {listeners = dict:new() :: dict:dict()}).
-+-else.
- -record(state, {listeners = dict:new() :: dict()}).
-+-endif.
-
- %%%===================================================================
- %%% API
---- ../deps/riakc/rebar.config.orig
-+++ ../deps/riakc/rebar.config
-@@ -1,6 +1,8 @@
- {cover_enabled, true}.
- {eunit_opts, [verbose]}.
--{erl_opts, [warnings_as_errors, debug_info]}.
-+{erl_opts, [
-+ {platform_define, "^1[78]-", 'ERLANG_17'},
-+ warnings_as_errors, debug_info]}.
- {deps, [
- {riak_pb, ".*", {git, "git://github.com/basho/riak_pb", {tag, "1.4.4.0"}}}
- ]}.
---- ../deps/riakc/src/riakc_obj.erl.orig
-+++ ../deps/riakc/src/riakc_obj.erl
-@@ -79,7 +79,11 @@
- -type key() :: binary() | 'undefined'. %% A key name
- -type id() :: {bucket(), key()}.
- -type vclock() :: binary(). %% An opaque vector clock
-+-ifdef(ERLANG_17).
-+-type metadata() :: dict:dict(). %% Value metadata
-+-else.
- -type metadata() :: dict(). %% Value metadata
-+-endif.
- -type content_type() :: string(). %% The media type of a value
- -type value() :: binary(). %% An opaque value
- -type contents() :: [{metadata(), value()}]. %% All metadata/value pairs in a `riakc_obj'.
-@@ -98,6 +102,16 @@
- -type tag() :: binary().
- -type link() :: {tag(), [id()]}.
-
-+-ifdef(ERLANG_17).
-+-record(riakc_obj, {
-+ bucket :: bucket(),
-+ key :: key(),
-+ vclock :: vclock(),
-+ contents :: contents(),
-+ updatemetadata :: dict:dict(),
-+ updatevalue :: value()
-+ }).
-+-else.
- -record(riakc_obj, {
- bucket :: bucket(),
- key :: key(),
-@@ -106,6 +120,7 @@
- updatemetadata :: dict(),
- updatevalue :: value()
- }).
-+-endif.
-
- -type riakc_obj() :: #riakc_obj{}. %% The record/type containing the entire Riak object.
- -export_type([riakc_obj/0, bucket/0, key/0, vclock/0, contents/0, metadata/0, value/0,
-@@ -284,7 +299,11 @@
- end.
-
- %% @doc Return the content type from metadata
-+-ifdef(ERLANG_17).
-+-spec md_ctype(dict:dict()) -> undefined | content_type().
-+-else.
- -spec md_ctype(dict()) -> undefined | content_type().
-+-endif.
- md_ctype(MetaData) ->
- case dict:find(?MD_CTYPE, MetaData) of
- error ->
---- ../deps/riakc/src/riakc_pb_socket.erl.orig
-+++ ../deps/riakc/src/riakc_pb_socket.erl
-@@ -110,6 +110,20 @@
-
- -type portnum() :: non_neg_integer(). %% The TCP port number of the Riak node's Protocol Buffers interface
- -type address() :: string() | atom() | inet:ip_address(). %% The TCP/IP host name or address of the Riak node
-+-ifdef(ERLANG_17).
-+-record(state, {address :: address(), % address to connect to
-+ port :: portnum(), % port to connect to
-+ auto_reconnect = false :: boolean(), % if true, automatically reconnects to server
-+ % if false, exits on connection failure/request timeout
-+ queue_if_disconnected = false :: boolean(), % if true, add requests to queue if disconnected
-+ sock :: port(), % gen_tcp socket
-+ active :: #request{} | undefined, % active request
-+ queue :: queue:queue() | undefined, % queue of pending requests
-+ connects=0 :: non_neg_integer(), % number of successful connects
-+ failed=[] :: [connection_failure()], % breakdown of failed connects
-+ connect_timeout=infinity :: timeout(), % timeout of TCP connection
-+ reconnect_interval=?FIRST_RECONNECT_INTERVAL :: non_neg_integer()}).
-+-else.
- -record(state, {address :: address(), % address to connect to
- port :: portnum(), % port to connect to
- auto_reconnect = false :: boolean(), % if true, automatically reconnects to server
-@@ -122,6 +136,7 @@
- failed=[] :: [connection_failure()], % breakdown of failed connects
- connect_timeout=infinity :: timeout(), % timeout of TCP connection
- reconnect_interval=?FIRST_RECONNECT_INTERVAL :: non_neg_integer()}).
-+-endif.
-
- %% @doc Create a linked process to talk with the riak server on Address:Port
- %% Client id will be assigned by the server.
-