summaryrefslogtreecommitdiff
path: root/rebar.config
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2022-02-24 21:34:40 +0100
committerBadlop <badlop@process-one.net>2022-02-24 21:39:20 +0100
commitf721374321e1a6772d10583ea613b20de75edcc6 (patch)
treea2b611efccb8e1992c9012da47152a962f4b754a /rebar.config
parentFix bug introduced in 8d8a3177 (#3782) (diff)
Determine compile definitions based on Erlang version
This gives a clear definition of what erlang versions require each workaround, instead of depending on the actual workaround details. The lib module was removed in OTP 21.0, and the formatting options were moved to erl_error. The uri_string module was introduced in OTP 21.0.
Diffstat (limited to '')
-rw-r--r--rebar.config4
1 files changed, 2 insertions, 2 deletions
diff --git a/rebar.config b/rebar.config
index eb51d129..6343a006 100644
--- a/rebar.config
+++ b/rebar.config
@@ -107,6 +107,8 @@
{erl_opts, [nowarn_deprecated_function,
{i, "include"},
{if_version_above, "20", {d, 'DEPRECATED_GET_STACKTRACE'}},
+ {if_version_above, "20", {d, 'HAVE_ERL_ERROR'}},
+ {if_version_above, "20", {d, 'HAVE_URI_STRING'}},
{if_version_below, "21", {d, 'USE_OLD_HTTP_URI'}},
{if_version_below, "22", {d, 'LAGER'}},
{if_version_below, "21", {d, 'NO_CUSTOMIZE_HOSTNAME_CHECK'}},
@@ -121,8 +123,6 @@
{if_var_true, roster_gateway_workaround, {d, 'ROSTER_GATEWAY_WORKAROUND'}},
{if_var_true, sip, {d, 'SIP'}},
{if_var_true, stun, {d, 'STUN'}},
- {if_have_fun, {erl_error, format_exception, 6}, {d, 'HAVE_ERL_ERROR'}},
- {if_have_fun, {uri_string, normalize, 1}, {d, 'HAVE_URI_STRING'}},
{src_dirs, [src,
{if_rebar3, sql},
{if_var_true, tools, tools},