aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-04-01 12:07:23 +0200
committerMicael Karlberg <[email protected]>2011-04-01 12:07:23 +0200
commit2b46b0e42fe95d99619ffa343537c8468e27295c (patch)
tree9f01a4f4a6ad597299aa5a74e5e50a58e9d5812b /lib
parent537f010d6fe871d55c3becb02fe6ebb73dc2d55a (diff)
parent49737813349f164b35737eb3cd59491930128f58 (diff)
downloadotp-2b46b0e42fe95d99619ffa343537c8468e27295c.tar.gz
otp-2b46b0e42fe95d99619ffa343537c8468e27295c.tar.bz2
otp-2b46b0e42fe95d99619ffa343537c8468e27295c.zip
Merge branch 'bmk/snmp/manager/deprecate_old_api/OTP-9174' into bmk/snmp/snmp420_integration
Conflicts: lib/snmp/doc/src/notes.xml lib/snmp/src/app/snmp.appup.src
Diffstat (limited to 'lib')
-rw-r--r--lib/asn1/test/Makefile2
-rw-r--r--lib/common_test/test/Makefile2
-rw-r--r--lib/compiler/src/beam_dict.erl13
-rw-r--r--lib/compiler/src/sys_core_fold.erl192
-rw-r--r--lib/compiler/test/Makefile2
-rw-r--r--lib/compiler/test/warnings_SUITE.erl10
-rw-r--r--lib/cosFileTransfer/test/Makefile2
-rw-r--r--lib/crypto/test/Makefile2
-rw-r--r--lib/debugger/test/Makefile2
-rw-r--r--lib/docbuilder/test/Makefile2
-rw-r--r--lib/edoc/src/edoc_wiki.erl2
-rw-r--r--lib/edoc/test/Makefile2
-rw-r--r--lib/erl_interface/test/Makefile2
-rw-r--r--lib/et/test/Makefile2
-rw-r--r--lib/inets/test/Makefile4
-rw-r--r--lib/inviso/test/Makefile2
-rw-r--r--lib/kernel/doc/src/rpc.xml2
-rw-r--r--lib/kernel/test/Makefile2
-rw-r--r--lib/megaco/test/Makefile2
-rw-r--r--lib/mnesia/test/Makefile2
-rw-r--r--lib/orber/test/Makefile2
-rw-r--r--lib/parsetools/test/Makefile2
-rw-r--r--lib/percept/test/Makefile2
-rw-r--r--lib/public_key/test/Makefile2
-rw-r--r--lib/reltool/test/Makefile2
-rw-r--r--lib/runtime_tools/test/Makefile2
-rw-r--r--lib/snmp/doc/src/notes.xml24
-rw-r--r--lib/snmp/src/app/snmp.appup.src40
-rw-r--r--lib/snmp/src/manager/snmpm.erl135
-rw-r--r--lib/snmp/test/Makefile2
-rw-r--r--lib/ssl/examples/certs/Makefile2
-rw-r--r--lib/ssl/examples/src/Makefile2
-rw-r--r--lib/ssl/test/Makefile2
-rw-r--r--lib/stdlib/src/log_mf_h.erl14
-rw-r--r--lib/stdlib/src/otp_internal.erl96
-rw-r--r--lib/stdlib/test/Makefile2
-rw-r--r--lib/syntax_tools/test/Makefile2
-rw-r--r--lib/test_server/test/Makefile2
-rw-r--r--lib/tools/test/Makefile2
-rw-r--r--lib/typer/src/typer.erl17
40 files changed, 350 insertions, 255 deletions
diff --git a/lib/asn1/test/Makefile b/lib/asn1/test/Makefile
index 4f3776e478..7ecd544d4b 100644
--- a/lib/asn1/test/Makefile
+++ b/lib/asn1/test/Makefile
@@ -194,7 +194,7 @@ release_tests_spec: opt
$(INSTALL_DIR) $(RELSYSDIR)/asn1_bin_v2_SUITE_data
$(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(RELSYSDIR)
$(INSTALL_DATA) asn1.spec asn1.cover $(INSTALL_PROGS) $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
cd asn1_SUITE_data; tar cfh $(RELSYSDIR)/asn1_SUITE_data.tar *
cd $(RELSYSDIR)/asn1_SUITE_data; tar xf $(RELSYSDIR)/asn1_SUITE_data.tar
cd $(RELSYSDIR)/asn1_bin_SUITE_data; tar xf $(RELSYSDIR)/asn1_SUITE_data.tar
diff --git a/lib/common_test/test/Makefile b/lib/common_test/test/Makefile
index 115565aaa0..b7b099069c 100644
--- a/lib/common_test/test/Makefile
+++ b/lib/common_test/test/Makefile
@@ -96,7 +96,7 @@ release_tests_spec:
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) $(ERL_FILES) $(COVERFILE) $(RELSYSDIR)
$(INSTALL_DATA) common_test.spec $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
@tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/lib/compiler/src/beam_dict.erl b/lib/compiler/src/beam_dict.erl
index a503fcab38..c50ed28aa9 100644
--- a/lib/compiler/src/beam_dict.erl
+++ b/lib/compiler/src/beam_dict.erl
@@ -36,7 +36,6 @@
strings = <<>> :: binary(), %String pool
lambdas = [], %[{...}]
literals = dict:new() :: dict(), %Format: {Literal,Number}
- next_atom = 1 :: pos_integer(),
next_import = 0 :: non_neg_integer(),
string_offset = 0 :: non_neg_integer(),
next_literal = 0 :: non_neg_integer(),
@@ -66,13 +65,14 @@ highest_opcode(#asm{highest_opcode=Op}) -> Op.
%% atom(Atom, Dict) -> {Index,Dict'}
-spec atom(atom(), bdict()) -> {pos_integer(), bdict()}.
-atom(Atom, #asm{atoms=Atoms0,next_atom=NextIndex}=Dict) when is_atom(Atom) ->
+atom(Atom, #asm{atoms=Atoms0}=Dict) when is_atom(Atom) ->
case gb_trees:lookup(Atom, Atoms0) of
{value,Index} ->
{Index,Dict};
none ->
+ NextIndex = gb_trees:size(Atoms0) + 1,
Atoms = gb_trees:insert(Atom, NextIndex, Atoms0),
- {NextIndex,Dict#asm{atoms=Atoms,next_atom=NextIndex+1}}
+ {NextIndex,Dict#asm{atoms=Atoms}}
end.
%% Remembers an exported function.
@@ -139,7 +139,7 @@ lambda(Lbl, Index, OldUniq, NumFree, #asm{lambdas=Lambdas0}=Dict) ->
Lambdas = [{Lbl,{OldIndex,Lbl,Index,NumFree,OldUniq}}|Lambdas0],
{OldIndex,Dict#asm{lambdas=Lambdas}}.
-%% Returns the index for a literal (adding it to the atom table if necessary).
+%% Returns the index for a literal (adding it to the literal table if necessary).
%% literal(Literal, Dict) -> {Index,Dict'}
-spec literal(term(), bdict()) -> {non_neg_integer(), bdict()}.
@@ -156,14 +156,15 @@ literal(Lit, #asm{literals=Tab0,next_literal=NextIndex}=Dict) ->
%% atom_table(Dict) -> {LastIndex,[Length,AtomString...]}
-spec atom_table(bdict()) -> {non_neg_integer(), [[non_neg_integer(),...]]}.
-atom_table(#asm{atoms=Atoms,next_atom=NumAtoms}) ->
+atom_table(#asm{atoms=Atoms}) ->
+ NumAtoms = gb_trees:size(Atoms),
Sorted = lists:keysort(2, gb_trees:to_list(Atoms)),
Fun = fun({A,_}) ->
L = atom_to_list(A),
[length(L)|L]
end,
AtomTab = lists:map(Fun, Sorted),
- {NumAtoms-1,AtomTab}.
+ {NumAtoms,AtomTab}.
%% Returns the table of local functions.
%% local_table(Dict) -> {NumLocals, [{Function, Arity, Label}...]}
diff --git a/lib/compiler/src/sys_core_fold.erl b/lib/compiler/src/sys_core_fold.erl
index 96015fbe58..9360556e00 100644
--- a/lib/compiler/src/sys_core_fold.erl
+++ b/lib/compiler/src/sys_core_fold.erl
@@ -460,7 +460,8 @@ eval_binary(#c_binary{anno=Anno,segments=Ss}=Bin) ->
Bin;
throw:{badarg,Warning} ->
add_warning(Bin, Warning),
- #c_call{module=#c_literal{val=erlang},
+ #c_call{anno=Anno,
+ module=#c_literal{val=erlang},
name=#c_literal{val=error},
args=[#c_literal{val=badarg}]}
end.
@@ -658,36 +659,34 @@ call_0(Call, M, N, As0, Sub) ->
%% We inline some very common higher order list operations.
%% We use the same evaluation order as the library function.
-call_1(_Call, lists, all, [Arg1,Arg2], Sub) ->
+call_1(#c_call{anno=Anno}, lists, all, [Arg1,Arg2], Sub) ->
Loop = #c_var{name={'lists^all',1}},
F = #c_var{name='F'},
Xs = #c_var{name='Xs'},
X = #c_var{name='X'},
Err1 = #c_tuple{es=[#c_literal{val='case_clause'}, X]},
CC1 = #c_clause{pats=[#c_literal{val=true}], guard=#c_literal{val=true},
- body=#c_apply{op=Loop, args=[Xs]}},
+ body=#c_apply{anno=Anno, op=Loop, args=[Xs]}},
CC2 = #c_clause{pats=[#c_literal{val=false}], guard=#c_literal{val=true},
body=#c_literal{val=false}},
CC3 = #c_clause{pats=[X], guard=#c_literal{val=true},
- body=#c_primop{name=#c_literal{val='match_fail'},
- args=[Err1]}},
+ body=match_fail(Anno, Err1)},
C1 = #c_clause{pats=[#c_cons{hd=X, tl=Xs}], guard=#c_literal{val=true},
- body=#c_case{arg=#c_apply{op=F, args=[X]},
+ body=#c_case{arg=#c_apply{anno=Anno, op=F, args=[X]},
clauses = [CC1, CC2, CC3]}},
C2 = #c_clause{pats=[#c_literal{val=[]}], guard=#c_literal{val=true},
body=#c_literal{val=true}},
Err2 = #c_tuple{es=[#c_literal{val='function_clause'}, Xs]},
C3 = #c_clause{pats=[Xs], guard=#c_literal{val=true},
- body=#c_primop{name=#c_literal{val='match_fail'},
- args=[Err2]}},
+ body=match_fail(Anno, Err2)},
Fun = #c_fun{vars=[Xs],
body=#c_case{arg=Xs, clauses=[C1, C2, C3]}},
L = #c_var{name='L'},
expr(#c_let{vars=[F, L], arg=#c_values{es=[Arg1, Arg2]},
body=#c_letrec{defs=[{Loop,Fun}],
- body=#c_apply{op=Loop, args=[L]}}},
+ body=#c_apply{anno=Anno, op=Loop, args=[L]}}},
Sub);
-call_1(_Call, lists, any, [Arg1,Arg2], Sub) ->
+call_1(#c_call{anno=Anno}, lists, any, [Arg1,Arg2], Sub) ->
Loop = #c_var{name={'lists^any',1}},
F = #c_var{name='F'},
Xs = #c_var{name='Xs'},
@@ -696,72 +695,71 @@ call_1(_Call, lists, any, [Arg1,Arg2], Sub) ->
CC1 = #c_clause{pats=[#c_literal{val=true}], guard=#c_literal{val=true},
body=#c_literal{val=true}},
CC2 = #c_clause{pats=[#c_literal{val=false}], guard=#c_literal{val=true},
- body=#c_apply{op=Loop, args=[Xs]}},
+ body=#c_apply{anno=Anno, op=Loop, args=[Xs]}},
CC3 = #c_clause{pats=[X], guard=#c_literal{val=true},
- body=#c_primop{name=#c_literal{val='match_fail'},
- args=[Err1]}},
+ body=match_fail(Anno, Err1)},
C1 = #c_clause{pats=[#c_cons{hd=X, tl=Xs}], guard=#c_literal{val=true},
- body=#c_case{arg=#c_apply{op=F, args=[X]},
+ body=#c_case{arg=#c_apply{anno=Anno, op=F, args=[X]},
clauses = [CC1, CC2, CC3]}},
C2 = #c_clause{pats=[#c_literal{val=[]}], guard=#c_literal{val=true},
body=#c_literal{val=false}},
Err2 = #c_tuple{es=[#c_literal{val='function_clause'}, Xs]},
C3 = #c_clause{pats=[Xs], guard=#c_literal{val=true},
- body=#c_primop{name=#c_literal{val='match_fail'},
- args=[Err2]}},
+ body=match_fail(Anno, Err2)},
Fun = #c_fun{vars=[Xs],
body=#c_case{arg=Xs, clauses=[C1, C2, C3]}},
L = #c_var{name='L'},
expr(#c_let{vars=[F, L], arg=#c_values{es=[Arg1, Arg2]},
body=#c_letrec{defs=[{Loop,Fun}],
- body=#c_apply{op=Loop, args=[L]}}},
+ body=#c_apply{anno=Anno, op=Loop, args=[L]}}},
Sub);
-call_1(_Call, lists, foreach, [Arg1,Arg2], Sub) ->
+call_1(#c_call{anno=Anno}, lists, foreach, [Arg1,Arg2], Sub) ->
Loop = #c_var{name={'lists^foreach',1}},
F = #c_var{name='F'},
Xs = #c_var{name='Xs'},
X = #c_var{name='X'},
C1 = #c_clause{pats=[#c_cons{hd=X, tl=Xs}], guard=#c_literal{val=true},
- body=#c_seq{arg=#c_apply{op=F, args=[X]},
- body=#c_apply{op=Loop, args=[Xs]}}},
+ body=#c_seq{arg=#c_apply{anno=Anno, op=F, args=[X]},
+ body=#c_apply{anno=Anno, op=Loop, args=[Xs]}}},
C2 = #c_clause{pats=[#c_literal{val=[]}], guard=#c_literal{val=true},
body=#c_literal{val=ok}},
Err = #c_tuple{es=[#c_literal{val='function_clause'}, Xs]},
C3 = #c_clause{pats=[Xs], guard=#c_literal{val=true},
- body=#c_primop{name=#c_literal{val='match_fail'},
- args=[Err]}},
+ body=match_fail(Anno, Err)},
Fun = #c_fun{vars=[Xs],
body=#c_case{arg=Xs, clauses=[C1, C2, C3]}},
L = #c_var{name='L'},
expr(#c_let{vars=[F, L], arg=#c_values{es=[Arg1, Arg2]},
body=#c_letrec{defs=[{Loop,Fun}],
- body=#c_apply{op=Loop, args=[L]}}},
+ body=#c_apply{anno=Anno, op=Loop, args=[L]}}},
Sub);
-call_1(_Call, lists, map, [Arg1,Arg2], Sub) ->
+call_1(#c_call{anno=Anno}, lists, map, [Arg1,Arg2], Sub) ->
Loop = #c_var{name={'lists^map',1}},
F = #c_var{name='F'},
Xs = #c_var{name='Xs'},
X = #c_var{name='X'},
H = #c_var{name='H'},
C1 = #c_clause{pats=[#c_cons{hd=X, tl=Xs}], guard=#c_literal{val=true},
- body=#c_let{vars=[H], arg=#c_apply{op=F, args=[X]},
+ body=#c_let{vars=[H], arg=#c_apply{anno=Anno,
+ op=F,
+ args=[X]},
body=#c_cons{hd=H,
- tl=#c_apply{op=Loop,
+ tl=#c_apply{anno=Anno,
+ op=Loop,
args=[Xs]}}}},
C2 = #c_clause{pats=[#c_literal{val=[]}], guard=#c_literal{val=true},
body=#c_literal{val=[]}},
Err = #c_tuple{es=[#c_literal{val='function_clause'}, Xs]},
C3 = #c_clause{pats=[Xs], guard=#c_literal{val=true},
- body=#c_primop{name=#c_literal{val='match_fail'},
- args=[Err]}},
+ body=match_fail(Anno, Err)},
Fun = #c_fun{vars=[Xs],
body=#c_case{arg=Xs, clauses=[C1, C2, C3]}},
L = #c_var{name='L'},
expr(#c_let{vars=[F, L], arg=#c_values{es=[Arg1, Arg2]},
body=#c_letrec{defs=[{Loop,Fun}],
- body=#c_apply{op=Loop, args=[L]}}},
+ body=#c_apply{anno=Anno, op=Loop, args=[L]}}},
Sub);
-call_1(_Call, lists, flatmap, [Arg1,Arg2], Sub) ->
+call_1(#c_call{anno=Anno}, lists, flatmap, [Arg1,Arg2], Sub) ->
Loop = #c_var{name={'lists^flatmap',1}},
F = #c_var{name='F'},
Xs = #c_var{name='Xs'},
@@ -769,26 +767,27 @@ call_1(_Call, lists, flatmap, [Arg1,Arg2], Sub) ->
H = #c_var{name='H'},
C1 = #c_clause{pats=[#c_cons{hd=X, tl=Xs}], guard=#c_literal{val=true},
body=#c_let{vars=[H],
- arg=#c_apply{op=F, args=[X]},
- body=#c_call{module=#c_literal{val=erlang},
+ arg=#c_apply{anno=Anno, op=F, args=[X]},
+ body=#c_call{anno=Anno,
+ module=#c_literal{val=erlang},
name=#c_literal{val='++'},
args=[H,
- #c_apply{op=Loop,
+ #c_apply{anno=Anno,
+ op=Loop,
args=[Xs]}]}}},
C2 = #c_clause{pats=[#c_literal{val=[]}], guard=#c_literal{val=true},
body=#c_literal{val=[]}},
Err = #c_tuple{es=[#c_literal{val='function_clause'}, Xs]},
C3 = #c_clause{pats=[Xs], guard=#c_literal{val=true},
- body=#c_primop{name=#c_literal{val='match_fail'},
- args=[Err]}},
+ body=match_fail(Anno, Err)},
Fun = #c_fun{vars=[Xs],
body=#c_case{arg=Xs, clauses=[C1, C2, C3]}},
L = #c_var{name='L'},
expr(#c_let{vars=[F, L], arg=#c_values{es=[Arg1, Arg2]},
body=#c_letrec{defs=[{Loop,Fun}],
- body=#c_apply{op=Loop, args=[L]}}},
+ body=#c_apply{anno=Anno, op=Loop, args=[L]}}},
Sub);
-call_1(_Call, lists, filter, [Arg1,Arg2], Sub) ->
+call_1(#c_call{anno=Anno}, lists, filter, [Arg1,Arg2], Sub) ->
Loop = #c_var{name={'lists^filter',1}},
F = #c_var{name='F'},
Xs = #c_var{name='Xs'},
@@ -800,72 +799,75 @@ call_1(_Call, lists, filter, [Arg1,Arg2], Sub) ->
CC2 = #c_clause{pats=[#c_literal{val=false}], guard=#c_literal{val=true},
body=Xs},
CC3 = #c_clause{pats=[X], guard=#c_literal{val=true},
- body=#c_primop{name=#c_literal{val='match_fail'},
- args=[Err1]}},
+ body=match_fail(Anno, Err1)},
Case = #c_case{arg=B, clauses = [CC1, CC2, CC3]},
C1 = #c_clause{pats=[#c_cons{hd=X, tl=Xs}], guard=#c_literal{val=true},
body=#c_let{vars=[B],
- arg=#c_apply{op=F, args=[X]},
+ arg=#c_apply{anno=Anno, op=F, args=[X]},
body=#c_let{vars=[Xs],
- arg=#c_apply{op=Loop,
+ arg=#c_apply{anno=Anno,
+ op=Loop,
args=[Xs]},
body=Case}}},
C2 = #c_clause{pats=[#c_literal{val=[]}], guard=#c_literal{val=true},
body=#c_literal{val=[]}},
Err2 = #c_tuple{es=[#c_literal{val='function_clause'}, Xs]},
C3 = #c_clause{pats=[Xs], guard=#c_literal{val=true},
- body=#c_primop{name=#c_literal{val='match_fail'},
- args=[Err2]}},
+ body=match_fail(Anno, Err2)},
Fun = #c_fun{vars=[Xs],
body=#c_case{arg=Xs, clauses=[C1, C2, C3]}},
L = #c_var{name='L'},
expr(#c_let{vars=[F, L], arg=#c_values{es=[Arg1, Arg2]},
body=#c_letrec{defs=[{Loop,Fun}],
- body=#c_apply{op=Loop, args=[L]}}},
+ body=#c_apply{anno=Anno, op=Loop, args=[L]}}},
Sub);
-call_1(_Call, lists, foldl, [Arg1,Arg2,Arg3], Sub) ->
+call_1(#c_call{anno=Anno}, lists, foldl, [Arg1,Arg2,Arg3], Sub) ->
Loop = #c_var{name={'lists^foldl',2}},
F = #c_var{name='F'},
Xs = #c_var{name='Xs'},
X = #c_var{name='X'},
A = #c_var{name='A'},
C1 = #c_clause{pats=[#c_cons{hd=X, tl=Xs}], guard=#c_literal{val=true},
- body=#c_apply{op=Loop,
- args=[Xs, #c_apply{op=F, args=[X, A]}]}},
+ body=#c_apply{anno=Anno,
+ op=Loop,
+ args=[Xs, #c_apply{anno=Anno,
+ op=F,
+ args=[X, A]}]}},
C2 = #c_clause{pats=[#c_literal{val=[]}], guard=#c_literal{val=true}, body=A},
Err = #c_tuple{es=[#c_literal{val='function_clause'}, Xs]},
C3 = #c_clause{pats=[Xs], guard=#c_literal{val=true},
- body=#c_primop{name=#c_literal{val='match_fail'},
- args=[Err]}},
+ body=match_fail(Anno, Err)},
Fun = #c_fun{vars=[Xs, A],
body=#c_case{arg=Xs, clauses=[C1, C2, C3]}},
L = #c_var{name='L'},
expr(#c_let{vars=[F, A, L], arg=#c_values{es=[Arg1, Arg2, Arg3]},
body=#c_letrec{defs=[{Loop,Fun}],
- body=#c_apply{op=Loop, args=[L, A]}}},
+ body=#c_apply{anno=Anno, op=Loop, args=[L, A]}}},
Sub);
-call_1(_Call, lists, foldr, [Arg1,Arg2,Arg3], Sub) ->
+call_1(#c_call{anno=Anno}, lists, foldr, [Arg1,Arg2,Arg3], Sub) ->
Loop = #c_var{name={'lists^foldr',2}},
F = #c_var{name='F'},
Xs = #c_var{name='Xs'},
X = #c_var{name='X'},
A = #c_var{name='A'},
C1 = #c_clause{pats=[#c_cons{hd=X, tl=Xs}], guard=#c_literal{val=true},
- body=#c_apply{op=F, args=[X, #c_apply{op=Loop,
- args=[Xs, A]}]}},
+ body=#c_apply{anno=Anno,
+ op=F,
+ args=[X, #c_apply{anno=Anno,
+ op=Loop,
+ args=[Xs, A]}]}},
C2 = #c_clause{pats=[#c_literal{val=[]}], guard=#c_literal{val=true}, body=A},
Err = #c_tuple{es=[#c_literal{val='function_clause'}, Xs]},
C3 = #c_clause{pats=[Xs], guard=#c_literal{val=true},
- body=#c_primop{name=#c_literal{val='match_fail'},
- args=[Err]}},
+ body=match_fail(Anno, Err)},
Fun = #c_fun{vars=[Xs, A],
body=#c_case{arg=Xs, clauses=[C1, C2, C3]}},
L = #c_var{name='L'},
expr(#c_let{vars=[F, A, L], arg=#c_values{es=[Arg1, Arg2, Arg3]},
body=#c_letrec{defs=[{Loop,Fun}],
- body=#c_apply{op=Loop, args=[L, A]}}},
+ body=#c_apply{anno=Anno, op=Loop, args=[L, A]}}},
Sub);
-call_1(_Call, lists, mapfoldl, [Arg1,Arg2,Arg3], Sub) ->
+call_1(#c_call{anno=Anno}, lists, mapfoldl, [Arg1,Arg2,Arg3], Sub) ->
Loop = #c_var{name={'lists^mapfoldl',2}},
F = #c_var{name='F'},
Xs = #c_var{name='Xs'},
@@ -876,15 +878,16 @@ call_1(_Call, lists, mapfoldl, [Arg1,Arg2,Arg3], Sub) ->
C1 = #c_clause{pats=[P], guard=#c_literal{val=true}, body=E},
Err = #c_tuple{es=[#c_literal{val='badmatch'}, X]},
C2 = #c_clause{pats=[X], guard=#c_literal{val=true},
- body=#c_primop{name=#c_literal{val='match_fail'},
- args=[Err]}},
+ body=match_fail(Anno, Err)},
#c_case{arg=A, clauses=[C1, C2]}
end,
C1 = #c_clause{pats=[#c_cons{hd=X, tl=Xs}], guard=#c_literal{val=true},
- body=Match(#c_apply{op=F, args=[X, Avar]},
+ body=Match(#c_apply{anno=Anno, op=F, args=[X, Avar]},
#c_tuple{es=[X, Avar]},
%%% Tuple passing version
- Match(#c_apply{op=Loop, args=[Xs, Avar]},
+ Match(#c_apply{anno=Anno,
+ op=Loop,
+ args=[Xs, Avar]},
#c_tuple{es=[Xs, Avar]},
#c_tuple{es=[#c_cons{hd=X, tl=Xs}, Avar]})
%%% Multiple-value version
@@ -902,22 +905,23 @@ call_1(_Call, lists, mapfoldl, [Arg1,Arg2,Arg3], Sub) ->
%%% body=#c_values{es=[#c_literal{val=[]}, A]}},
Err = #c_tuple{es=[#c_literal{val='function_clause'}, Xs]},
C3 = #c_clause{pats=[Xs], guard=#c_literal{val=true},
- body=#c_primop{name=#c_literal{val='match_fail'},
- args=[Err]}},
+ body=match_fail(Anno, Err)},
Fun = #c_fun{vars=[Xs, Avar],
body=#c_case{arg=Xs, clauses=[C1, C2, C3]}},
L = #c_var{name='L'},
expr(#c_let{vars=[F, Avar, L], arg=#c_values{es=[Arg1, Arg2, Arg3]},
body=#c_letrec{defs=[{Loop,Fun}],
%%% Tuple passing version
- body=#c_apply{op=Loop, args=[L, Avar]}}},
+ body=#c_apply{anno=Anno,
+ op=Loop,
+ args=[L, Avar]}}},
%%% Multiple-value version
%%% body=#c_let{vars=[Xs, A],
%%% arg=#c_apply{op=Loop,
%%% args=[L, A]},
%%% body=#c_tuple{es=[Xs, A]}}}},
Sub);
-call_1(_Call, lists, mapfoldr, [Arg1,Arg2,Arg3], Sub) ->
+call_1(#c_call{anno=Anno}, lists, mapfoldr, [Arg1,Arg2,Arg3], Sub) ->
Loop = #c_var{name={'lists^mapfoldr',2}},
F = #c_var{name='F'},
Xs = #c_var{name='Xs'},
@@ -928,15 +932,16 @@ call_1(_Call, lists, mapfoldr, [Arg1,Arg2,Arg3], Sub) ->
C1 = #c_clause{pats=[P], guard=#c_literal{val=true}, body=E},
Err = #c_tuple{es=[#c_literal{val='badmatch'}, X]},
C2 = #c_clause{pats=[X], guard=#c_literal{val=true},
- body=#c_primop{name=#c_literal{val='match_fail'},
- args=[Err]}},
+ body=match_fail(Anno, Err)},
#c_case{arg=A, clauses=[C1, C2]}
end,
C1 = #c_clause{pats=[#c_cons{hd=X, tl=Xs}], guard=#c_literal{val=true},
%%% Tuple passing version
- body=Match(#c_apply{op=Loop, args=[Xs, Avar]},
+ body=Match(#c_apply{anno=Anno,
+ op=Loop,
+ args=[Xs, Avar]},
#c_tuple{es=[Xs, Avar]},
- Match(#c_apply{op=F, args=[X, Avar]},
+ Match(#c_apply{anno=Anno, op=F, args=[X, Avar]},
#c_tuple{es=[X, Avar]},
#c_tuple{es=[#c_cons{hd=X, tl=Xs}, Avar]}))
%%% Multiple-value version
@@ -955,15 +960,16 @@ call_1(_Call, lists, mapfoldr, [Arg1,Arg2,Arg3], Sub) ->
%%% body=#c_values{es=[#c_literal{val=[]}, A]}},
Err = #c_tuple{es=[#c_literal{val='function_clause'}, Xs]},
C3 = #c_clause{pats=[Xs], guard=#c_literal{val=true},
- body=#c_primop{name=#c_literal{val='match_fail'},
- args=[Err]}},
+ body=match_fail(Anno, Err)},
Fun = #c_fun{vars=[Xs, Avar],
body=#c_case{arg=Xs, clauses=[C1, C2, C3]}},
L = #c_var{name='L'},
expr(#c_let{vars=[F, Avar, L], arg=#c_values{es=[Arg1, Arg2, Arg3]},
body=#c_letrec{defs=[{Loop,Fun}],
%%% Tuple passing version
- body=#c_apply{op=Loop, args=[L, Avar]}}},
+ body=#c_apply{anno=Anno,
+ op=Loop,
+ args=[L, Avar]}}},
%%% Multiple-value version
%%% body=#c_let{vars=[Xs, A],
%%% arg=#c_apply{op=Loop,
@@ -973,6 +979,11 @@ call_1(_Call, lists, mapfoldr, [Arg1,Arg2,Arg3], Sub) ->
call_1(#c_call{module=M, name=N}=Call, _, _, As, Sub) ->
call_0(Call, M, N, As, Sub).
+match_fail(Anno, Arg) ->
+ #c_primop{anno=Anno,
+ name=#c_literal{val='match_fail'},
+ args=[Arg]}.
+
%% fold_call(Call, Mod, Name, Args, Sub) -> Expr.
%% Try to safely evaluate the call. Just try to evaluate arguments,
%% do the call and convert return values to literals. If this
@@ -1280,9 +1291,9 @@ eval_setelement_2(Pos, [H|T], NewVal) when Pos > 1 ->
%%
eval_failure(Call, Reason) ->
add_warning(Call, {eval_failure,Reason}),
- #c_call{module=#c_literal{val=erlang},
- name=#c_literal{val=error},
- args=[#c_literal{val=Reason}]}.
+ Call#c_call{module=#c_literal{val=erlang},
+ name=#c_literal{val=error},
+ args=[#c_literal{val=Reason}]}.
%% simplify_apply(Call0, Mod, Func, Args) -> Call
%% Simplify an apply/3 to a call if the number of arguments
@@ -1742,23 +1753,24 @@ opt_bool_clauses([_|_], _, _) ->
opt_bool_not(#c_case{arg=Arg,clauses=Cs0}=Case0) ->
case Arg of
- #c_call{module=#c_literal{val=erlang},
+ #c_call{anno=Anno,module=#c_literal{val=erlang},
name=#c_literal{val='not'},
args=[Expr]} ->
- Cs = opt_bool_not(Expr, Cs0),
+ Cs = opt_bool_not(Anno, Expr, Cs0),
Case = Case0#c_case{arg=Expr,clauses=Cs},
opt_bool_not(Case);
_ ->
opt_bool_case_redundant(Case0)
end.
-opt_bool_not(Expr, Cs) ->
+opt_bool_not(Anno, Expr, Cs) ->
Tail = case is_bool_expr(Expr) of
false ->
[#c_clause{anno=[compiler_generated],
pats=[#c_var{name=cor_variable}],
guard=#c_literal{val=true},
- body=#c_call{module=#c_literal{val=erlang},
+ body=#c_call{anno=Anno,
+ module=#c_literal{val=erlang},
name=#c_literal{val=error},
args=[#c_literal{val=badarg}]}}];
true -> []
@@ -1957,13 +1969,25 @@ case_tuple_pat([#c_tuple{es=Ps}], Arity) when length(Ps) =:= Arity ->
case_tuple_pat([#c_literal{val=T}], Arity) when tuple_size(T) =:= Arity ->
Ps = [#c_literal{val=E} || E <- tuple_to_list(T)],
{ok,Ps,[]};
-case_tuple_pat([#c_var{anno=A}=V], Arity) ->
- Vars = make_vars(A, 1, Arity),
- {ok,Vars,[{V,#c_tuple{es=Vars}}]};
+case_tuple_pat([#c_var{anno=Anno0}=V], Arity) ->
+ Vars = make_vars(Anno0, 1, Arity),
+
+ %% If the entire case statement is evaluated in an effect
+ %% context (e.g. "case {A,B} of ... end, ok"), there will
+ %% be a warning that a term is constructed but never used.
+ %% To avoid that warning, we must annotate the tuple as
+ %% compiler generated.
+
+ Anno = [compiler_generated|Anno0],
+ {ok,Vars,[{V,#c_tuple{anno=Anno,es=Vars}}]};
case_tuple_pat([#c_alias{var=V,pat=P}], Arity) ->
case case_tuple_pat([P], Arity) of
- {ok,Ps,Avs} -> {ok,Ps,[{V,#c_tuple{es=unalias_pat_list(Ps)}}|Avs]};
- error -> error
+ {ok,Ps,Avs} ->
+ Anno0 = core_lib:get_anno(P),
+ Anno = [compiler_generated|Anno0],
+ {ok,Ps,[{V,#c_tuple{anno=Anno,es=unalias_pat_list(Ps)}}|Avs]};
+ error ->
+ error
end;
case_tuple_pat(_, _) -> error.
diff --git a/lib/compiler/test/Makefile b/lib/compiler/test/Makefile
index 934bf39393..fe713fd019 100644
--- a/lib/compiler/test/Makefile
+++ b/lib/compiler/test/Makefile
@@ -157,7 +157,7 @@ release_tests_spec: make_emakefile
$(EMAKEFILE) $(ERL_FILES) $(CORE_FILES) $(RELSYSDIR)
$(INSTALL_DATA) $(NO_OPT_ERL_FILES) $(POST_OPT_ERL_FILES) \
$(INLINE_ERL_FILES) $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
@tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/lib/compiler/test/warnings_SUITE.erl b/lib/compiler/test/warnings_SUITE.erl
index 8cc3ca4199..dd18a6e1a3 100644
--- a/lib/compiler/test/warnings_SUITE.erl
+++ b/lib/compiler/test/warnings_SUITE.erl
@@ -453,6 +453,16 @@ effect(Config) when is_list(Config) ->
true -> ok
end,
ok.
+
+ m8(A, B) ->
+ case {A,B} of
+ V -> V
+ end,
+ ok.
+
+ m9(Bs) ->
+ [{B,ok} = {B,foo:bar(B)} || B <- Bs],
+ ok.
">>,
[],
{warnings,[{5,sys_core_fold,{no_effect,{erlang,is_integer,1}}},
diff --git a/lib/cosFileTransfer/test/Makefile b/lib/cosFileTransfer/test/Makefile
index ec7ebcafca..b46fb35356 100644
--- a/lib/cosFileTransfer/test/Makefile
+++ b/lib/cosFileTransfer/test/Makefile
@@ -130,4 +130,4 @@ release_tests_spec: tests
$(INSTALL_DATA) $(IDL_FILES) $(TEST_SPEC_FILE) \
$(COVER_FILE) $(ERL_FILES) $(RELSYSDIR)
$(INSTALL_DATA) $(SUITE_TARGET_FILES) $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
diff --git a/lib/crypto/test/Makefile b/lib/crypto/test/Makefile
index f4689a23df..3150bd472d 100644
--- a/lib/crypto/test/Makefile
+++ b/lib/crypto/test/Makefile
@@ -77,7 +77,7 @@ release_spec:
release_tests_spec: $(TEST_TARGET)
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) crypto.spec crypto.cover $(RELTEST_FILES) $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
release_docs_spec:
diff --git a/lib/debugger/test/Makefile b/lib/debugger/test/Makefile
index 4409cd2b38..2296bd0ae6 100644
--- a/lib/debugger/test/Makefile
+++ b/lib/debugger/test/Makefile
@@ -100,7 +100,7 @@ release_tests_spec: make_emakefile
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) $(EMAKEFILE) $(ERL_FILES) $(RELSYSDIR)
$(INSTALL_DATA) debugger.spec debugger.cover $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
@tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/lib/docbuilder/test/Makefile b/lib/docbuilder/test/Makefile
index 96b940033e..53dff193dc 100644
--- a/lib/docbuilder/test/Makefile
+++ b/lib/docbuilder/test/Makefile
@@ -72,7 +72,7 @@ release_spec: opt
release_tests_spec: make_emakefile
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) $(SPEC_FILES) docb.cover $(EMAKEFILE) $(ERL_FILES) $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
@tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/lib/edoc/src/edoc_wiki.erl b/lib/edoc/src/edoc_wiki.erl
index b36aaae6ce..9a31bc9a82 100644
--- a/lib/edoc/src/edoc_wiki.erl
+++ b/lib/edoc/src/edoc_wiki.erl
@@ -296,6 +296,8 @@ push_uri(Us, Ss, As) ->
strip_empty_lines(Cs) ->
strip_empty_lines(Cs, 0).
+strip_empty_lines([], N) ->
+ {[], N}; % reached the end of input
strip_empty_lines(Cs, N) ->
{Cs1, Cs2} = edoc_lib:split_at(Cs, $\n),
case edoc_lib:is_space(Cs1) of
diff --git a/lib/edoc/test/Makefile b/lib/edoc/test/Makefile
index f77bbaa09b..2dbdb77eff 100644
--- a/lib/edoc/test/Makefile
+++ b/lib/edoc/test/Makefile
@@ -60,7 +60,7 @@ release_tests_spec: make_emakefile
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) $(EMAKEFILE) $(ERL_FILES) $(RELSYSDIR)
$(INSTALL_DATA) edoc.spec edoc.cover $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
@tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/lib/erl_interface/test/Makefile b/lib/erl_interface/test/Makefile
index 8ed6834443..4faf89c0d6 100644
--- a/lib/erl_interface/test/Makefile
+++ b/lib/erl_interface/test/Makefile
@@ -73,7 +73,7 @@ release_spec:
release_tests_spec: opt
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) $(SPEC_FILES) $(COVER_FILE) $(ERL_FILES) $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
@tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/lib/et/test/Makefile b/lib/et/test/Makefile
index 9a24e3281b..e10a2a1587 100644
--- a/lib/et/test/Makefile
+++ b/lib/et/test/Makefile
@@ -74,7 +74,7 @@ release_tests_spec: opt
$(INSTALL_DATA) et.spec et.cover $(ERL_FILES) $(HRL_FILES) $(RELSYSDIR)
$(INSTALL_SCRIPT) ett $(RELSYSDIR)
$(INSTALL_DATA) $(INSTALL_PROGS) $(RELSYSDIR)
-# chmod -f -R u+w $(RELSYSDIR)
+# chmod -R u+w $(RELSYSDIR)
# @tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/lib/inets/test/Makefile b/lib/inets/test/Makefile
index 110ad54c3c..87ca60e4b3 100644
--- a/lib/inets/test/Makefile
+++ b/lib/inets/test/Makefile
@@ -308,11 +308,11 @@ release_spec: opt
release_tests_spec: opt
$(INSTALL_DIR) $(RELTESTSYSDIR)
$(INSTALL_DATA) $(RELTEST_FILES) $(RELTESTSYSDIR)
- chmod -f -R u+w $(RELTESTSYSDIR)
+ chmod -R u+w $(RELTESTSYSDIR)
tar chf - $(DATADIRS) | (cd $(RELTESTSYSDIR); tar xf -)
$(INSTALL_DIR) $(RELTESTSYSALLDATADIR)
$(INSTALL_DIR) $(RELTESTSYSBINDIR)
- chmod -f -R +x $(RELTESTSYSBINDIR)
+ chmod -R +x $(RELTESTSYSBINDIR)
$(INSTALL_DIR) $(RELTESTSYSALLDATADIR)/win32/lib
release_docs_spec:
diff --git a/lib/inviso/test/Makefile b/lib/inviso/test/Makefile
index cd372624b5..c1df29d631 100644
--- a/lib/inviso/test/Makefile
+++ b/lib/inviso/test/Makefile
@@ -53,7 +53,7 @@ release_spec: opt
release_tests_spec: make_emakefile
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) inviso.spec inviso.cover $(ERL_FILES) $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
@tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/lib/kernel/doc/src/rpc.xml b/lib/kernel/doc/src/rpc.xml
index 86c6ea9178..2b81de170d 100644
--- a/lib/kernel/doc/src/rpc.xml
+++ b/lib/kernel/doc/src/rpc.xml
@@ -454,7 +454,7 @@
</desc>
</func>
<func>
- <name>pmap({Module, Function}, ExtraArgs, List2) -> List1</name>
+ <name>pmap({Module, Function}, ExtraArgs, List1) -> List2</name>
<fsummary>Parallell evaluation of mapping a function over a list </fsummary>
<type>
<v>Module = Function = atom()</v>
diff --git a/lib/kernel/test/Makefile b/lib/kernel/test/Makefile
index 5f8f3a6bf6..95517ffd6a 100644
--- a/lib/kernel/test/Makefile
+++ b/lib/kernel/test/Makefile
@@ -144,7 +144,7 @@ release_tests_spec: make_emakefile
$(INSTALL_DATA) $(APP_FILES) $(RELSYSDIR)
$(INSTALL_DATA) kernel.spec $(EMAKEFILE)\
$(COVERFILE) $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
@tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/lib/megaco/test/Makefile b/lib/megaco/test/Makefile
index 682b83d368..88f6f06e73 100644
--- a/lib/megaco/test/Makefile
+++ b/lib/megaco/test/Makefile
@@ -754,5 +754,5 @@ release_tests_spec: tests
# $(HRL_FILES) $(ERL_FILES) \
# $(RELSYSDIR)
#
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
diff --git a/lib/mnesia/test/Makefile b/lib/mnesia/test/Makefile
index 973ac2900a..b165924ef2 100644
--- a/lib/mnesia/test/Makefile
+++ b/lib/mnesia/test/Makefile
@@ -110,7 +110,7 @@ release_tests_spec: opt
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) mnesia.spec mnesia.cover $(ERL_FILES) $(HRL_FILES) $(RELSYSDIR)
$(INSTALL_SCRIPT) mt $(INSTALL_PROGS) $(RELSYSDIR)
-# chmod -f -R u+w $(RELSYSDIR)
+# chmod -R u+w $(RELSYSDIR)
# @tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/lib/orber/test/Makefile b/lib/orber/test/Makefile
index 88aeacbfe8..b682bcf24b 100644
--- a/lib/orber/test/Makefile
+++ b/lib/orber/test/Makefile
@@ -226,7 +226,7 @@ release_tests_spec: tests
$(INSTALL_DATA) $(IDL_FILES) $(TEST_SPEC_FILE) $(COVER_FILE) \
$(ERL_FILES) $(RELSYSDIR)
$(INSTALL_DATA) $(SUITE_TARGET_FILES) $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
$(INSTALL_DIR) $(RELSYSDIR)/$(IDLOUTDIR)
$(INSTALL_DATA) $(GEN_TARGET_FILES) $(GEN_FILES) \
$(RELSYSDIR)/$(IDLOUTDIR)
diff --git a/lib/parsetools/test/Makefile b/lib/parsetools/test/Makefile
index dfb686d7ba..624c4e6975 100644
--- a/lib/parsetools/test/Makefile
+++ b/lib/parsetools/test/Makefile
@@ -72,7 +72,7 @@ release_spec: opt
release_tests_spec: make_emakefile
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) parsetools.spec parsetools.cover $(EMAKEFILE) $(ERL_FILES) $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
# @tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/lib/percept/test/Makefile b/lib/percept/test/Makefile
index 5e8c438c5c..d927386d1c 100644
--- a/lib/percept/test/Makefile
+++ b/lib/percept/test/Makefile
@@ -83,7 +83,7 @@ release_spec: opt
release_tests_spec: make_emakefile
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) percept.spec percept.cover $(EMAKEFILE) $(SOURCE) $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
@tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/lib/public_key/test/Makefile b/lib/public_key/test/Makefile
index e20b903942..6889ae9a8a 100644
--- a/lib/public_key/test/Makefile
+++ b/lib/public_key/test/Makefile
@@ -80,7 +80,7 @@ release_tests_spec: opt
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) $(SPEC_FILES) $(ERL_FILES) $(COVER_FILE) $(HRL_FILES) $(RELSYSDIR)
$(INSTALL_DATA) $(TARGET_FILES) $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
@tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/lib/reltool/test/Makefile b/lib/reltool/test/Makefile
index abd2e81cdf..62fe05238b 100644
--- a/lib/reltool/test/Makefile
+++ b/lib/reltool/test/Makefile
@@ -76,7 +76,7 @@ release_tests_spec: opt
$(INSTALL_DATA) reltool.spec reltool.cover $(ERL_FILES) $(HRL_FILES) $(RELSYSDIR)
$(INSTALL_SCRIPT) rtt $(INSTALL_PROGS) $(RELSYSDIR)
$(INSTALL_DATA) $(INSTALL_PROGS) $(RELSYSDIR)
-# chmod -f -R u+w $(RELSYSDIR)
+# chmod -R u+w $(RELSYSDIR)
# @tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/lib/runtime_tools/test/Makefile b/lib/runtime_tools/test/Makefile
index 7dc7a015e1..cfaf420d65 100644
--- a/lib/runtime_tools/test/Makefile
+++ b/lib/runtime_tools/test/Makefile
@@ -59,7 +59,7 @@ release_tests_spec: make_emakefile
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) runtime_tools.spec runtime_tools.cover $(ERL_FILES) $(RELSYSDIR)
$(INSTALL_DATA) $(EMAKEFILE) runtime_tools.cover $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
@tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml
index 8dd5bcb2c0..f5fa7065fb 100644
--- a/lib/snmp/doc/src/notes.xml
+++ b/lib/snmp/doc/src/notes.xml
@@ -51,6 +51,13 @@
<seealso marker="snmp_target_mib#add_addr">add_addr/11</seealso> for more info. </p>
<p>Own Id: OTP-9088</p>
<p>Aux Id: Seq 11790</p>
+ </item>
+
+ <item>
+ <p>[manager] The old API functions (for get and set
+ requests) are now officially deprecated.
+ They will be removed as of R16B. </p>
+ <p>Own Id: OTP-9174</p>
</item>
</list>
@@ -60,17 +67,13 @@
<title>Fixed Bugs and Malfunctions</title>
<p>-</p>
<!--
+ <list type="bulleted">
<item>
- <p>[agent] When calling
- <seealso marker="snmp_view_based_acm_mib#reconfigure">snmp_view_based_acm_mib:reconfigure/1</seealso>
- on a running node, the table <c>vacmAccessTable</c> was not properly
- cleaned.
- This meant that if some entries in the vacm.conf file was removed
- (compared to the <c>current</c> config),
- while others where modified and/or added, the removed entrie(s)
- would still exist in the <c>vacmAccessTable</c> table. </p>
- <p>Own Id: OTP-8981</p>
- <p>Aux Id: Seq 11750</p>
+ <p>[agent] For the table vacmAccessTable,
+ when performing the is_set_ok and set operation(s),
+ all values of the vacmAccessSecurityModel column was
+ incorrectly translated to <c>any</c>. </p>
+ <p>Own Id: OTP-8980</p>
</item>
</list>
@@ -85,6 +88,7 @@
</section> <!-- 4.20 -->
+
<section>
<title>SNMP Development Toolkit 4.19</title>
<p>Version 4.19 supports code replacement in runtime from/to
diff --git a/lib/snmp/src/app/snmp.appup.src b/lib/snmp/src/app/snmp.appup.src
index db2b3ededb..fd9f40caa0 100644
--- a/lib/snmp/src/app/snmp.appup.src
+++ b/lib/snmp/src/app/snmp.appup.src
@@ -24,14 +24,16 @@
[
{"4.19",
[
+ {load_module, snmpm, soft_purge, soft_purge, []},
{load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmpa_conf, soft_purge, soft_purge, [snmp_conf]},
{load_module, snmp_misc, soft_purge, soft_purge, []},
{load_module, snmp_config, soft_purge, soft_purge, []},
{load_module, snmpa_mpd, soft_purge, soft_purge, [snmp_conf]},
{load_module, snmpa_trap, soft_purge, soft_purge,
[snmpa_mpd, snmp_notification_mib, snmp_target_mib]},
{load_module, snmpa_acm, soft_purge, soft_purge,
- [snmp_conf, snmpa_acm, snmpa_mpd, snmp_target_mib]},
+ [snmp_conf, snmpa_mpd, snmp_target_mib]},
{load_module, snmpa_conf, soft_purge, soft_purge,
[snmp_notification_mib]},
{load_module, snmp_notification_mib, soft_purge, soft_purge,
@@ -46,20 +48,17 @@
},
{"4.18",
[
+ {load_module, snmpm, soft_purge, soft_purge, []},
+ {load_module, snmp_misc, soft_purge, soft_purge, []},
{load_module, snmp_conf, soft_purge, soft_purge, []},
- {load_module, snmp_config, soft_purge, soft_purge, []},
+ {load_module, snmp_config, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmpa_conf, soft_purge, soft_purge, []},
{load_module, snmpa_mpd, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmpa_vacm, soft_purge, soft_purge, []},
{load_module, snmpa_trap, soft_purge, soft_purge,
[snmpa_mpd, snmp_notification_mib, snmp_target_mib]},
{load_module, snmpa_acm, soft_purge, soft_purge,
- [snmp_conf, snmpa_acm, snmpa_mpd, snmp_target_mib]},
- {load_module, snmpa_conf, soft_purge, soft_purge,
- [snmp_notification_mib]},
- {load_module, snmp_notification_mib, soft_purge, soft_purge,
- [snmp_conf, snmp_target_mib]},
-
- {load_module, snmp_misc, soft_purge, soft_purge, []},
- {load_module, snmpa_vacm, soft_purge, soft_purge, []},
+ [snmp_conf, snmpa_mpd, snmp_target_mib]},
{load_module, snmpa, soft_purge, soft_purge,
[snmp_community_mib,
snmp_framework_mib,
@@ -67,6 +66,8 @@
snmp_target_mib,
snmp_user_based_sm_mib,
snmp_view_based_acm_mib]},
+ {load_module, snmp_notification_mib, soft_purge, soft_purge,
+ [snmp_conf, snmp_target_mib, snmpa_mib_lib]},
{load_module, snmp_community_mib, soft_purge, soft_purge,
[snmpa_mib_lib]},
{load_module, snmp_framework_mib, soft_purge, soft_purge,
@@ -94,14 +95,16 @@
[
{"4.19",
[
+ {load_module, snmpm, soft_purge, soft_purge, []},
{load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmpa_conf, soft_purge, soft_purge, [snmp_conf]},
{load_module, snmp_misc, soft_purge, soft_purge, []},
{load_module, snmp_config, soft_purge, soft_purge, []},
{load_module, snmpa_mpd, soft_purge, soft_purge, [snmp_conf]},
{load_module, snmpa_trap, soft_purge, soft_purge,
[snmpa_mpd, snmp_notification_mib, snmp_target_mib]},
{load_module, snmpa_acm, soft_purge, soft_purge,
- [snmp_conf, snmpa_acm, snmpa_mpd, snmp_target_mib]},
+ [snmp_conf, snmpa_mpd, snmp_target_mib]},
{load_module, snmpa_conf, soft_purge, soft_purge,
[snmp_notification_mib]},
{load_module, snmp_notification_mib, soft_purge, soft_purge,
@@ -116,20 +119,17 @@
},
{"4.18",
[
+ {load_module, snmpm, soft_purge, soft_purge, []},
+ {load_module, snmp_misc, soft_purge, soft_purge, []},
{load_module, snmp_conf, soft_purge, soft_purge, []},
+ {load_module, snmpa_conf, soft_purge, soft_purge, [snmp_conf]},
{load_module, snmp_config, soft_purge, soft_purge, []},
{load_module, snmpa_mpd, soft_purge, soft_purge, [snmp_conf]},
+ {load_module, snmpa_vacm, soft_purge, soft_purge, []},
{load_module, snmpa_trap, soft_purge, soft_purge,
[snmpa_mpd, snmp_notification_mib, snmp_target_mib]},
{load_module, snmpa_acm, soft_purge, soft_purge,
- [snmp_conf, snmpa_acm, snmpa_mpd, snmp_target_mib]},
- {load_module, snmpa_conf, soft_purge, soft_purge,
- [snmp_notification_mib]},
- {load_module, snmp_notification_mib, soft_purge, soft_purge,
- [snmp_conf, snmp_target_mib]},
-
- {load_module, snmp_misc, soft_purge, soft_purge, []},
- {load_module, snmpa_vacm, soft_purge, soft_purge, []},
+ [snmp_conf, snmpa_mpd, snmp_target_mib]},
{load_module, snmpa, soft_purge, soft_purge,
[snmp_community_mib,
snmp_framework_mib,
@@ -137,6 +137,8 @@
snmp_target_mib,
snmp_user_based_sm_mib,
snmp_view_based_acm_mib]},
+ {load_module, snmp_notification_mib, soft_purge, soft_purge,
+ [snmp_conf, snmp_target_mib, snmpa_mib_lib]},
{load_module, snmp_community_mib, soft_purge, soft_purge,
[snmpa_mib_lib]},
{load_module, snmp_framework_mib, soft_purge, soft_purge,
diff --git a/lib/snmp/src/manager/snmpm.erl b/lib/snmp/src/manager/snmpm.erl
index 5b6321b4c3..36b4901e9a 100644
--- a/lib/snmp/src/manager/snmpm.erl
+++ b/lib/snmp/src/manager/snmpm.erl
@@ -92,6 +92,43 @@
-export([format_reason/1, format_reason/2]).
%% Backward compatibillity exports
+-deprecated({agent_info, 3}).
+-deprecated({update_agent_info, 5}).
+-deprecated({g, 3}).
+-deprecated({g, 4}).
+-deprecated({g, 5}).
+-deprecated({g, 6}).
+-deprecated({g, 7}).
+-deprecated({ag, 3}).
+-deprecated({ag, 4}).
+-deprecated({ag, 5}).
+-deprecated({ag, 6}).
+-deprecated({ag, 7}).
+-deprecated({gn, 3}).
+-deprecated({gn, 4}).
+-deprecated({gn, 5}).
+-deprecated({gn, 6}).
+-deprecated({gn, 7}).
+-deprecated({agn, 3}).
+-deprecated({agn, 4}).
+-deprecated({agn, 5}).
+-deprecated({agn, 6}).
+-deprecated({agn, 7}).
+-deprecated({gb, 5}).
+-deprecated({gb, 6}).
+-deprecated({gb, 7}).
+-deprecated({gb, 8}).
+-deprecated({gb, 9}).
+-deprecated({s, 3}).
+-deprecated({s, 4}).
+-deprecated({s, 5}).
+-deprecated({s, 6}).
+-deprecated({s, 7}).
+-deprecated({as, 3}).
+-deprecated({as, 4}).
+-deprecated({as, 5}).
+-deprecated({as, 6}).
+-deprecated({as, 7}).
-export([
agent_info/3, update_agent_info/5,
g/3, g/4, g/5, g/6, g/7,
@@ -393,24 +430,12 @@ agent_info(Addr, Port, Item) ->
end.
update_agent_info(UserId, TargetName, Item, Val) ->
-%% p("update_agent_info -> entry with"
-%% "~n UserId: ~p"
-%% "~n TargetName: ~p"
-%% "~n Item: ~p"
-%% "~n Val: ~p", [UserId, TargetName, Item, Val]),
snmpm_config:update_agent_info(UserId, TargetName, Item, Val).
%% Backward compatibillity functions
update_agent_info(UserId, Addr, Port, Item, Val) ->
-%% p("update_agent_info -> entry with"
-%% "~n UserId: ~p"
-%% "~n Addr: ~p"
-%% "~n Port: ~p"
-%% "~n Item: ~p"
-%% "~n Val: ~p", [UserId, Addr, Port, Item, Val]),
case target_name(Addr, Port) of
{ok, TargetName} ->
-%% p("update_agent_info -> TargetName: ~p", [TargetName]),
update_agent_info(UserId, TargetName, Item, Val);
Error ->
Error
@@ -473,93 +498,39 @@ which_usm_users(EngineID) when is_list(EngineID) ->
%%
sync_get(UserId, TargetName, Oids) ->
-%% p("sync_get -> entry with"
-%% "~n UserId: ~p"
-%% "~n TargetName: ~p"
-%% "~n Oids: ~p", [UserId, TargetName, Oids]),
sync_get(UserId, TargetName, ?DEFAULT_CONTEXT, Oids).
sync_get(UserId, TargetName, Context, Oids) when is_list(Oids) ->
-%% p("sync_get -> entry with"
-%% "~n UserId: ~p"
-%% "~n TargetName: ~p"
-%% "~n Context: ~p"
-%% "~n Oids: ~p", [UserId, TargetName, Context, Oids]),
snmpm_server:sync_get(UserId, TargetName, Context, Oids);
sync_get(UserId, TargetName, Oids, Timeout) when is_integer(Timeout) ->
-%% p("sync_get -> entry with"
-%% "~n UserId: ~p"
-%% "~n TargetName: ~p"
-%% "~n Oids: ~p"
-%% "~n Timeout: ~p", [UserId, TargetName, Oids, Timeout]),
sync_get(UserId, TargetName, ?DEFAULT_CONTEXT, Oids, Timeout).
sync_get(UserId, TargetName, Context, Oids, Timeout) ->
-%% p("sync_get -> entry with"
-%% "~n UserId: ~p"
-%% "~n TargetName: ~p"
-%% "~n Context: ~p"
-%% "~n Oids: ~p"
-%% "~n Timeout: ~p", [UserId, TargetName, Context, Oids, Timeout]),
snmpm_server:sync_get(UserId, TargetName, Context, Oids, Timeout).
sync_get(UserId, TargetName, Context, Oids, Timeout, ExtraInfo) ->
-%% p("sync_get -> entry with"
-%% "~n UserId: ~p"
-%% "~n TargetName: ~p"
-%% "~n Context: ~p"
-%% "~n Oids: ~p"
-%% "~n Timeout: ~p"
-%% "~n ExtraInfo: ~p",
-%% [UserId, TargetName, Context, Oids, Timeout, ExtraInfo]),
snmpm_server:sync_get(UserId, TargetName, Context, Oids, Timeout,
ExtraInfo).
g(UserId, Addr, Oids) ->
-%% p("g -> entry with"
-%% "~n UserId: ~p"
-%% "~n Addr: ~p"
-%% "~n Oids: ~p", [UserId, Addr, Oids]),
g(UserId, Addr, ?DEFAULT_AGENT_PORT, Oids).
g(UserId, Addr, CtxName, Oids) when is_list(CtxName) andalso is_list(Oids) ->
-%% p("g -> entry with"
-%% "~n UserId: ~p"
-%% "~n Addr: ~p"
-%% "~n CtxName: ~p"
-%% "~n Oids: ~p", [UserId, Addr, CtxName, Oids]),
g(UserId, Addr, ?DEFAULT_AGENT_PORT, CtxName, Oids);
g(UserId, Addr, Port, Oids) when is_integer(Port) andalso is_list(Oids) ->
-%% p("g -> entry with"
-%% "~n UserId: ~p"
-%% "~n Addr: ~p"
-%% "~n Port: ~p"
-%% "~n Oids: ~p", [UserId, Addr, Port, Oids]),
g(UserId, Addr, Port, ?DEFAULT_CONTEXT, Oids);
g(UserId, Addr, Oids, Timeout)
when is_list(Oids) andalso is_integer(Timeout) ->
-%% p("g -> entry with"
-%% "~n UserId: ~p"
-%% "~n Addr: ~p"
-%% "~n Oids: ~p"
-%% "~n Timeout: ~p", [UserId, Addr, Oids, Timeout]),
g(UserId, Addr, ?DEFAULT_AGENT_PORT, Oids, Timeout).
g(UserId, Addr, Port, CtxName, Oids)
when is_integer(Port) andalso is_list(CtxName) andalso is_list(Oids) ->
-%% p("g -> entry with"
-%% "~n UserId: ~p"
-%% "~n Addr: ~p"
-%% "~n Port: ~p"
-%% "~n Context: ~p"
-%% "~n Oids: ~p", [UserId, Addr, Port, CtxName, Oids]),
case target_name(Addr, Port) of
{ok, TargetName} ->
-%% p("g -> TargetName: ~p", [TargetName]),
sync_get(UserId, TargetName, CtxName, Oids);
Error ->
Error
@@ -567,55 +538,23 @@ g(UserId, Addr, Port, CtxName, Oids)
g(UserId, Addr, Port, Oids, Timeout)
when is_integer(Port) andalso is_list(Oids) andalso is_integer(Timeout) ->
-%% p("g -> entry with"
-%% "~n UserId: ~p"
-%% "~n Addr: ~p"
-%% "~n Oids: ~p"
-%% "~n Timeout: ~p",
-%% [UserId, Addr, Oids, Timeout]),
g(UserId, Addr, Port, ?DEFAULT_CONTEXT, Oids, Timeout);
g(UserId, Addr, CtxName, Oids, Timeout)
when is_list(CtxName) andalso is_list(Oids) andalso is_integer(Timeout) ->
-%% p("g -> entry with"
-%% "~n UserId: ~p"
-%% "~n Addr: ~p"
-%% "~n CtxName: ~p"
-%% "~n Oids: ~p"
-%% "~n Timeout: ~p",
-%% [UserId, Addr, CtxName, Oids, Timeout]),
g(UserId, Addr, ?DEFAULT_AGENT_PORT, CtxName, Oids, Timeout).
g(UserId, Addr, Port, CtxName, Oids, Timeout) ->
-%% p("g -> entry with"
-%% "~n UserId: ~p"
-%% "~n Addr: ~p"
-%% "~n Port: ~p"
-%% "~n CtxName: ~p"
-%% "~n Oids: ~p"
-%% "~n Timeout: ~p",
-%% [UserId, Addr, Port, CtxName, Oids, Timeout]),
case target_name(Addr, Port) of
{ok, TargetName} ->
-%% p("g -> TargetName: ~p", [TargetName]),
sync_get(UserId, TargetName, CtxName, Oids, Timeout);
Error ->
Error
end.
g(UserId, Addr, Port, CtxName, Oids, Timeout, ExtraInfo) ->
-%% p("g -> entry with"
-%% "~n UserId: ~p"
-%% "~n Addr: ~p"
-%% "~n Port: ~p"
-%% "~n CtxName: ~p"
-%% "~n Oids: ~p"
-%% "~n Timeout: ~p"
-%% "~n ExtraInfo: ~p",
-%% [UserId, Addr, Port, CtxName, Oids, Timeout, ExtraInfo]),
case target_name(Addr, Port) of
{ok, TargetName} ->
-%% p("g -> TargetName: ~p", [TargetName]),
sync_get(UserId, TargetName, CtxName, Oids, Timeout, ExtraInfo);
Error ->
Error
diff --git a/lib/snmp/test/Makefile b/lib/snmp/test/Makefile
index 86af2460f5..b7975024b4 100644
--- a/lib/snmp/test/Makefile
+++ b/lib/snmp/test/Makefile
@@ -227,7 +227,7 @@ release_spec:
release_tests_spec: opt
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) $(RELTEST_FILES) $(COVER_SPEC_FILE) $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
tar cf - snmp_test_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/lib/ssl/examples/certs/Makefile b/lib/ssl/examples/certs/Makefile
index b811b461dc..a4f067ade6 100644
--- a/lib/ssl/examples/certs/Makefile
+++ b/lib/ssl/examples/certs/Makefile
@@ -57,5 +57,5 @@ release_spec: opt
$(INSTALL_DIR) $(RELSYSDIR)/examples/certs
tar cf - etc | \
(cd $(RELSYSDIR)/examples/certs; tar xf -)
- chmod -f -R ug+rw $(RELSYSDIR)/examples
+ chmod -R ug+rw $(RELSYSDIR)/examples
release_docs_spec:
diff --git a/lib/ssl/examples/src/Makefile b/lib/ssl/examples/src/Makefile
index 46c0507b3a..ae5881d49b 100644
--- a/lib/ssl/examples/src/Makefile
+++ b/lib/ssl/examples/src/Makefile
@@ -66,7 +66,7 @@ release_spec: opt
$(INSTALL_DIR) $(RELSYSDIR)/examples/src
$(INSTALL_DIR) $(RELSYSDIR)/examples/ebin
(cd ..; tar cf - src ebin | (cd $(RELSYSDIR)/examples; tar xf -))
- chmod -f -R ug+w $(RELSYSDIR)/examples
+ chmod -R ug+w $(RELSYSDIR)/examples
release_docs_spec:
diff --git a/lib/ssl/test/Makefile b/lib/ssl/test/Makefile
index fd3b6d06ad..53b2223035 100644
--- a/lib/ssl/test/Makefile
+++ b/lib/ssl/test/Makefile
@@ -128,7 +128,7 @@ release_tests_spec: opt
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(HRL_FILES_NEEDED_IN_TEST) $(COVER_FILE) $(RELSYSDIR)
$(INSTALL_DATA) ssl.spec ssl.cover $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
@tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/lib/stdlib/src/log_mf_h.erl b/lib/stdlib/src/log_mf_h.erl
index 2729f27e51..5fa5360fa1 100644
--- a/lib/stdlib/src/log_mf_h.erl
+++ b/lib/stdlib/src/log_mf_h.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -185,13 +185,19 @@ read_index_file(Dir) ->
%%-----------------------------------------------------------------
%% Write the index file. This file contains one binary with
%% the last used filename (an integer).
+%% Write a temporary file and rename it in order to make the update
+%% atomic.
%%-----------------------------------------------------------------
write_index_file(Dir, Index) ->
- case file:open(Dir ++ "/index", [raw, write]) of
+ File = Dir ++ "/index",
+ TmpFile = File ++ ".tmp",
+ case file:open(TmpFile, [raw, write]) of
{ok, Fd} ->
- file:write(Fd, [Index]),
- ok = file:close(Fd);
+ ok = file:write(Fd, [Index]),
+ ok = file:close(Fd),
+ ok = file:rename(TmpFile,File),
+ ok;
_ -> exit(open_index_file)
end.
diff --git a/lib/stdlib/src/otp_internal.erl b/lib/stdlib/src/otp_internal.erl
index 5c52dfcbf0..39d017d430 100644
--- a/lib/stdlib/src/otp_internal.erl
+++ b/lib/stdlib/src/otp_internal.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2011. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -180,6 +180,9 @@ obsolete_1(calendar, local_time_to_universal_time, 1) ->
obsolete_1(rpc, safe_multi_server_call, A) when A =:= 2; A =:= 3 ->
{deprecated, {rpc, multi_server_call, A}};
+
+%% *** SNMP ***
+
obsolete_1(snmp, N, A) ->
case is_snmp_agent_function(N, A) of
false ->
@@ -189,9 +192,100 @@ obsolete_1(snmp, N, A) ->
integer_to_list(A)++" instead"}
end;
+obsolete_1(snmpm, agent_info, 3) ->
+ {deprecated, {snmpm, agent_info, 2}, "R16B"};
+obsolete_1(snmpm, update_agent_info, 5) ->
+ {deprecated, {snmpm, update_agent_info, 4}, "R16B"};
+obsolete_1(snmpm, g, 3) ->
+ {deprecated, {snmpm, sync_get, 3}, "R16B"};
+obsolete_1(snmpm, g, 4) ->
+ {deprecated, {snmpm, sync_get, [3,4]}, "R16B"};
+obsolete_1(snmpm, g, 5) ->
+ {deprecated, {snmpm, sync_get, [4,5]}, "R16B"};
+obsolete_1(snmpm, g, 6) ->
+ {deprecated, {snmpm, sync_get, [5,6]}, "R16B"};
+obsolete_1(snmpm, g, 7) ->
+ {deprecated, {snmpm, sync_get, 6}, "R16B"};
+obsolete_1(snmpm, ag, 3) ->
+ {deprecated, {snmpm, async_get, 3}, "R16B"};
+obsolete_1(snmpm, ag, 4) ->
+ {deprecated, {snmpm, async_get, [3,4]}, "R16B"};
+obsolete_1(snmpm, ag, 5) ->
+ {deprecated, {snmpm, async_get, [4,5]}, "R16B"};
+obsolete_1(snmpm, ag, 6) ->
+ {deprecated, {snmpm, async_get, [5,6]}, "R16B"};
+obsolete_1(snmpm, ag, 7) ->
+ {deprecated, {snmpm, async_get, 6}, "R16B"};
+obsolete_1(snmpm, gn, 3) ->
+ {deprecated, {snmpm, sync_get_next, 3}, "R16B"};
+obsolete_1(snmpm, gn, 4) ->
+ {deprecated, {snmpm, sync_get_next, [3,4]}, "R16B"};
+obsolete_1(snmpm, gn, 5) ->
+ {deprecated, {snmpm, sync_get_next, [4,5]}, "R16B"};
+obsolete_1(snmpm, gn, 6) ->
+ {deprecated, {snmpm, sync_get_next, [5,6]}, "R16B"};
+obsolete_1(snmpm, gn, 7) ->
+ {deprecated, {snmpm, sync_get_next, 6}, "R16B"};
+obsolete_1(snmpm, agn, 3) ->
+ {deprecated, {snmpm, async_get_next, 3}, "R16B"};
+obsolete_1(snmpm, agn, 4) ->
+ {deprecated, {snmpm, async_get_next, [3,4]}, "R16B"};
+obsolete_1(snmpm, agn, 5) ->
+ {deprecated, {snmpm, async_get_next, [4,5]}, "R16B"};
+obsolete_1(snmpm, agn, 6) ->
+ {deprecated, {snmpm, async_get_next, [5,6]}, "R16B"};
+obsolete_1(snmpm, agn, 7) ->
+ {deprecated, {snmpm, async_get_next, 6}, "R16B"};
+obsolete_1(snmpm, s, 3) ->
+ {deprecated, {snmpm, sync_set, 3}, "R16B"};
+obsolete_1(snmpm, s, 4) ->
+ {deprecated, {snmpm, sync_set, [3,4]}, "R16B"};
+obsolete_1(snmpm, s, 5) ->
+ {deprecated, {snmpm, sync_set, [4,5]}, "R16B"};
+obsolete_1(snmpm, s, 6) ->
+ {deprecated, {snmpm, sync_set, [5,6]}, "R16B"};
+obsolete_1(snmpm, s, 7) ->
+ {deprecated, {snmpm, sync_set, 6}, "R16B"};
+obsolete_1(snmpm, as, 3) ->
+ {deprecated, {snmpm, async_set, 3}, "R16B"};
+obsolete_1(snmpm, as, 4) ->
+ {deprecated, {snmpm, async_set, [3,4]}, "R16B"};
+obsolete_1(snmpm, as, 5) ->
+ {deprecated, {snmpm, async_set, [4,5]}, "R16B"};
+obsolete_1(snmpm, as, 6) ->
+ {deprecated, {snmpm, async_set, [5,6]}, "R16B"};
+obsolete_1(snmpm, as, 7) ->
+ {deprecated, {snmpm, async_set, 6}, "R16B"};
+obsolete_1(snmpm, gb, 5) ->
+ {deprecated, {snmpm, sync_get_bulk, 5}, "R16B"};
+obsolete_1(snmpm, gb, 6) ->
+ {deprecated, {snmpm, sync_get_bulk, [5,6]}, "R16B"};
+obsolete_1(snmpm, gb, 7) ->
+ {deprecated, {snmpm, sync_get_bulk, [6,7]}, "R16B"};
+obsolete_1(snmpm, gb, 8) ->
+ {deprecated, {snmpm, sync_get_bulk, [7,8]}, "R16B"};
+obsolete_1(snmpm, gb, 9) ->
+ {deprecated, {snmpm, sync_get_bulk, 8}, "R16B"};
+obsolete_1(snmpm, agb, 5) ->
+ {deprecated, {snmpm, async_get_bulk, 5}, "R16B"};
+obsolete_1(snmpm, agb, 6) ->
+ {deprecated, {snmpm, async_get_bulk, [5,6]}, "R16B"};
+obsolete_1(snmpm, agb, 7) ->
+ {deprecated, {snmpm, async_get_bulk, [6,7]}, "R16B"};
+obsolete_1(snmpm, agb, 8) ->
+ {deprecated, {snmpm, async_get_bulk, [7,8]}, "R16B"};
+obsolete_1(snmpm, agb, 9) ->
+ {deprecated, {snmpm, async_get_bulk, 8}, "R16B"};
+
+
+%% *** MEGACO ***
+
obsolete_1(megaco, format_versions, 1) ->
{deprecated, "Deprecated; use megaco:print_version_info/0,1 instead"};
+
+%% *** OS-MON-MIB ***
+
obsolete_1(os_mon_mib, init, 1) ->
{deprecated, {os_mon_mib, load, 1}};
obsolete_1(os_mon_mib, stop, 1) ->
diff --git a/lib/stdlib/test/Makefile b/lib/stdlib/test/Makefile
index 3dd0a91870..5502c69fa5 100644
--- a/lib/stdlib/test/Makefile
+++ b/lib/stdlib/test/Makefile
@@ -135,7 +135,7 @@ release_tests_spec: make_emakefile
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) stdlib.spec $(EMAKEFILE) \
$(ERL_FILES) $(COVERFILE) $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
@tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/lib/syntax_tools/test/Makefile b/lib/syntax_tools/test/Makefile
index e793dec566..3e31bdbd50 100644
--- a/lib/syntax_tools/test/Makefile
+++ b/lib/syntax_tools/test/Makefile
@@ -60,6 +60,6 @@ release_tests_spec: make_emakefile
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) $(EMAKEFILE) $(ERL_FILES) $(RELSYSDIR)
$(INSTALL_DATA) syntax_tools.spec syntax_tools.cover $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
release_docs_spec:
diff --git a/lib/test_server/test/Makefile b/lib/test_server/test/Makefile
index 34c55c595d..ab72a9d579 100644
--- a/lib/test_server/test/Makefile
+++ b/lib/test_server/test/Makefile
@@ -86,7 +86,7 @@ release_tests_spec: make_emakefile
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) $(EMAKEFILE) $(ERL_FILES) $(COVERFILE) $(RELSYSDIR)
$(INSTALL_DATA) test_server.spec test_server.cover $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
@tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/lib/tools/test/Makefile b/lib/tools/test/Makefile
index 63f96520fd..8019b7269f 100644
--- a/lib/tools/test/Makefile
+++ b/lib/tools/test/Makefile
@@ -87,7 +87,7 @@ release_tests_spec: make_emakefile
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DATA) $(SPEC_FILES) $(COVER_FILE) $(EMAKEFILE) \
$(ERL_FILES) $(RELSYSDIR)
- chmod -f -R u+w $(RELSYSDIR)
+ chmod -R u+w $(RELSYSDIR)
@tar cf - *_SUITE_data | (cd $(RELSYSDIR); tar xf -)
release_docs_spec:
diff --git a/lib/typer/src/typer.erl b/lib/typer/src/typer.erl
index fc8caa4f21..e40c4f39cd 100644
--- a/lib/typer/src/typer.erl
+++ b/lib/typer/src/typer.erl
@@ -628,6 +628,8 @@ cl(["-T"|Opts]) ->
cl(["-r"|Opts]) ->
{Files, RestOpts} = dialyzer_cl_parse:collect_args(Opts),
{{files_r, Files}, RestOpts};
+cl(["-pa",Dir|Opts]) -> {{pa,Dir}, Opts};
+cl(["-pz",Dir|Opts]) -> {{pz,Dir}, Opts};
cl(["-"++H|_]) -> fatal_error("unknown option -"++H);
cl(Opts) ->
{Files, RestOpts} = dialyzer_cl_parse:collect_args(Opts),
@@ -672,7 +674,13 @@ analyze_result({plt, Plt}, Args, Analysis) ->
analyze_result(show_succ, Args, Analysis) ->
{Args, Analysis#analysis{show_succ = true}};
analyze_result(no_spec, Args, Analysis) ->
- {Args, Analysis#analysis{no_spec = true}}.
+ {Args, Analysis#analysis{no_spec = true}};
+analyze_result({pa, Dir}, Args, Analysis) ->
+ code:add_patha(Dir),
+ {Args, Analysis};
+analyze_result({pz, Dir}, Args, Analysis) ->
+ code:add_pathz(Dir),
+ {Args, Analysis}.
%%--------------------------------------------------------------------
%% File processing.
@@ -1009,7 +1017,8 @@ version_message() ->
help_message() ->
S = <<" Usage: typer [--help] [--version] [--plt PLT] [--edoc]
[--show | --show-exported | --annotate | --annotate-inc-files]
- [-Ddefine]* [-I include_dir]* [-T application]* [-r] file*
+ [-Ddefine]* [-I include_dir]* [-pa dir]* [-pz dir]*
+ [-T application]* [-r] file*
Options:
-r dir*
@@ -1039,6 +1048,10 @@ help_message() ->
-I include_dir
pass the include_dir to TypEr
(The syntax of includes is the same as that used by \"erlc\".)
+ -pa dir
+ -pz dir
+ Set code path options to TypEr
+ (This is useful for files that use parse tranforms.)
--version (or -v)
prints the Typer version and exits
--help (or -h)