mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Replace 'if' preprocessor directive with 'ifndef', add OTP_BELOW_24
The 'if' preprocessor directive was added in Erlang/OTP 21.0, but ejabberd currently supports Erlang 20.0 and higher... Let's use 'ifndef' instead. https://www.erlang.org/doc/reference_manual/macros.html#flow-control-in-macros https://www.erlang.org/doc/apps/compiler/notes#compiler-7.2 https://www.erlang.org/patches/otp-21.0#compiler-7.2
This commit is contained in:
parent
816900a6cf
commit
b8181974ec
1
mix.exs
1
mix.exs
@ -82,6 +82,7 @@ defmodule Ejabberd.MixProject do
|
||||
if_version_below(~c"23", [{:d, :USE_OLD_PG2}]) ++
|
||||
if_version_below(~c"24", [{:d, :COMPILER_REPORTS_ONLY_LINES}]) ++
|
||||
if_version_below(~c"24", [{:d, :SYSTOOLS_APP_DEF_WITHOUT_OPTIONAL}]) ++
|
||||
if_version_below(~c"24", [{:d, :OTP_BELOW_24}]) ++
|
||||
if_version_below(~c"25", [{:d, :OTP_BELOW_25}])
|
||||
defines = for {:d, value} <- result, do: {:d, value}
|
||||
result ++ [{:d, :ALL_DEFS, defines}]
|
||||
|
@ -129,6 +129,7 @@
|
||||
{if_version_below, "23", {d, 'USE_OLD_PG2'}},
|
||||
{if_version_below, "24", {d, 'COMPILER_REPORTS_ONLY_LINES'}},
|
||||
{if_version_below, "24", {d, 'SYSTOOLS_APP_DEF_WITHOUT_OPTIONAL'}},
|
||||
{if_version_below, "24", {d, 'OTP_BELOW_24'}},
|
||||
{if_version_below, "25", {d, 'OTP_BELOW_25'}},
|
||||
{if_var_false, debug, no_debug_info},
|
||||
{if_var_true, debug, debug_info},
|
||||
|
@ -24,7 +24,7 @@
|
||||
%%%----------------------------------------------------------------------
|
||||
|
||||
-module(mod_matrix_gw).
|
||||
-if(?OTP_RELEASE >= 24).
|
||||
-ifndef(OTP_BELOW_24).
|
||||
|
||||
-author('alexey@process-one.net').
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
%%%-------------------------------------------------------------------
|
||||
-module(mod_matrix_gw_room).
|
||||
|
||||
-if(?OTP_RELEASE >= 24).
|
||||
-ifndef(OTP_BELOW_24).
|
||||
-behaviour(gen_statem).
|
||||
|
||||
%% API
|
||||
|
@ -23,7 +23,7 @@
|
||||
%%%
|
||||
%%%-------------------------------------------------------------------
|
||||
-module(mod_matrix_gw_s2s).
|
||||
-if(?OTP_RELEASE >= 24).
|
||||
-ifndef(OTP_BELOW_24).
|
||||
-behaviour(gen_statem).
|
||||
|
||||
%% API
|
||||
|
@ -20,7 +20,7 @@
|
||||
%%%
|
||||
%%%----------------------------------------------------------------------
|
||||
-module(mod_matrix_gw_sup).
|
||||
-if(?OTP_RELEASE >= 24).
|
||||
-ifndef(OTP_BELOW_24).
|
||||
-behaviour(supervisor).
|
||||
|
||||
%% API
|
||||
|
Loading…
Reference in New Issue
Block a user