mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Update sql_query record to handle the Erlang/OTP 24 compiler reports
As mentioned in the Erlang/OTP 24 announcement: "Compiler warnings and errors now include column numbers in addition to line numbers."
This commit is contained in:
parent
bf1600891b
commit
c45b526ec3
@ -29,11 +29,19 @@
|
|||||||
-define(SQL_INSERT_MARK, sql_insert__mark_).
|
-define(SQL_INSERT_MARK, sql_insert__mark_).
|
||||||
-define(SQL_INSERT(Table, Fields), ?SQL_INSERT_MARK(Table, Fields)).
|
-define(SQL_INSERT(Table, Fields), ?SQL_INSERT_MARK(Table, Fields)).
|
||||||
|
|
||||||
|
-ifdef(COMPILER_REPORTS_ONLY_LINES).
|
||||||
-record(sql_query, {hash :: binary(),
|
-record(sql_query, {hash :: binary(),
|
||||||
format_query :: fun(),
|
format_query :: fun(),
|
||||||
format_res :: fun(),
|
format_res :: fun(),
|
||||||
args :: fun(),
|
args :: fun(),
|
||||||
loc :: {module(), pos_integer()}}).
|
loc :: {module(), pos_integer()}}).
|
||||||
|
-else.
|
||||||
|
-record(sql_query, {hash :: binary(),
|
||||||
|
format_query :: fun(),
|
||||||
|
format_res :: fun(),
|
||||||
|
args :: fun(),
|
||||||
|
loc :: {module(), {pos_integer(), pos_integer()}}}).
|
||||||
|
-endif.
|
||||||
|
|
||||||
-record(sql_escape, {string :: fun((binary()) -> binary()),
|
-record(sql_escape, {string :: fun((binary()) -> binary()),
|
||||||
integer :: fun((integer()) -> binary()),
|
integer :: fun((integer()) -> binary()),
|
||||||
|
1
mix.exs
1
mix.exs
@ -70,6 +70,7 @@ defmodule Ejabberd.Mixfile do
|
|||||||
if_version_below('22', [{:d, :LAGER}]) ++
|
if_version_below('22', [{:d, :LAGER}]) ++
|
||||||
if_version_below('23', [{:d, :USE_OLD_CRYPTO_HMAC}]) ++
|
if_version_below('23', [{:d, :USE_OLD_CRYPTO_HMAC}]) ++
|
||||||
if_version_below('23', [{:d, :USE_OLD_PG2}]) ++
|
if_version_below('23', [{:d, :USE_OLD_PG2}]) ++
|
||||||
|
if_version_below('24', [{:d, :COMPILER_REPORTS_ONLY_LINES}]) ++
|
||||||
if_function_exported(:erl_error, :format_exception, 6, [{:d, :HAVE_ERL_ERROR}])
|
if_function_exported(:erl_error, :format_exception, 6, [{:d, :HAVE_ERL_ERROR}])
|
||||||
defines = for {:d, value} <- result, do: {:d, value}
|
defines = for {:d, value} <- result, do: {:d, value}
|
||||||
result ++ [{:d, :ALL_DEFS, defines}]
|
result ++ [{:d, :ALL_DEFS, defines}]
|
||||||
|
@ -99,6 +99,7 @@
|
|||||||
{if_version_below, "21", {d, 'NO_CUSTOMIZE_HOSTNAME_CHECK'}},
|
{if_version_below, "21", {d, 'NO_CUSTOMIZE_HOSTNAME_CHECK'}},
|
||||||
{if_version_below, "23", {d, 'USE_OLD_CRYPTO_HMAC'}},
|
{if_version_below, "23", {d, 'USE_OLD_CRYPTO_HMAC'}},
|
||||||
{if_version_below, "23", {d, 'USE_OLD_PG2'}},
|
{if_version_below, "23", {d, 'USE_OLD_PG2'}},
|
||||||
|
{if_version_below, "24", {d, 'COMPILER_REPORTS_ONLY_LINES'}},
|
||||||
{if_var_match, db_type, mssql, {d, 'mssql'}},
|
{if_var_match, db_type, mssql, {d, 'mssql'}},
|
||||||
{if_var_false, debug, no_debug_info},
|
{if_var_false, debug, no_debug_info},
|
||||||
{if_var_true, debug, debug_info},
|
{if_var_true, debug, debug_info},
|
||||||
|
Loading…
Reference in New Issue
Block a user