aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bootstrap/lib/compiler/ebin/compile.beambin37684 -> 37788 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/v3_core.beambin51096 -> 51440 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/erl_parse.beambin69072 -> 69084 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/erl_scan.beambin30092 -> 30132 bytes
-rw-r--r--erts/emulator/beam/beam_bp.c1
-rw-r--r--erts/etc/common/ct_run.c12
-rw-r--r--erts/etc/win32/erlsrv/erlsrv_interactive.c2
-rw-r--r--lib/compiler/src/compile.erl3
-rw-r--r--lib/compiler/src/v3_core.erl51
-rw-r--r--lib/compiler/test/bs_bincomp_SUITE.erl3
-rw-r--r--lib/dialyzer/src/dialyzer_analysis_callgraph.erl4
-rw-r--r--lib/odbc/c_src/odbcserver.c2
-rw-r--r--lib/odbc/test/odbc_query_SUITE.erl22
-rw-r--r--lib/odbc/test/oracle.erl27
-rw-r--r--lib/odbc/test/postgres.erl39
-rw-r--r--lib/reltool/src/reltool_server.erl39
-rw-r--r--lib/reltool/test/reltool_server_SUITE.erl53
-rw-r--r--lib/snmp/include/.gitignore4
-rw-r--r--lib/snmp/priv/mibs/.gitignore1
-rw-r--r--lib/snmp/test/snmp_test_data/.gitignore2
-rw-r--r--lib/stdlib/doc/src/erl_parse.xml19
-rw-r--r--lib/stdlib/src/erl_parse.yrl1
-rw-r--r--lib/stdlib/src/erl_scan.erl1
-rw-r--r--lib/stdlib/test/erl_scan_SUITE.erl28
-rw-r--r--lib/tools/emacs/erlang-start.el3
25 files changed, 262 insertions, 55 deletions
diff --git a/bootstrap/lib/compiler/ebin/compile.beam b/bootstrap/lib/compiler/ebin/compile.beam
index 609d7e703f..e87e6a8555 100644
--- a/bootstrap/lib/compiler/ebin/compile.beam
+++ b/bootstrap/lib/compiler/ebin/compile.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/v3_core.beam b/bootstrap/lib/compiler/ebin/v3_core.beam
index 7d11d6576e..7e2960fda2 100644
--- a/bootstrap/lib/compiler/ebin/v3_core.beam
+++ b/bootstrap/lib/compiler/ebin/v3_core.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/erl_parse.beam b/bootstrap/lib/stdlib/ebin/erl_parse.beam
index 849b0671ee..b66feba048 100644
--- a/bootstrap/lib/stdlib/ebin/erl_parse.beam
+++ b/bootstrap/lib/stdlib/ebin/erl_parse.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/erl_scan.beam b/bootstrap/lib/stdlib/ebin/erl_scan.beam
index 99cb155374..c8da05cb67 100644
--- a/bootstrap/lib/stdlib/ebin/erl_scan.beam
+++ b/bootstrap/lib/stdlib/ebin/erl_scan.beam
Binary files differ
diff --git a/erts/emulator/beam/beam_bp.c b/erts/emulator/beam/beam_bp.c
index 9b17de34ec..ce025c9b6d 100644
--- a/erts/emulator/beam/beam_bp.c
+++ b/erts/emulator/beam/beam_bp.c
@@ -1580,6 +1580,7 @@ clear_function_break(BeamInstr *pc, Uint break_flags)
}
if (common & ERTS_BPF_META_TRACE) {
MatchSetUnref(bp->meta_ms);
+ bp_meta_unref(bp->meta_pid);
}
if (common & ERTS_BPF_COUNT) {
ASSERT((bp->flags & ERTS_BPF_COUNT_ACTIVE) == 0);
diff --git a/erts/etc/common/ct_run.c b/erts/etc/common/ct_run.c
index 5e5b612a12..853785dcd1 100644
--- a/erts/etc/common/ct_run.c
+++ b/erts/etc/common/ct_run.c
@@ -432,18 +432,6 @@ strsave(char* string)
return p;
}
-/* Instead of making sure basename exists, we do our own */
-static char *simple_basename(char *path)
-{
- char *ptr;
- for (ptr = path; *ptr != '\0'; ++ptr) {
- if (*ptr == '/' || *ptr == '\\') {
- path = ptr + 1;
- }
- }
- return path;
-}
-
static char*
get_default_emulator(char* progname)
{
diff --git a/erts/etc/win32/erlsrv/erlsrv_interactive.c b/erts/etc/win32/erlsrv/erlsrv_interactive.c
index 736eabac79..3f7e20b923 100644
--- a/erts/etc/win32/erlsrv/erlsrv_interactive.c
+++ b/erts/etc/win32/erlsrv/erlsrv_interactive.c
@@ -525,7 +525,7 @@ int do_usage(char *arg0){
"list, give option -args as last option on command line "
"with\n"
"no arguments.\n\n");
- printf("Se Erlang documentation for full description.\n");
+ printf("See Erlang documentation for full description.\n");
return 0;
}
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index 497af2b52c..745f1d5cf9 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -599,7 +599,8 @@ standard_passes() ->
core_passes() ->
%% Optimization and transforms of Core Erlang code.
- [{delay,
+ [{iff,clint0,?pass(core_lint_module)},
+ {delay,
[{unless,no_copt,
[{core_old_inliner,fun test_old_inliner/1,fun core_old_inliner/1},
{iff,doldinline,{listing,"oldinline"}},
diff --git a/lib/compiler/src/v3_core.erl b/lib/compiler/src/v3_core.erl
index 01042cc56f..eea54b30a2 100644
--- a/lib/compiler/src/v3_core.erl
+++ b/lib/compiler/src/v3_core.erl
@@ -1187,9 +1187,9 @@ list_gen_pattern(P0, Line, St) ->
bc_initial_size(E, Q, St0) ->
try
- {ElemSzExpr,ElemSzPre,St1} = bc_elem_size(E, St0),
+ {ElemSzExpr,ElemSzPre,EVs,St1} = bc_elem_size(E, St0),
{V,St2} = new_var(St1),
- {GenSzExpr,GenSzPre,St3} = bc_gen_size(Q, St2),
+ {GenSzExpr,GenSzPre,St3} = bc_gen_size(Q, EVs, St2),
case ElemSzExpr of
#c_literal{val=ElemSz} when ElemSz rem 8 =:= 0 ->
NumBytesExpr = #c_literal{val=ElemSz div 8},
@@ -1214,11 +1214,13 @@ bc_initial_size(E, Q, St0) ->
bc_elem_size({bin,_,El}, St0) ->
case bc_elem_size_1(El, 0, []) of
{Bits,[]} ->
- {#c_literal{val=Bits},[],St0};
+ {#c_literal{val=Bits},[],[],St0};
{Bits,Vars0} ->
[{U,V0}|Pairs] = sort(Vars0),
F = bc_elem_size_combine(Pairs, U, [V0], []),
- bc_mul_pairs(F, #c_literal{val=Bits}, [], St0)
+ Vs = [V || {_,#c_var{name=V}} <- Vars0],
+ {E,Pre,St} = bc_mul_pairs(F, #c_literal{val=Bits}, [], St0),
+ {E,Pre,Vs,St}
end.
bc_elem_size_1([{bin_element,_,_,{integer,_,N},Flags}|Es], Bits, Vars) ->
@@ -1260,11 +1262,11 @@ bc_add_list_1([H|T], Pre, E, St0) ->
bc_add_list_1([], Pre, E, St) ->
{E,reverse(Pre),St}.
-bc_gen_size(Q, St) ->
- bc_gen_size_1(Q, #c_literal{val=1}, [], St).
+bc_gen_size(Q, EVs, St) ->
+ bc_gen_size_1(Q, EVs, #c_literal{val=1}, [], St).
-bc_gen_size_1([{generate,L,El,Gen}|Qs], E0, Pre0, St0) ->
- bc_verify_non_filtering(El),
+bc_gen_size_1([{generate,L,El,Gen}|Qs], EVs, E0, Pre0, St0) ->
+ bc_verify_non_filtering(El, EVs),
case Gen of
{var,_,ListVar} ->
Lanno = lineno_anno(L, St0),
@@ -1275,16 +1277,16 @@ bc_gen_size_1([{generate,L,El,Gen}|Qs], E0, Pre0, St0) ->
name=#c_literal{val=length},
args=[#c_var{name=ListVar}]}},
{E,Pre,St} = bc_gen_size_mul(E0, LenVar, [Set|Pre0], St1),
- bc_gen_size_1(Qs, E, Pre, St);
+ bc_gen_size_1(Qs, EVs, E, Pre, St);
_ ->
%% The only expressions we handle is literal lists.
Len = bc_list_length(Gen, 0),
{E,Pre,St} = bc_gen_size_mul(E0, #c_literal{val=Len}, Pre0, St0),
- bc_gen_size_1(Qs, E, Pre, St)
+ bc_gen_size_1(Qs, EVs, E, Pre, St)
end;
-bc_gen_size_1([{b_generate,_,El,Gen}|Qs], E0, Pre0, St0) ->
- bc_verify_non_filtering(El),
- {MatchSzExpr,Pre1,St1} = bc_elem_size(El, St0),
+bc_gen_size_1([{b_generate,_,El,Gen}|Qs], EVs, E0, Pre0, St0) ->
+ bc_verify_non_filtering(El, EVs),
+ {MatchSzExpr,Pre1,_,St1} = bc_elem_size(El, St0),
Pre2 = reverse(Pre1, Pre0),
{ResVar,St2} = new_var(St1),
{BitSizeExpr,Pre3,St3} = bc_gen_bit_size(Gen, Pre2, St2),
@@ -1292,10 +1294,10 @@ bc_gen_size_1([{b_generate,_,El,Gen}|Qs], E0, Pre0, St0) ->
MatchSzExpr)},
Pre4 = [Div|Pre3],
{E,Pre,St} = bc_gen_size_mul(E0, ResVar, Pre4, St3),
- bc_gen_size_1(Qs, E, Pre, St);
-bc_gen_size_1([], E, Pre, St) ->
+ bc_gen_size_1(Qs, EVs, E, Pre, St);
+bc_gen_size_1([], _, E, Pre, St) ->
{E,reverse(Pre),St};
-bc_gen_size_1(_, _, _, _) ->
+bc_gen_size_1(_, _, _, _, _) ->
throw(impossible).
bc_gen_bit_size({var,L,V}, Pre0, St0) ->
@@ -1312,13 +1314,20 @@ bc_gen_bit_size({bin,_,_}=Bin, Pre, St) ->
bc_gen_bit_size(_, _, _) ->
throw(impossible).
-bc_verify_non_filtering({bin,_,Els}) ->
- foreach(fun({bin_element,_,{var,_,_},_,_}) -> ok;
+bc_verify_non_filtering({bin,_,Els}, EVs) ->
+ foreach(fun({bin_element,_,{var,_,V},_,_}) ->
+ case member(V, EVs) of
+ true -> throw(impossible);
+ false -> ok
+ end;
(_) -> throw(impossible)
end, Els);
-bc_verify_non_filtering({var,_,_}) ->
- ok;
-bc_verify_non_filtering(_) ->
+bc_verify_non_filtering({var,_,V}, EVs) ->
+ case member(V, EVs) of
+ true -> throw(impossible);
+ false -> ok
+ end;
+bc_verify_non_filtering(_, _) ->
throw(impossible).
bc_list_length({string,_,Str}, Len) ->
diff --git a/lib/compiler/test/bs_bincomp_SUITE.erl b/lib/compiler/test/bs_bincomp_SUITE.erl
index d39e340429..451a9b1e3b 100644
--- a/lib/compiler/test/bs_bincomp_SUITE.erl
+++ b/lib/compiler/test/bs_bincomp_SUITE.erl
@@ -282,6 +282,9 @@ sizes(Config) when is_list(Config) ->
?line <<1,2,3,0>> = Fun13(7),
?line <<1,2,3,0,0>> = Fun13(8),
+ <<0:3>> = cs_default(<< <<0:S>> || S <- [0,1,2] >>),
+ <<0:3>> = cs_default(<< <<0:S>> || <<S>> <= <<0,1,2>> >>),
+
?line {'EXIT',_} = (catch << <<C:4>> || <<C:8>> <= {1,2,3} >>),
?line cs_end(),
diff --git a/lib/dialyzer/src/dialyzer_analysis_callgraph.erl b/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
index 86618a4915..ca6b403ac9 100644
--- a/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
+++ b/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
@@ -261,8 +261,8 @@ compile_and_store(Files, #analysis_state{codeserver = CServer,
dict:new(), NewFiles),
check_for_duplicate_modules(ModDict);
false ->
- Msg = io_lib:format("Could not scan the following file(s): ~p",
- [lists:flatten(Failed)]),
+ Msg = io_lib:format("Could not scan the following file(s):~n~s",
+ [[Reason || {_Filename, Reason} <- Failed]]),
exit({error, Msg})
end,
{T2, _} = statistics(runtime),
diff --git a/lib/odbc/c_src/odbcserver.c b/lib/odbc/c_src/odbcserver.c
index a6b3de6e48..5730e20774 100644
--- a/lib/odbc/c_src/odbcserver.c
+++ b/lib/odbc/c_src/odbcserver.c
@@ -1222,7 +1222,7 @@ static db_result_msg encode_out_params(db_state *state,
(column.type.strlen_or_indptr_array[j]));
break;
case SQL_C_SLONG:
- ei_x_encode_long(&dynamic_buffer(state), ((long*)values)[j]);
+ ei_x_encode_long(&dynamic_buffer(state), ((SQLINTEGER*)values)[j]);
break;
case SQL_C_DOUBLE:
ei_x_encode_double(&dynamic_buffer(state),
diff --git a/lib/odbc/test/odbc_query_SUITE.erl b/lib/odbc/test/odbc_query_SUITE.erl
index 062373afa0..56550bfaa6 100644
--- a/lib/odbc/test/odbc_query_SUITE.erl
+++ b/lib/odbc/test/odbc_query_SUITE.erl
@@ -43,7 +43,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
case odbc_test_lib:odbc_check() of
ok ->
- [sql_query, next, {group, scrollable_cursors}, select_count,
+ [stored_proc, sql_query, next, {group, scrollable_cursors}, select_count,
select_next, select_relative, select_absolute,
create_table_twice, delete_table_twice, duplicate_key,
not_connection_owner, no_result_set, query_error,
@@ -172,6 +172,26 @@ end_per_testcase(_Case, Config) ->
%%-------------------------------------------------------------------------
%% Test cases starts here.
%%-------------------------------------------------------------------------
+stored_proc(doc)->
+ ["Test stored proc with OUT param"];
+stored_proc(suite) -> [];
+stored_proc(Config) when is_list(Config) ->
+ case ?RDBMS of
+ X when X == oracle; X == postgres->
+ Ref = ?config(connection_ref, Config),
+ {updated, _} =
+ odbc:sql_query(Ref,
+ ?RDBMS:stored_proc_integer_out()),
+ Result = ?RDBMS:query_result(),
+ Result =
+ ?RDBMS:param_query(Ref),
+ {updated, _} =
+ odbc:sql_query(Ref, ?RDBMS:drop_proc()),
+ ok;
+ _ ->
+ {skip, "stored proc not yet supported"}
+ end.
+
sql_query(doc)->
["Test the common cases"];
sql_query(suite) -> [];
diff --git a/lib/odbc/test/oracle.erl b/lib/odbc/test/oracle.erl
index d74863d8c1..95cf7155dc 100644
--- a/lib/odbc/test/oracle.erl
+++ b/lib/odbc/test/oracle.erl
@@ -240,3 +240,30 @@ describe_floating() ->
{ok,[{"F",sql_double},{"R",sql_double},{"D",sql_double}]}.
describe_dec_num() ->
{ok,[{"MYDEC",{sql_decimal,9,3}},{"MYNUM",{sql_decimal,9,2}}]}.
+
+%-------------------------------------------------------------------------
+drop_proc() ->
+ "drop procedure test_proc1;".
+
+stored_proc_integer_out() ->
+ "create or replace PROCEDURE test_proc1(" ++
+ "int_a OUT NUMBER, " ++
+ "int_b OUT NUMBER) " ++
+ "is " ++
+ "begin " ++
+ " int_a := 123; " ++
+ " int_b := 456; " ++
+ "exception " ++
+ "WHEN NO_DATA_FOUND THEN " ++
+ " int_a := 0; " ++
+ " int_b := 0; " ++
+ "end;".
+
+param_query(Ref) ->
+ odbc:param_query(Ref, "call test_proc1(?,?)",
+ [{sql_integer, out, [0]},
+ {sql_integer, out, [0]}]).
+
+
+query_result() ->
+ {executed, 2, [{123, 456}]}.
diff --git a/lib/odbc/test/postgres.erl b/lib/odbc/test/postgres.erl
index d564dbd5ff..0c1761b835 100644
--- a/lib/odbc/test/postgres.erl
+++ b/lib/odbc/test/postgres.erl
@@ -293,3 +293,42 @@ describe_dec_num() ->
describe_timestamp() ->
{ok, [{"field", sql_timestamp}]}.
+
+%-------------------------------------------------------------------------
+drop_proc() ->
+ "drop function test_proc1(OUT integer, OUT integer);".
+
+stored_proc_integer_out() ->
+ "create or replace FUNCTION test_proc1(" ++
+ "OUT int_a INTEGER, " ++
+ "OUT int_b INTEGER) " ++
+ "AS $$ " ++
+ "BEGIN " ++
+ " int_a := 123; " ++
+ " int_b := 456; " ++
+ "END " ++
+ "$$ LANGUAGE plpgsql ".
+
+%% This does not test what you might think it is supposed to test.
+%% Since the stored procedure has got 2 out parameters and no
+%% in parameters it is of arity 0 as called below.
+%%
+%% The port program odbcserver.c will marshal these out parameters
+%% and hand them to ODBC. The ODBC driver for postgres will
+%% apparently not give a hoot about these out parameters and instead
+%% return the result in a regular result select set. The port program
+%% will assume it has the result in the out parameters and marshal
+%% these as they are i.e as it itself had packed them, so they
+%% come back unchanged.
+%%
+%% The real function result goes into the void but the code in odbcserver.c
+%% that marshals out parameters returned from ODBC will be run
+%% so that is what this test tests...
+%%
+param_query(Ref) ->
+ odbc:param_query(Ref, "select * from test_proc1()",
+ [{sql_integer, out, [111]},
+ {sql_integer, out, [444]}]).
+
+query_result() ->
+ {executed, 2, [{111, 444}]}.
diff --git a/lib/reltool/src/reltool_server.erl b/lib/reltool/src/reltool_server.erl
index 5e25f22a6f..97785ca7f8 100644
--- a/lib/reltool/src/reltool_server.erl
+++ b/lib/reltool/src/reltool_server.erl
@@ -973,7 +973,8 @@ refresh_app(#app{name = AppName,
is_escript = IsEscript,
active_dir = ActiveDir,
label = OptLabel,
- mods = Mods} = App,
+ mods = Mods,
+ status = AppStatus} = App,
Force,
Status) ->
if
@@ -993,6 +994,8 @@ refresh_app(#app{name = AppName,
read_app_info(AppFile,
AppFile,
AppName,
+ ActiveDir,
+ AppStatus,
DefaultVsn,
Status),
@@ -1064,9 +1067,11 @@ refresh_app(#app{name = AppName,
missing_app_info(Vsn) ->
#app_info{vsn = Vsn}.
-read_app_info(_AppFileOrBin, _AppFile, erts, DefaultVsn, Status) ->
+read_app_info(_AppFileOrBin, _AppFile, erts, _ActiveDir, _AppStatus, DefaultVsn, Status) ->
{missing_app_info(DefaultVsn), Status};
-read_app_info(AppFileOrBin, AppFile, AppName, DefaultVsn, Status) ->
+read_app_info(_AppFileOrBin, _AppFile, _AppName, undefined, missing, DefaultVsn, Status) ->
+ {missing_app_info(DefaultVsn), Status};
+read_app_info(AppFileOrBin, AppFile, AppName, _ActiveDir, _AppStatus, DefaultVsn, Status) ->
EnoentText = file:format_error(enoent),
case reltool_utils:prim_consult(AppFileOrBin) of
{ok, [{application, AppName, Info}]} ->
@@ -1080,9 +1085,9 @@ read_app_info(AppFileOrBin, AppFile, AppName, DefaultVsn, Status) ->
Status)};
{error, Text} when Text =:= EnoentText ->
{missing_app_info(DefaultVsn),
- reltool_utils:add_warning("~w: Missing app file ~tp.",
- [AppName,AppFile],
- Status)};
+ reltool_utils:add_warning("~w: Missing app file ~tp.",
+ [AppName,AppFile],
+ Status)};
{error, Text} ->
{missing_app_info(DefaultVsn),
reltool_utils:add_warning("~w: Cannot parse app file ~tp (~tp).",
@@ -1773,13 +1778,15 @@ escripts_to_apps([Escript | Escripts], Apps, Status) ->
get_vsn_from_dir(AppName,AppLabel),
AppFileName =
filename:join([Escript, FullName]),
+ Dir = filename:join([Escript, AppName]),
{Info, StatusAcc2} =
read_app_info(GetBin(),
AppFileName,
AppName,
+ Dir,
+ ok,
DefaultVsn,
Status),
- Dir = filename:join([Escript, AppName]),
{[{AppName, app, Dir, Info} | FileAcc],
StatusAcc2};
E when E =:= Ext ->
@@ -1979,20 +1986,27 @@ refresh_apps(ConfigApps, [New | NewApps], Acc, Force, Status) ->
refresh_apps(_ConfigApps, [], Acc, _Force, Status) ->
{lists:reverse(Acc), Status}.
-
ensure_app_info(#app{is_escript = IsEscript, active_dir = Dir, info = Info},
Status)
when IsEscript=/=false ->
%% Escript or application which is inlined in an escript
{Info, Dir, Status};
-ensure_app_info(#app{name = Name, sorted_dirs = []}, _Status) ->
- reltool_utils:throw_error("~w: : Missing application directory.",[Name]);
+ensure_app_info(#app{name = Name, sorted_dirs = []} = App, Status) ->
+ Reason = "~w: Missing application directory.",
+ case App of
+ #app{incl_cond = exclude, status = missing, active_dir = Dir} ->
+ Status2 = reltool_utils:add_warning(Reason, [Name], Status),
+ {missing_app_info(""), Dir, Status2};
+ _ ->
+ reltool_utils:throw_error(Reason, [Name])
+ end;
ensure_app_info(#app{name = Name,
vsn = Vsn,
use_selected_vsn = UseSelectedVsn,
active_dir = ActiveDir,
sorted_dirs = Dirs,
- info = undefined},
+ info = undefined,
+ status = AppStatus},
Status) ->
ReadInfo =
fun(Dir, StatusAcc) ->
@@ -2000,7 +2014,8 @@ ensure_app_info(#app{name = Name,
Ebin = filename:join([Dir, "ebin"]),
DefaultVsn = get_vsn_from_dir(Name,Base),
AppFile = filename:join([Ebin, atom_to_list(Name) ++ ".app"]),
- read_app_info(AppFile, AppFile, Name, DefaultVsn, StatusAcc)
+ read_app_info(AppFile, AppFile, Name, ActiveDir,
+ AppStatus, DefaultVsn, StatusAcc)
end,
{AllInfo, Status2} = lists:mapfoldl(ReadInfo, Status, Dirs),
AllVsns = [I#app_info.vsn || I <- AllInfo],
diff --git a/lib/reltool/test/reltool_server_SUITE.erl b/lib/reltool/test/reltool_server_SUITE.erl
index 23338d9ecd..adea716e99 100644
--- a/lib/reltool/test/reltool_server_SUITE.erl
+++ b/lib/reltool/test/reltool_server_SUITE.erl
@@ -80,6 +80,8 @@ all() ->
otp_9229_dupl_mod_exclude_app,
otp_9229_dupl_mod_exclude_mod,
dupl_mod_in_app_file,
+ include_non_existing_app,
+ exclude_non_existing_app,
get_apps,
get_mod,
get_sys,
@@ -1313,7 +1315,6 @@ otp_9229_dupl_mod_exclude_mod(Config) ->
ok.
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Test that if a module is duplicated in a .app file, then a warning
%% is produced, but target can still be created.
@@ -1346,6 +1347,56 @@ dupl_mod_in_app_file(Config) ->
ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Test that a reasonable error message is returned if an application
+%% is missing
+include_non_existing_app(_Config) ->
+ %% Configure the server
+ Sys =
+ {sys,
+ [
+ {incl_cond,exclude},
+ {app,foobar,[{incl_cond,include}]},
+ {app,kernel,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]}
+ ]},
+
+ %% Generate target file
+ TargetDir = filename:join([?WORK_DIR, "target_include_non_existing_app"]),
+ ?m(ok, reltool_utils:recursive_delete(TargetDir)),
+ ?m(ok, file:make_dir(TargetDir)),
+ ?log("SPEC: ~p\n", [reltool:get_target_spec([{config, Sys}])]),
+ ?m({error,"foobar: Missing application directory."},
+ reltool:get_status([{config, Sys}])),
+
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Test that if a missing application is explicitly excluded a warning
+%% should be issued.
+exclude_non_existing_app(_Config) ->
+ %% Configure the server
+ Sys =
+ {sys,
+ [
+ {incl_cond,exclude},
+ {app,foobar,[{incl_cond,exclude}]},
+ {app,kernel,[{incl_cond,include}]},
+ {app,stdlib,[{incl_cond,include}]},
+ {app,sasl,[{incl_cond,include}]}
+ ]},
+
+ %% Generate target file
+ TargetDir = filename:join([?WORK_DIR, "target_exclude_non_existing_app"]),
+ ?m(ok, reltool_utils:recursive_delete(TargetDir)),
+ ?m(ok, file:make_dir(TargetDir)),
+ ?log("SPEC: ~p\n", [reltool:get_target_spec([{config, Sys}])]),
+ ?m({ok,["foobar: Missing application directory."]},
+ reltool:get_status([{config, Sys}])),
+
+ ok.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Test the interface used by the GUI:
%% get_app
%% get_apps
diff --git a/lib/snmp/include/.gitignore b/lib/snmp/include/.gitignore
new file mode 100644
index 0000000000..4db987f64a
--- /dev/null
+++ b/lib/snmp/include/.gitignore
@@ -0,0 +1,4 @@
+*.hrl
+!SNMPv2-TC.hrl
+!snmp_tables.hrl
+!snmp_types.hrl
diff --git a/lib/snmp/priv/mibs/.gitignore b/lib/snmp/priv/mibs/.gitignore
index e69de29bb2..a8a0dcec44 100644
--- a/lib/snmp/priv/mibs/.gitignore
+++ b/lib/snmp/priv/mibs/.gitignore
@@ -0,0 +1 @@
+*.bin
diff --git a/lib/snmp/test/snmp_test_data/.gitignore b/lib/snmp/test/snmp_test_data/.gitignore
new file mode 100644
index 0000000000..c7cffa7f6d
--- /dev/null
+++ b/lib/snmp/test/snmp_test_data/.gitignore
@@ -0,0 +1,2 @@
+*.bin
+*.hrl
diff --git a/lib/stdlib/doc/src/erl_parse.xml b/lib/stdlib/doc/src/erl_parse.xml
index bafc2e0746..56a7131821 100644
--- a/lib/stdlib/doc/src/erl_parse.xml
+++ b/lib/stdlib/doc/src/erl_parse.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2011</year>
+ <year>1996</year><year>2013</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -167,6 +167,23 @@
<p>Converts the Erlang data structure <c><anno>Data</anno></c> into an
abstract form of type <c><anno>AbsTerm</anno></c>.
This is the inverse of <c>normalise/1</c>.</p>
+ <p><c>erl_parse:abstract(T)</c> is equivalent to
+ <c>erl_parse:abstract(T, 0)</c>.</p>
+ </desc>
+ </func>
+ <func>
+ <name name="abstract" arity="2"/>
+ <fsummary>Convert an Erlang term into an abstract form</fsummary>
+ <desc>
+ <p>Converts the Erlang data structure <c><anno>Data</anno></c> into an
+ abstract form of type <c><anno>AbsTerm</anno></c>.</p>
+ <p>The <c><anno>Line</anno></c> option is the line that will
+ be assigned to each node of the abstract form.</p>
+ <p>The <c><anno>Encoding</anno></c> option is used for
+ selecting which integer lists will be considered
+ as strings. The default is to use the encoding returned by
+ <seealso marker="epp#default_encoding/0">
+ <c>epp:default_encoding/0</c></seealso></p>
</desc>
</func>
</funcs>
diff --git a/lib/stdlib/src/erl_parse.yrl b/lib/stdlib/src/erl_parse.yrl
index 9ff25fcbc5..7145b0858f 100644
--- a/lib/stdlib/src/erl_parse.yrl
+++ b/lib/stdlib/src/erl_parse.yrl
@@ -887,6 +887,7 @@ abstract(T, Options) when is_list(Options) ->
abstract(T, Line, Encoding).
-define(UNICODE(C),
+ is_integer(C) andalso
(C >= 0 andalso C < 16#D800 orelse
C > 16#DFFF andalso C < 16#FFFE orelse
C > 16#FFFF andalso C =< 16#10FFFF)).
diff --git a/lib/stdlib/src/erl_scan.erl b/lib/stdlib/src/erl_scan.erl
index 3651f608bc..d988a4d8c7 100644
--- a/lib/stdlib/src/erl_scan.erl
+++ b/lib/stdlib/src/erl_scan.erl
@@ -338,6 +338,7 @@ string_thing(_) -> "string".
-define(DIGIT(C), C >= $0, C =< $9).
-define(CHAR(C), is_integer(C), C >= 0).
-define(UNICODE(C),
+ is_integer(C) andalso
(C >= 0 andalso C < 16#D800 orelse
C > 16#DFFF andalso C < 16#FFFE orelse
C > 16#FFFF andalso C =< 16#10FFFF)).
diff --git a/lib/stdlib/test/erl_scan_SUITE.erl b/lib/stdlib/test/erl_scan_SUITE.erl
index ecd181e87c..361abbb771 100644
--- a/lib/stdlib/test/erl_scan_SUITE.erl
+++ b/lib/stdlib/test/erl_scan_SUITE.erl
@@ -21,7 +21,8 @@
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2]).
--export([ error_1/1, error_2/1, iso88591/1, otp_7810/1, otp_10302/1]).
+-export([ error_1/1, error_2/1, iso88591/1, otp_7810/1, otp_10302/1,
+ otp_10990/1, otp_10992/1]).
-import(lists, [nth/2,flatten/1]).
-import(io_lib, [print/1]).
@@ -60,7 +61,7 @@ end_per_testcase(_Case, Config) ->
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [{group, error}, iso88591, otp_7810, otp_10302].
+ [{group, error}, iso88591, otp_7810, otp_10302, otp_10990, otp_10992].
groups() ->
[{error, [], [error_1, error_2]}].
@@ -1121,6 +1122,29 @@ otp_10302(Config) when is_list(Config) ->
erl_parse:abstract("a"++[1024]++"c", [{encoding,latin1}]),
ok.
+otp_10990(doc) ->
+ "OTP-10990. Floating point number in input string.";
+otp_10990(suite) ->
+ [];
+otp_10990(Config) when is_list(Config) ->
+ {'EXIT',_} = (catch {foo, erl_scan:string([$",42.0,$"],1)}),
+ ok.
+
+otp_10992(doc) ->
+ "OTP-10992. List of floats to abstract format.";
+otp_10992(suite) ->
+ [];
+otp_10992(Config) when is_list(Config) ->
+ {cons,0,{float,0,42.0},{nil,0}} =
+ erl_parse:abstract([42.0], [{encoding,unicode}]),
+ {cons,0,{float,0,42.0},{nil,0}} =
+ erl_parse:abstract([42.0], [{encoding,utf8}]),
+ {cons,0,{integer,0,65},{cons,0,{float,0,42.0},{nil,0}}} =
+ erl_parse:abstract([$A,42.0], [{encoding,unicode}]),
+ {cons,0,{integer,0,65},{cons,0,{float,0,42.0},{nil,0}}} =
+ erl_parse:abstract([$A,42.0], [{encoding,utf8}]),
+ ok.
+
test_string(String, Expected) ->
{ok, Expected, _End} = erl_scan:string(String),
test(String).
diff --git a/lib/tools/emacs/erlang-start.el b/lib/tools/emacs/erlang-start.el
index bbcea3e46a..e1dc86621e 100644
--- a/lib/tools/emacs/erlang-start.el
+++ b/lib/tools/emacs/erlang-start.el
@@ -83,6 +83,7 @@
;; Associate files extensions ".erl" and ".hrl" with Erlang mode.
;;
+;;;###autoload
(let ((a '("\\.erl\\'" . erlang-mode))
(b '("\\.hrl\\'" . erlang-mode)))
(or (assoc (car a) auto-mode-alist)
@@ -94,6 +95,7 @@
;; Associate files using interpreter "escript" with Erlang mode.
;;
+;;;###autoload
(add-to-list 'interpreter-mode-alist (cons "escript" 'erlang-mode))
;;
@@ -101,6 +103,7 @@
;; file completion.
;;
+;;;###autoload
(let ((erl-ext '(".jam" ".vee" ".beam")))
(while erl-ext
(let ((cie completion-ignored-extensions))