AC_SUBST([INSTALLGROUP], [$ENABLEGROUP])
fi
-ERLANG_DEPRECATED_TYPES_CHECK
-
if test "$sqlite" = "true"; then
AX_LIB_SQLITE3([3.6.19])
if test "x$SQLITE3_VERSION" = "x"; then
+++ /dev/null
-%%%----------------------------------------------------------------------
-%%%
-%%% ejabberd, Copyright (C) 2002-2018 ProcessOne
-%%%
-%%% This program is free software; you can redistribute it and/or
-%%% modify it under the terms of the GNU General Public License as
-%%% published by the Free Software Foundation; either version 2 of the
-%%% License, or (at your option) any later version.
-%%%
-%%% This program is distributed in the hope that it will be useful,
-%%% but WITHOUT ANY WARRANTY; without even the implied warranty of
-%%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-%%% General Public License for more details.
-%%%
-%%% You should have received a copy of the GNU General Public License along
-%%% with this program; if not, write to the Free Software Foundation, Inc.,
-%%% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-%%%
-%%%----------------------------------------------------------------------
-
--ifdef(ERL_DEPRECATED_TYPES).
-
--define(TDICT, dict()).
--define(TGB_TREE, gb_tree()).
--define(TGB_SET, gb_set()).
--define(TQUEUE, queue()).
-
--else.
-
--define(TDICT, dict:dict()).
--define(TGB_TREE, gb_trees:tree()).
--define(TGB_SET, gb_sets:set()).
--define(TQUEUE, queue:queue()).
-
--endif.
AC_MSG_RESULT([ok])
fi
]) dnl ERLANG_VERSION_CHECK
-
-AC_DEFUN([ERLANG_DEPRECATED_TYPES_CHECK],
-[ AC_MSG_CHECKING([whether Erlang is using deprecated types])
- cat > conftest.erl <<EOF
--module(conftest).
-
--record(state, {host = dict:new() :: dict:dict()}).
-EOF
-
- if $ERLC conftest.erl > /dev/null 2>&1; then
- AC_MSG_RESULT([no])
- AC_SUBST(erlang_deprecated_types, false)
- else
- AC_MSG_RESULT([yes])
- AC_SUBST(erlang_deprecated_types, true)
- fi
-])
{if_var_true, roster_gateway_workaround, {d, 'ROSTER_GATWAY_WORKAROUND'}},
{if_var_match, db_type, mssql, {d, 'mssql'}},
{if_var_true, elixir, {d, 'ELIXIR_ENABLED'}},
- {if_var_true, erlang_deprecated_types, {d, 'ERL_DEPRECATED_TYPES'}},
{if_have_fun, {crypto, strong_rand_bytes, 1}, {d, 'STRONG_RAND_BYTES'}},
{if_have_fun, {rand, uniform, 1}, {d, 'RAND_UNIFORM'}},
{if_have_fun, {gb_sets, iterator_from, 2}, {d, 'GB_SETS_ITERATOR_FROM'}},
handle_sync_event/4, handle_info/3, terminate/3,
code_change/4]).
--include("type_compat.hrl").
-include("logger.hrl").
-include("xmpp.hrl").
-include("ejabberd_http.hrl").
prev_key = <<"">> :: binary(),
prev_poll :: erlang:timestamp() | undefined,
max_concat = unlimited :: unlimited | non_neg_integer(),
- responses = gb_trees:empty() :: ?TGB_TREE,
- receivers = gb_trees:empty() :: ?TGB_TREE,
+ responses = gb_trees:empty() :: gb_trees:tree(),
+ receivers = gb_trees:empty() :: gb_trees:tree(),
shaped_receivers :: p1_queue:queue(),
ip :: inet:ip_address(),
max_requests = 1 :: non_neg_integer()}).
-behaviour(p1_fsm).
--include("type_compat.hrl").
-include("logger.hrl").
%% External exports
passwd = <<"">> :: binary(),
id = 0 :: non_neg_integer(),
bind_timer = make_ref() :: reference(),
- dict = dict:new() :: ?TDICT,
- req_q = queue:new() :: ?TQUEUE}).
+ dict = dict:new() :: dict:dict(),
+ req_q = queue:new() :: queue:queue()}).
%%%----------------------------------------------------------------------
%%% API
disco_local_features/5, disco_sm_features/5,
disco_local_identity/5, disco_sm_identity/5]).
--include("type_compat.hrl").
-include("logger.hrl").
-include("xmpp.hrl").
-type disco_acc() :: {error, stanza_error()} | {result, [binary()]} | empty.
-record(state, {server_host = <<"">> :: binary(),
- delegations = dict:new() :: ?TDICT}).
+ delegations = dict:new() :: dict:dict()}).
-type state() :: #state{}.
%%%===================================================================
%%%===================================================================
%%% Internal functions
%%%===================================================================
--spec get_delegations(binary()) -> ?TDICT.
+-spec get_delegations(binary()) -> dict:dict().
get_delegations(Host) ->
Proc = gen_mod:get_module_proc(Host, ?MODULE),
try gen_server:call(Proc, get_delegations) of
handle_sync_event/4, handle_info/3, terminate/3,
code_change/4]).
--include("type_compat.hrl").
-include("logger.hrl").
-include("xmpp.hrl").
ident = <<"">> :: binary(),
realname = <<"">> :: binary(),
nick = <<"">> :: binary(),
- channels = dict:new() :: ?TDICT,
+ channels = dict:new() :: dict:dict(),
nickchannel :: binary() | undefined,
webirc_password :: binary(),
mod = mod_irc :: atom(),
-callback set_affiliation(binary(), binary(), binary(), jid(), affiliation(),
binary()) -> ok | {error, any()}.
-callback set_affiliations(binary(), binary(), binary(),
- ?TDICT) -> ok | {error, any()}.
+ dict:dict()) -> ok | {error, any()}.
-callback get_affiliation(binary(), binary(), binary(),
binary(), binary()) -> {ok, affiliation()} | {error, any()}.
--callback get_affiliations(binary(), binary(), binary()) -> {ok, ?TDICT} | {error, any()}.
+-callback get_affiliations(binary(), binary(), binary()) -> {ok, dict:dict()} | {error, any()}.
-callback search_affiliation(binary(), binary(), binary(), affiliation()) ->
{ok, [{ljid(), {affiliation(), binary()}}]} | {error, any()}.
_ -> {next_state, normal_state, StateData1}
end.
--spec get_users_and_subscribers(state()) -> ?TDICT.
+-spec get_users_and_subscribers(state()) -> dict:dict().
get_users_and_subscribers(StateData) ->
OnlineSubscribers = ?DICT:fold(
fun(LJID, _, Acc) ->
end,
StateData#state{affiliations = Affiliations}.
--spec set_affiliations(?TDICT, state()) -> state().
+-spec set_affiliations(dict:dict(), state()) -> state().
set_affiliations(Affiliations,
#state{config = #config{persistent = false}} = StateData) ->
set_affiliations_fallback(Affiliations, StateData);
set_affiliations_fallback(Affiliations, StateData)
end.
--spec set_affiliations_fallback(?TDICT, state()) -> state().
+-spec set_affiliations_fallback(dict:dict(), state()) -> state().
set_affiliations_fallback(Affiliations, StateData) ->
StateData#state{affiliations = Affiliations}.
end
end.
--spec get_affiliations(state()) -> ?TDICT.
+-spec get_affiliations(state()) -> dict:dict().
get_affiliations(#state{config = #config{persistent = false}} = StateData) ->
get_affiliations_callback(StateData);
get_affiliations(StateData) ->
Affiliations
end.
--spec get_affiliations_callback(state()) -> ?TDICT.
+-spec get_affiliations_callback(state()) -> dict:dict().
get_affiliations_callback(StateData) ->
StateData#state.affiliations.
%% JIDs = [ User#user.jid || {_, User} <- ?DICT:to_list(Users)],
%% ejabberd_router_multicast:route_multicast(From, Server, JIDs, Packet).
--spec send_wrapped_multiple(jid(), ?TDICT, stanza(), binary(), state()) -> ok.
+-spec send_wrapped_multiple(jid(), dict:dict(), stanza(), binary(), state()) -> ok.
send_wrapped_multiple(From, Users, Packet, Node, State) ->
lists:foreach(
fun({_, #user{jid = To}}) ->
roster_access/2, process_message/1,
process_presence_out/1, process_presence_in/1]).
--include("type_compat.hrl").
-include("logger.hrl").
-include("xmpp.hrl").
-record(state, {server_host = <<"">> :: binary(),
- permissions = dict:new() :: ?TDICT}).
+ permissions = dict:new() :: dict:dict()}).
%%%===================================================================
%%% API
{db_type, @db_type@}.
{debug, @debug@}.
{hipe, @hipe@}.
-{erlang_deprecated_types, @erlang_deprecated_types@}.
{new_sql_schema, @new_sql_schema@}.
%% Ad-hoc directories with source files