aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
Diffstat (limited to 'erts')
-rw-r--r--erts/doc/src/notes.xml28
-rw-r--r--erts/emulator/test/num_bif_SUITE.erl22
-rw-r--r--erts/etc/common/erlexec.c1
-rw-r--r--erts/preloaded/ebin/erlang.beambin94136 -> 94176 bytes
-rw-r--r--erts/preloaded/src/erlang.erl15
5 files changed, 45 insertions, 21 deletions
diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml
index f94d71ee3d..822aceff08 100644
--- a/erts/doc/src/notes.xml
+++ b/erts/doc/src/notes.xml
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="latin1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE chapter SYSTEM "chapter.dtd">
<chapter>
@@ -321,7 +321,7 @@
<item>
<p>
Support wide characters in the shell through wcwidth().
- Thanks to Anthony Ramine. Reported by Lo�c Hoguin.</p>
+ Thanks to Anthony Ramine. Reported by Loïc Hoguin.</p>
<p>
Own Id: OTP-11088</p>
</item>
@@ -342,7 +342,7 @@
<item>
<p>
Remove 'query' from the list of reserved words in docs.
- Thanks to Matthias Endler and Lo�c Hoguin.</p>
+ Thanks to Matthias Endler and Loïc Hoguin.</p>
<p>
Own Id: OTP-11158</p>
</item>
@@ -1961,7 +1961,7 @@
<item>
<p>
Fix typo in supervisor behaviour doc (Thanks to Ricardo
- Catalinas Jim�nez)</p>
+ Catalinas Jiménez)</p>
<p>
Own Id: OTP-9924</p>
</item>
@@ -2225,7 +2225,7 @@
<item>
<p>
Fixes module erlang doc style: option description (Thanks
- to Ricardo Catalinas Jim�nez)</p>
+ to Ricardo Catalinas Jiménez)</p>
<p>
Own Id: OTP-9697</p>
</item>
@@ -2674,7 +2674,7 @@
<item>
<p>
Fix typos in the epmd documentation (Thanks to Holger
- Wei� )</p>
+ Weiß )</p>
<p>
Own Id: OTP-9387</p>
</item>
@@ -2779,7 +2779,7 @@
<item>
<p>
Fix non-existing function (erlang:disconnect/1) in
- distributed reference manual (Thanks to Fabian Kr�l)</p>
+ distributed reference manual (Thanks to Fabian Król)</p>
<p>
Own Id: OTP-9504</p>
</item>
@@ -2807,7 +2807,7 @@
only separator characters (comma and space).</p>
<p>
The same applies to epmd's -address option.(Thanks to
- Holger Wei�)</p>
+ Holger Weiß)</p>
<p>
Own Id: OTP-9525</p>
</item>
@@ -2951,7 +2951,7 @@
<p>
Add support for querying the number of configured and
online processors on SGI systems running IRIX.(Thanks to
- Holger Wei�)</p>
+ Holger Weiß)</p>
<p>
Own Id: OTP-9531</p>
</item>
@@ -3061,7 +3061,7 @@
using a comma-separated list. If the loopback address is
not in this list, it will be added implicitly, so that
the daemon can be queried by an interactive epmd
- process.(Thanks to Holger Wei�)</p>
+ process.(Thanks to Holger Weiß)</p>
<p>
Own Id: OTP-9213</p>
</item>
@@ -3096,7 +3096,7 @@
value over to dbg_gen_printf(). This fixes the problem
that errno had been reset to zero by the time it was used
(to print the corresponding error message) in the
- dbg_gen_printf() function. (Thanks to Holger Wei�)</p>
+ dbg_gen_printf() function. (Thanks to Holger Weiß)</p>
<p>
Own Id: OTP-9223</p>
</item>
@@ -3482,7 +3482,7 @@
Mention that "-detached" implies "-noinput"</p>
<p>
Clarify that specifying "-noinput" is unnecessary if the
- "-detached" flag is given. (thanks to Holger Wei�)</p>
+ "-detached" flag is given. (thanks to Holger Weiß)</p>
<p>
Own Id: OTP-9086</p>
</item>
@@ -4988,7 +4988,7 @@
failed to detect gcc C compilers with other command line
names than gcc. `configure' now substitute GCC into the
makefiles. If CC is a gcc C compiler, GCC will have the
- value yes. (Thanks to Jean-S�bastien P�dron)</p>
+ value yes. (Thanks to Jean-Sébastien Pédron)</p>
<p>
Own Id: OTP-8373</p>
</item>
@@ -7358,7 +7358,7 @@
<p>
IPv6 name resolving has now been fixed to use
getaddrinfo() patch (thoroughly reworked) courtesy of Love
- H�rnquist-�strand submitted by Fredrik Thulin. It also
+ Hörnquist-Åstrand submitted by Fredrik Thulin. It also
can use gethostname2() patch (also reworked) courtesy of
Mikael Magnusson for debian submitted by Sergei Golovan.</p>
<p>
diff --git a/erts/emulator/test/num_bif_SUITE.erl b/erts/emulator/test/num_bif_SUITE.erl
index b92a0e2059..ff8d18eef8 100644
--- a/erts/emulator/test/num_bif_SUITE.erl
+++ b/erts/emulator/test/num_bif_SUITE.erl
@@ -350,12 +350,34 @@ t_integer_to_string(Config) when is_list(Config) ->
(catch erlang:integer_to_list(Value))
end,[atom,1.2,0.0,[$1,[$2]]]),
+ %% Base-2 integers
+ test_its("0", 0, 2),
+ test_its("1", 1, 2),
+ test_its("110110", 54, 2),
+ test_its("-1000000", -64, 2),
+ %% Base-16 integers
+ test_its("0", 0, 16),
+ test_its("A", 10, 16),
+ test_its("D4BE", 54462, 16),
+ test_its("-D4BE", -54462, 16),
+
+ lists:foreach(fun(Value) ->
+ {'EXIT', {badarg, _}} =
+ (catch erlang:integer_to_binary(Value, 8)),
+ {'EXIT', {badarg, _}} =
+ (catch erlang:integer_to_list(Value, 8))
+ end,[atom,1.2,0.0,[$1,[$2]]]),
+
ok.
test_its(List,Int) ->
Int = list_to_integer(List),
Int = binary_to_integer(list_to_binary(List)).
+test_its(List,Int,Base) ->
+ Int = list_to_integer(List, Base),
+ Int = binary_to_integer(list_to_binary(List), Base).
+
%% Tests binary_to_integer/1.
t_string_to_integer(Config) when is_list(Config) ->
diff --git a/erts/etc/common/erlexec.c b/erts/etc/common/erlexec.c
index 552afe295d..30560f5a2f 100644
--- a/erts/etc/common/erlexec.c
+++ b/erts/etc/common/erlexec.c
@@ -799,6 +799,7 @@ int main(int argc, char **argv)
case 'a':
case 'A':
case 'b':
+ case 'e':
case 'i':
case 'n':
case 'P':
diff --git a/erts/preloaded/ebin/erlang.beam b/erts/preloaded/ebin/erlang.beam
index 09eafbcc29..83cafe197e 100644
--- a/erts/preloaded/ebin/erlang.beam
+++ b/erts/preloaded/ebin/erlang.beam
Binary files differ
diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl
index e016a50c4c..a969ef91dc 100644
--- a/erts/preloaded/src/erlang.erl
+++ b/erts/preloaded/src/erlang.erl
@@ -2891,22 +2891,23 @@ integer_to_binary(I, Base)
when erlang:is_integer(I), erlang:is_integer(Base),
Base >= 2, Base =< 1+$Z-$A+10 ->
if I < 0 ->
- <<"$-",(integer_to_binary(-I, Base, []))/binary>>;
+ <<$-,(integer_to_binary(-I, Base, <<>>))/binary>>;
true ->
integer_to_binary(I, Base, <<>>)
end;
integer_to_binary(I, Base) ->
erlang:error(badarg, [I, Base]).
-integer_to_binary(0, _Base, R0) ->
- R0;
integer_to_binary(I0, Base, R0) ->
D = I0 rem Base,
I1 = I0 div Base,
- if D >= 10 ->
- integer_to_binary(I1,Base,<<(D-10+$A),R0/binary>>);
- true ->
- integer_to_binary(I1,Base,<<(D+$0),R0/binary>>)
+ R1 = if
+ D >= 10 -> <<(D-10+$A),R0/binary>>;
+ true -> <<(D+$0),R0/binary>>
+ end,
+ if
+ I1 =:= 0 -> R1;
+ true -> integer_to_binary(I1, Base, R1)
end.
%% erlang:flush_monitor_message/2 is for internal use only!