aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bootstrap/bin/start.script2
-rw-r--r--bootstrap/bin/start_clean.script2
-rw-r--r--bootstrap/lib/compiler/ebin/beam_asm.beambin9168 -> 9168 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_validator.beambin31484 -> 31480 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/compile.beambin31092 -> 31800 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/compiler.app12
-rw-r--r--bootstrap/lib/compiler/ebin/compiler.appup2
-rw-r--r--bootstrap/lib/compiler/ebin/sys_pre_expand.beambin14116 -> 14052 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/v3_core.beambin45492 -> 45504 bytes
-rw-r--r--bootstrap/lib/compiler/egen/core_parse.erl10
-rw-r--r--bootstrap/lib/kernel/ebin/code.beambin5720 -> 5744 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/code_server.beambin23852 -> 23856 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/gen_sctp.beambin2924 -> 3144 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/hipe_unified_loader.beambin11012 -> 11428 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet.beambin17988 -> 18228 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_config.beambin8304 -> 8304 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_db.beambin24428 -> 24836 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_gethost_native.beambin9528 -> 9748 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_parse.beambin11064 -> 11980 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_sctp.beambin1684 -> 1728 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/kernel.app10
-rw-r--r--bootstrap/lib/kernel/ebin/pg2.beambin6940 -> 6948 bytes
-rw-r--r--bootstrap/lib/kernel/include/file.hrl10
-rw-r--r--bootstrap/lib/kernel/include/inet.hrl10
-rw-r--r--bootstrap/lib/kernel/include/inet_sctp.hrl10
-rw-r--r--bootstrap/lib/orber/include/Makefile10
-rw-r--r--bootstrap/lib/orber/include/corba.hrl10
-rw-r--r--bootstrap/lib/orber/include/ifr_types.hrl10
-rw-r--r--bootstrap/lib/orber/include/orber_pi.hrl10
-rw-r--r--bootstrap/lib/stdlib/ebin/edlin.beambin6924 -> 7296 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/edlin_expand.beambin2632 -> 2816 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/epp.beambin20704 -> 21644 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/erl_lint.beambin72504 -> 73276 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/escript.beambin12272 -> 12296 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/filelib.beambin6308 -> 6376 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/otp_internal.beambin7144 -> 7192 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/re.beambin11384 -> 11312 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/shell.beambin27416 -> 28144 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/shell_default.beambin3516 -> 3552 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/stdlib.app10
-rw-r--r--bootstrap/lib/stdlib/egen/erl_parse.erl10
-rw-r--r--bootstrap/lib/stdlib/include/erl_bits.hrl10
-rw-r--r--bootstrap/lib/stdlib/include/erl_compile.hrl10
-rw-r--r--bootstrap/lib/stdlib/include/ms_transform.hrl10
-rw-r--r--bootstrap/lib/stdlib/include/qlc.hrl10
-rw-r--r--bootstrap/lib/stdlib/include/zip.hrl10
-rw-r--r--configure.in20
-rw-r--r--erts/configure.in71
-rw-r--r--erts/doc/src/alt_dist.xml22
-rw-r--r--erts/doc/src/crash_dump.xml8
-rw-r--r--erts/doc/src/driver.xml142
-rw-r--r--erts/doc/src/driver_entry.xml8
-rw-r--r--erts/doc/src/erlang.xml24
-rw-r--r--erts/doc/src/erlsrv.xml22
-rw-r--r--erts/doc/src/escript.xml20
-rw-r--r--erts/doc/src/inet_cfg.xml13
-rw-r--r--erts/doc/src/match_spec.xml40
-rw-r--r--erts/doc/src/notes.xml20
-rw-r--r--erts/doc/src/tty.xml8
-rw-r--r--erts/doc/src/zlib.xml24
-rw-r--r--erts/emulator/beam/erl_db.c10
-rw-r--r--erts/emulator/beam/erl_db_hash.c10
-rw-r--r--erts/emulator/beam/erl_lock_count.c10
-rw-r--r--erts/emulator/beam/erl_lock_count.h10
-rw-r--r--erts/emulator/beam/io.c10
-rw-r--r--erts/etc/common/escript.c36
-rw-r--r--erts/etc/unix/Install.src2
-rw-r--r--lib/compiler/src/Makefile69
-rw-r--r--lib/compiler/src/compile.erl2
-rw-r--r--lib/compiler/src/sys_pre_expand.erl60
-rw-r--r--lib/compiler/src/v3_core.erl14
-rw-r--r--lib/et/doc/src/fascicules.xml18
-rw-r--r--lib/et/doc/src/files.mk3
-rw-r--r--lib/et/doc/src/part_notes.xml36
-rw-r--r--lib/kernel/src/Makefile3
-rw-r--r--lib/kernel/src/hipe_unified_loader.erl42
-rw-r--r--lib/kernel/src/inet.erl147
-rw-r--r--lib/kernel/src/inet_config.erl32
-rw-r--r--lib/kernel/src/inet_db.erl107
-rw-r--r--lib/kernel/src/inet_gethost_native.erl72
-rw-r--r--lib/kernel/src/inet_parse.erl285
-rw-r--r--lib/kernel/test/inet_SUITE.erl198
-rw-r--r--lib/kernel/test/inet_res_SUITE.erl88
-rw-r--r--lib/megaco/test/Makefile6
-rw-r--r--lib/megaco/test/modules.mk12
-rw-r--r--lib/megaco/vsn.mk2
-rw-r--r--lib/percept/src/egd_render.erl12
-rw-r--r--lib/percept/test/egd_SUITE.erl14
-rw-r--r--lib/reltool/doc/src/Makefile30
-rw-r--r--lib/reltool/doc/src/book.gifbin1081 -> 0 bytes
-rw-r--r--lib/reltool/doc/src/fascicules.xml17
-rw-r--r--lib/reltool/doc/src/files.mk21
-rw-r--r--lib/reltool/doc/src/note.gifbin1539 -> 0 bytes
-rw-r--r--lib/reltool/doc/src/notes.gifbin2005 -> 0 bytes
-rw-r--r--lib/reltool/doc/src/part_notes.xml41
-rw-r--r--lib/reltool/doc/src/ref_man.gifbin1530 -> 0 bytes
-rw-r--r--lib/reltool/doc/src/reltool_examples.xml32
-rw-r--r--lib/reltool/doc/src/user_guide.gifbin1581 -> 0 bytes
-rw-r--r--lib/reltool/doc/src/warning.gifbin1498 -> 0 bytes
-rw-r--r--lib/reltool/src/reltool_target.erl25
-rw-r--r--lib/stdlib/src/Makefile3
-rw-r--r--lib/stdlib/src/erl_lint.erl114
-rw-r--r--lib/stdlib/test/erl_lint_SUITE.erl12
-rw-r--r--lib/tools/doc/src/Makefile10
-rw-r--r--lib/tools/doc/src/part.xml6
-rw-r--r--lib/tools/doc/src/ref_man.xml6
-rw-r--r--lib/tools/src/Makefile10
-rw-r--r--lib/tools/src/lcnt.erl2
-rw-r--r--lib/tools/test/lcnt_SUITE.erl2
-rwxr-xr-xotp_build24
-rw-r--r--xcomp/README449
-rw-r--r--xcomp/README.md485
-rw-r--r--xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf287
-rw-r--r--xcomp/erl-xcomp-vxworks_ppc32.conf287
-rw-r--r--xcomp/erl-xcomp-x86_64-saf-linux-gnu.conf287
-rw-r--r--xcomp/erl-xcomp.conf.template287
116 files changed, 2394 insertions, 1973 deletions
diff --git a/bootstrap/bin/start.script b/bootstrap/bin/start.script
index 61a0942632..98760d1e27 100644
--- a/bootstrap/bin/start.script
+++ b/bootstrap/bin/start.script
@@ -1,4 +1,4 @@
-%% script generated at {2009,12,14} {14,9,55}
+%% script generated at {2010,2,10} {11,22,34}
{script,
{"OTP APN 181 01","R13B04"},
[{preLoaded,
diff --git a/bootstrap/bin/start_clean.script b/bootstrap/bin/start_clean.script
index 61a0942632..98760d1e27 100644
--- a/bootstrap/bin/start_clean.script
+++ b/bootstrap/bin/start_clean.script
@@ -1,4 +1,4 @@
-%% script generated at {2009,12,14} {14,9,55}
+%% script generated at {2010,2,10} {11,22,34}
{script,
{"OTP APN 181 01","R13B04"},
[{preLoaded,
diff --git a/bootstrap/lib/compiler/ebin/beam_asm.beam b/bootstrap/lib/compiler/ebin/beam_asm.beam
index 1c2783cc14..6908d2c296 100644
--- a/bootstrap/lib/compiler/ebin/beam_asm.beam
+++ b/bootstrap/lib/compiler/ebin/beam_asm.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_validator.beam b/bootstrap/lib/compiler/ebin/beam_validator.beam
index 832e473761..2edf5f226e 100644
--- a/bootstrap/lib/compiler/ebin/beam_validator.beam
+++ b/bootstrap/lib/compiler/ebin/beam_validator.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/compile.beam b/bootstrap/lib/compiler/ebin/compile.beam
index 1e711b2461..864d76b526 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/compiler.app b/bootstrap/lib/compiler/ebin/compiler.app
index d5e7956176..497d1873d8 100644
--- a/bootstrap/lib/compiler/ebin/compiler.app
+++ b/bootstrap/lib/compiler/ebin/compiler.app
@@ -1,24 +1,24 @@
% This is an -*- erlang -*- file.
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
{application, compiler,
[{description, "ERTS CXC 138 10"},
- {vsn, "4.6.4"},
+ {vsn, "4.6.5"},
{modules, [
beam_asm,
beam_block,
diff --git a/bootstrap/lib/compiler/ebin/compiler.appup b/bootstrap/lib/compiler/ebin/compiler.appup
index 224c761cc2..99b234c847 100644
--- a/bootstrap/lib/compiler/ebin/compiler.appup
+++ b/bootstrap/lib/compiler/ebin/compiler.appup
@@ -1 +1 @@
-{"4.6.4",[],[]}.
+{"4.6.5",[],[]}.
diff --git a/bootstrap/lib/compiler/ebin/sys_pre_expand.beam b/bootstrap/lib/compiler/ebin/sys_pre_expand.beam
index a5a0a3d6ac..a2766d3048 100644
--- a/bootstrap/lib/compiler/ebin/sys_pre_expand.beam
+++ b/bootstrap/lib/compiler/ebin/sys_pre_expand.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/v3_core.beam b/bootstrap/lib/compiler/ebin/v3_core.beam
index 111753213e..2b5efad43f 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/compiler/egen/core_parse.erl b/bootstrap/lib/compiler/egen/core_parse.erl
index f20cda3d04..e93877a690 100644
--- a/bootstrap/lib/compiler/egen/core_parse.erl
+++ b/bootstrap/lib/compiler/egen/core_parse.erl
@@ -16,20 +16,20 @@ tok_line(T) -> element(2, T).
-file("/usr/local/otp/releases/sles10_32_R13B03_patched/lib/parsetools-2.0.1/include/yeccpre.hrl", 0).
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
diff --git a/bootstrap/lib/kernel/ebin/code.beam b/bootstrap/lib/kernel/ebin/code.beam
index 105de39d21..1392a018ab 100644
--- a/bootstrap/lib/kernel/ebin/code.beam
+++ b/bootstrap/lib/kernel/ebin/code.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/code_server.beam b/bootstrap/lib/kernel/ebin/code_server.beam
index 9515ff81c1..e6ad873c82 100644
--- a/bootstrap/lib/kernel/ebin/code_server.beam
+++ b/bootstrap/lib/kernel/ebin/code_server.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/gen_sctp.beam b/bootstrap/lib/kernel/ebin/gen_sctp.beam
index 18ecaff05f..f66b4635a2 100644
--- a/bootstrap/lib/kernel/ebin/gen_sctp.beam
+++ b/bootstrap/lib/kernel/ebin/gen_sctp.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/hipe_unified_loader.beam b/bootstrap/lib/kernel/ebin/hipe_unified_loader.beam
index 21d21208f3..ffa0160f81 100644
--- a/bootstrap/lib/kernel/ebin/hipe_unified_loader.beam
+++ b/bootstrap/lib/kernel/ebin/hipe_unified_loader.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet.beam b/bootstrap/lib/kernel/ebin/inet.beam
index d12f0a57a9..a8983e79c1 100644
--- a/bootstrap/lib/kernel/ebin/inet.beam
+++ b/bootstrap/lib/kernel/ebin/inet.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet_config.beam b/bootstrap/lib/kernel/ebin/inet_config.beam
index 5b93d653f7..ad3f46010e 100644
--- a/bootstrap/lib/kernel/ebin/inet_config.beam
+++ b/bootstrap/lib/kernel/ebin/inet_config.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet_db.beam b/bootstrap/lib/kernel/ebin/inet_db.beam
index 14e0e57729..ee4a8633d6 100644
--- a/bootstrap/lib/kernel/ebin/inet_db.beam
+++ b/bootstrap/lib/kernel/ebin/inet_db.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet_gethost_native.beam b/bootstrap/lib/kernel/ebin/inet_gethost_native.beam
index aaaecc8577..1f9241a378 100644
--- a/bootstrap/lib/kernel/ebin/inet_gethost_native.beam
+++ b/bootstrap/lib/kernel/ebin/inet_gethost_native.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet_parse.beam b/bootstrap/lib/kernel/ebin/inet_parse.beam
index 3315aab31f..926f21e99c 100644
--- a/bootstrap/lib/kernel/ebin/inet_parse.beam
+++ b/bootstrap/lib/kernel/ebin/inet_parse.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet_sctp.beam b/bootstrap/lib/kernel/ebin/inet_sctp.beam
index 0372452973..a4d234911d 100644
--- a/bootstrap/lib/kernel/ebin/inet_sctp.beam
+++ b/bootstrap/lib/kernel/ebin/inet_sctp.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/kernel.app b/bootstrap/lib/kernel/ebin/kernel.app
index c6abc267b1..83a01d75cb 100644
--- a/bootstrap/lib/kernel/ebin/kernel.app
+++ b/bootstrap/lib/kernel/ebin/kernel.app
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
%% This is an -*- erlang -*- file.
diff --git a/bootstrap/lib/kernel/ebin/pg2.beam b/bootstrap/lib/kernel/ebin/pg2.beam
index efb224f375..38870b0f43 100644
--- a/bootstrap/lib/kernel/ebin/pg2.beam
+++ b/bootstrap/lib/kernel/ebin/pg2.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/include/file.hrl b/bootstrap/lib/kernel/include/file.hrl
index b8ad6c8464..2273b0c5a6 100644
--- a/bootstrap/lib/kernel/include/file.hrl
+++ b/bootstrap/lib/kernel/include/file.hrl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
diff --git a/bootstrap/lib/kernel/include/inet.hrl b/bootstrap/lib/kernel/include/inet.hrl
index a62c8b0878..94dd269f7e 100644
--- a/bootstrap/lib/kernel/include/inet.hrl
+++ b/bootstrap/lib/kernel/include/inet.hrl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
%% This record is returned by inet:gethostbyaddr/2 and inet:gethostbyname/2.
diff --git a/bootstrap/lib/kernel/include/inet_sctp.hrl b/bootstrap/lib/kernel/include/inet_sctp.hrl
index 34c46fee1e..83f95e05af 100644
--- a/bootstrap/lib/kernel/include/inet_sctp.hrl
+++ b/bootstrap/lib/kernel/include/inet_sctp.hrl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
%% SCTP protocol contribution by Leonid Timochouk and Serge Aleynikov.
diff --git a/bootstrap/lib/orber/include/Makefile b/bootstrap/lib/orber/include/Makefile
index cc02fbf5b3..08745e5727 100644
--- a/bootstrap/lib/orber/include/Makefile
+++ b/bootstrap/lib/orber/include/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2008-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2008-2010. 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
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
#
diff --git a/bootstrap/lib/orber/include/corba.hrl b/bootstrap/lib/orber/include/corba.hrl
index 99fe498d2e..c5d2d50ea0 100644
--- a/bootstrap/lib/orber/include/corba.hrl
+++ b/bootstrap/lib/orber/include/corba.hrl
@@ -1,20 +1,20 @@
%%--------------------------------------------------------------------
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
%%
diff --git a/bootstrap/lib/orber/include/ifr_types.hrl b/bootstrap/lib/orber/include/ifr_types.hrl
index 7e67da9781..035142d802 100644
--- a/bootstrap/lib/orber/include/ifr_types.hrl
+++ b/bootstrap/lib/orber/include/ifr_types.hrl
@@ -1,20 +1,20 @@
%%--------------------------------------------------------------------
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
%%
diff --git a/bootstrap/lib/orber/include/orber_pi.hrl b/bootstrap/lib/orber/include/orber_pi.hrl
index d2fb33197e..2b846bc814 100644
--- a/bootstrap/lib/orber/include/orber_pi.hrl
+++ b/bootstrap/lib/orber/include/orber_pi.hrl
@@ -1,20 +1,20 @@
%%----------------------------------------------------------------------
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
%%
diff --git a/bootstrap/lib/stdlib/ebin/edlin.beam b/bootstrap/lib/stdlib/ebin/edlin.beam
index 7a2b065674..fe51f7f417 100644
--- a/bootstrap/lib/stdlib/ebin/edlin.beam
+++ b/bootstrap/lib/stdlib/ebin/edlin.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/edlin_expand.beam b/bootstrap/lib/stdlib/ebin/edlin_expand.beam
index 1719b3bb45..0ca05e1bc3 100644
--- a/bootstrap/lib/stdlib/ebin/edlin_expand.beam
+++ b/bootstrap/lib/stdlib/ebin/edlin_expand.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/epp.beam b/bootstrap/lib/stdlib/ebin/epp.beam
index 4d072403ec..66a84e41df 100644
--- a/bootstrap/lib/stdlib/ebin/epp.beam
+++ b/bootstrap/lib/stdlib/ebin/epp.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/erl_lint.beam b/bootstrap/lib/stdlib/ebin/erl_lint.beam
index 08da4563a7..79ed469508 100644
--- a/bootstrap/lib/stdlib/ebin/erl_lint.beam
+++ b/bootstrap/lib/stdlib/ebin/erl_lint.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/escript.beam b/bootstrap/lib/stdlib/ebin/escript.beam
index 20e6a25f1d..a606d817b7 100644
--- a/bootstrap/lib/stdlib/ebin/escript.beam
+++ b/bootstrap/lib/stdlib/ebin/escript.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/filelib.beam b/bootstrap/lib/stdlib/ebin/filelib.beam
index f3065882ae..e03b753c09 100644
--- a/bootstrap/lib/stdlib/ebin/filelib.beam
+++ b/bootstrap/lib/stdlib/ebin/filelib.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/otp_internal.beam b/bootstrap/lib/stdlib/ebin/otp_internal.beam
index f9256f3f4c..974377cdd4 100644
--- a/bootstrap/lib/stdlib/ebin/otp_internal.beam
+++ b/bootstrap/lib/stdlib/ebin/otp_internal.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/re.beam b/bootstrap/lib/stdlib/ebin/re.beam
index ae7bf3a734..06c02fc10c 100644
--- a/bootstrap/lib/stdlib/ebin/re.beam
+++ b/bootstrap/lib/stdlib/ebin/re.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/shell.beam b/bootstrap/lib/stdlib/ebin/shell.beam
index fc3552621d..a537d0936e 100644
--- a/bootstrap/lib/stdlib/ebin/shell.beam
+++ b/bootstrap/lib/stdlib/ebin/shell.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/shell_default.beam b/bootstrap/lib/stdlib/ebin/shell_default.beam
index aa600600d0..57ac5f2046 100644
--- a/bootstrap/lib/stdlib/ebin/shell_default.beam
+++ b/bootstrap/lib/stdlib/ebin/shell_default.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/stdlib.app b/bootstrap/lib/stdlib/ebin/stdlib.app
index ff81f58bcc..8a6e9cf514 100644
--- a/bootstrap/lib/stdlib/ebin/stdlib.app
+++ b/bootstrap/lib/stdlib/ebin/stdlib.app
@@ -1,20 +1,20 @@
%% This is an -*- erlang -*- file.
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
{application, stdlib,
diff --git a/bootstrap/lib/stdlib/egen/erl_parse.erl b/bootstrap/lib/stdlib/egen/erl_parse.erl
index 684f65386f..d3e63c1aec 100644
--- a/bootstrap/lib/stdlib/egen/erl_parse.erl
+++ b/bootstrap/lib/stdlib/egen/erl_parse.erl
@@ -532,20 +532,20 @@ get_attributes(L) ->
-file("/usr/local/otp/releases/sles10_32_R13B03_patched/lib/parsetools-2.0.1/include/yeccpre.hrl", 0).
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
diff --git a/bootstrap/lib/stdlib/include/erl_bits.hrl b/bootstrap/lib/stdlib/include/erl_bits.hrl
index 3ca71af3a0..06bc1a75fc 100644
--- a/bootstrap/lib/stdlib/include/erl_bits.hrl
+++ b/bootstrap/lib/stdlib/include/erl_bits.hrl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
%% This is an -*- erlang -*- file.
diff --git a/bootstrap/lib/stdlib/include/erl_compile.hrl b/bootstrap/lib/stdlib/include/erl_compile.hrl
index 48aadbcc5e..b49b0c3970 100644
--- a/bootstrap/lib/stdlib/include/erl_compile.hrl
+++ b/bootstrap/lib/stdlib/include/erl_compile.hrl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
diff --git a/bootstrap/lib/stdlib/include/ms_transform.hrl b/bootstrap/lib/stdlib/include/ms_transform.hrl
index fed832fa66..81a624b075 100644
--- a/bootstrap/lib/stdlib/include/ms_transform.hrl
+++ b/bootstrap/lib/stdlib/include/ms_transform.hrl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-compile({parse_transform,ms_transform}).
diff --git a/bootstrap/lib/stdlib/include/qlc.hrl b/bootstrap/lib/stdlib/include/qlc.hrl
index edb1e7ef57..54df6168e4 100644
--- a/bootstrap/lib/stdlib/include/qlc.hrl
+++ b/bootstrap/lib/stdlib/include/qlc.hrl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-compile({parse_transform,qlc}).
diff --git a/bootstrap/lib/stdlib/include/zip.hrl b/bootstrap/lib/stdlib/include/zip.hrl
index 7336b760cd..47b06a1cc3 100644
--- a/bootstrap/lib/stdlib/include/zip.hrl
+++ b/bootstrap/lib/stdlib/include/zip.hrl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
diff --git a/configure.in b/configure.in
index 19ef304a1a..2a9a2c50b2 100644
--- a/configure.in
+++ b/configure.in
@@ -272,6 +272,19 @@ AC_ARG_ENABLE(m64-build,
esac
],enable_m64_build=no)
+AC_ARG_ENABLE(m32-build,
+[ --enable-m32-build build 32bit binaries using the -m32 flag to (g)cc],
+[ case "$enableval" in
+ no) enable_m32_build=no ;;
+ *)
+ if test X${enable_darwin_64bit} = Xyes -o X${enable_m64_build} = Xyes;
+ then
+ AC_MSG_ERROR([(--enable-darwin-64bit or --enable-m64-build) and --enable-m32-build are mutually exclusive]) ;
+ fi ;
+ enable_m32_build=yes ;;
+ esac
+],enable_m32_build=no)
+
dnl OK, we might have darwin switches off different kinds, lets
dnl check it all before continuing.
TMPSYS=`uname -s`-`uname -m`
@@ -315,6 +328,13 @@ if test X${enable_m64_build} = Xyes; then
LDFLAGS="-m64 $LDFLAGS"
export LDFLAGS
fi
+if test X${enable_m32_build} = Xyes; then
+ enable_hipe=no
+ CFLAGS="-m32 $CFLAGS"
+ export CFLAGS
+ LDFLAGS="-m32 $LDFLAGS"
+ export LDFLAGS
+fi
export ERL_TOP
AC_CONFIG_SUBDIRS(lib erts)
diff --git a/erts/configure.in b/erts/configure.in
index a3b6fe319f..5fa1245b13 100644
--- a/erts/configure.in
+++ b/erts/configure.in
@@ -226,6 +226,19 @@ AC_ARG_ENABLE(m64-build,
esac
],enable_m64_build=no)
+AC_ARG_ENABLE(m32-build,
+[ --enable-m32-build build 32bit binaries using the -m32 flag to (g)cc],
+[ case "$enableval" in
+ no) enable_m32_build=no ;;
+ *)
+ if test X${enable_darwin_64bit} = Xyes -o X${enable_m64_build} = Xyes;
+ then
+ AC_MSG_ERROR([(--enable-darwin-64bit or --enable-m64-build) and --enable-m32-build are mutually exclusive]) ;
+ fi ;
+ enable_m32_build=yes ;;
+ esac
+],enable_m32_build=no)
+
AC_ARG_ENABLE(fixalloc,
[ --disable-fixalloc disable the use of fix_alloc])
if test x${enable_fixalloc} = xno ; then
@@ -335,6 +348,17 @@ else
esac
;;
*)
+ if test X${enable_m32_build} = Xyes;
+ then
+ enable_hipe=no;
+ case $CFLAGS in
+ *-m32*)
+ ;;
+ *)
+ CFLAGS="-m32 $CFLAGS"
+ ;;
+ esac ;
+ fi
;;
esac
fi
@@ -432,6 +456,35 @@ CFLAGS="$CFLAGS $extra_flags"
DEBUG_CFLAGS="-g $CPPFLAGS $extra_flags"
DEBUG_FLAGS=-g
+dnl
+dnl Adjust DEBUG_CFLAGS to match CFLAGS in terms of -m
+dnl
+
+case $CFLAGS in
+ *-m64*)
+ case $DEBUG_CFLAGS in
+ *-m64*)
+ ;;
+ *)
+ DEBUG_CFLAGS="-m64 $DEBUG_CFLAGS"
+ ;;
+ esac
+ ;;
+ *-m32*)
+ case $DEBUG_CFLAGS in
+ *-m32*)
+ ;;
+ *)
+ DEBUG_CFLAGS="-m32 $DEBUG_CFLAGS"
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+esac
+
+
+
CFLAG_RUNTIME_LIBRARY_PATH="-Wl,-R"
case $host_os in
darwin*)
@@ -664,6 +717,16 @@ case $ARCH-$OPSYS in
LDFLAGS="-m64 $LDFLAGS"
;;
esac
+ fi;
+ if test X${enable_m32_build} = Xyes; then
+ AC_MSG_NOTICE([Adjusting LDFLAGS to use -m32]) ;
+ case $LDFLAGS in
+ *-m32*)
+ ;;
+ *)
+ LDFLAGS="-m32 $LDFLAGS"
+ ;;
+ esac ;
fi
;;
esac
@@ -1378,7 +1441,7 @@ AC_CHECK_HEADER(sys/devpoll.h, have_kernel_poll=/dev/poll)
dnl Check for kernel SCTP support
AC_SUBST(LIBSCTP)
-if test "x$enable_sctp" == "xyes" ; then
+if test "x$enable_sctp" = "xyes" ; then
AC_CHECK_HEADER(netinet/sctp.h,
[LIBSCTP=libsctp.so.1
AC_DEFINE(HAVE_SCTP_H, [1],
@@ -3220,6 +3283,9 @@ case $host_os in
DED_LDFLAGS="-shared -Wl,-Bsymbolic"
if test X${enable_m64_build} = Xyes; then
DED_LDFLAGS="-m64 $DED_LDFLAGS"
+ fi;
+ if test X${enable_m32_build} = Xyes; then
+ DED_LDFLAGS="-m32 $DED_LDFLAGS"
fi
;;
freebsd*)
@@ -3228,6 +3294,9 @@ case $host_os in
DED_LDFLAGS="-shared"
if test X${enable_m64_build} = Xyes; then
DED_LDFLAGS="-m64 $DED_LDFLAGS"
+ fi;
+ if test X${enable_m32_build} = Xyes; then
+ DED_LDFLAGS="-m32 $DED_LDFLAGS"
fi
;;
osf*)
diff --git a/erts/doc/src/alt_dist.xml b/erts/doc/src/alt_dist.xml
index 9a68b3cf40..a929aec97f 100644
--- a/erts/doc/src/alt_dist.xml
+++ b/erts/doc/src/alt_dist.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>2000</year><year>2009</year>
+ <year>2000</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>How to implement an alternative carrier for the Erlang distribution</title>
@@ -939,7 +939,7 @@
connection that is not functioning.</item>
<item>'R': Get creation number of listen socket, which is used to
dig out the number stored in the lock file to differentiate
- between invocations of Erlang nodes with the same name.\011 </item>
+ between invocations of Erlang nodes with the same name.</item>
</list>
<p>The control interface gets a buffer to return its value in,
but is free to allocate it's own buffer is the provided one is
@@ -949,11 +949,11 @@
( 2) char* buf, int count, char** res, int res_size)
( 3) {
( 4) /* Local macro to ensure large enough buffer. */
-( 5) #define ENSURE(N) \\
-( 6) do { \\
-( 7) if (res_size < N) { \\
-( 8) *res = ALLOC(N); \\
-( 9) } \\
+( 5) #define ENSURE(N) \
+( 6) do { \
+( 7) if (res_size < N) { \
+( 8) *res = ALLOC(N); \
+( 9) } \
(10) } while(0)
(11) UdsData *ud = (UdsData *) handle;
@@ -1075,7 +1075,7 @@ Eshell V5.0 (abort with ^G)
(bing@hador)2></pre>
<p>...</p>
<pre>
-$ <input>erl -pa $ERL_TOP/lib/kernel/examples/uds_dist/ebin -proto_dist uds \\ </input>
+$ <input>erl -pa $ERL_TOP/lib/kernel/examples/uds_dist/ebin -proto_dist uds \ </input>
<input> -no_epmd -sname bong</input>
Erlang (BEAM) emulator version 5.0
@@ -1084,7 +1084,7 @@ Eshell V5.0 (abort with ^G)
<p>One can utilize the ERL_FLAGS environment variable to store the
complicated parameters in:</p>
<pre>
-$ <input>ERL_FLAGS=-pa $ERL_TOP/lib/kernel/examples/uds_dist/ebin \\ </input>
+$ <input>ERL_FLAGS=-pa $ERL_TOP/lib/kernel/examples/uds_dist/ebin \ </input>
<input> -proto_dist uds -no_epmd</input>
$ <input>export ERL_FLAGS</input>
$ <input>erl -sname bang</input>
diff --git a/erts/doc/src/crash_dump.xml b/erts/doc/src/crash_dump.xml
index 5182929358..b3c4671c3d 100644
--- a/erts/doc/src/crash_dump.xml
+++ b/erts/doc/src/crash_dump.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>How to interpret the Erlang crash dumps</title>
@@ -96,7 +96,7 @@
allocators see
<seealso marker="erts_alloc">erts_alloc(3)</seealso>.</item>
<item>"<em>&lt;A&gt;</em>: Cannot reallocate <em>&lt;N&gt;</em>
- bytes of memory\011(of type "<em>&lt;T&gt;</em>")." - Same as
+ bytes of memory (of type "<em>&lt;T&gt;</em>")." - Same as
above with the exception that memory was being reallocated
instead of being allocated when the system ran out of memory.</item>
<item>"Unexpected op code <em>N</em>" - Error in compiled
diff --git a/erts/doc/src/driver.xml b/erts/doc/src/driver.xml
index c396ee0b90..12c79aee90 100644
--- a/erts/doc/src/driver.xml
+++ b/erts/doc/src/driver.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>How to implement a driver</title>
@@ -510,11 +510,11 @@ static int do_select(const char* s, our_data_t* data)
PGconn* conn = data->conn;
/* if there's an error return it now */
if (PQsendQuery(conn, s) == 0) {
-\011ei_x_buff x;
-\011ei_x_new_with_version(&x);
-\011encode_error(&x, conn);
-\011driver_output(data->port, x.buff, x.index);
-\011ei_x_free(&x);
+ ei_x_buff x;
+ ei_x_new_with_version(&x);
+ encode_error(&x, conn);
+ driver_output(data->port, x.buff, x.index);
+ ei_x_free(&x);
}
/* else wait for ready_output to get results */
return 0;
@@ -532,31 +532,31 @@ static void ready_io(ErlDrvData drv_data, ErlDrvEvent event)
ei_x_buff x;
ei_x_new_with_version(&x);
if (data->connecting) {
-\011ConnStatusType status;
-\011PQconnectPoll(conn);
-\011status = PQstatus(conn);
-\011if (status == CONNECTION_OK)
-\011 encode_ok(&x);
-\011else if (status == CONNECTION_BAD)
-\011 encode_error(&x, conn);
+ ConnStatusType status;
+ PQconnectPoll(conn);
+ status = PQstatus(conn);
+ if (status == CONNECTION_OK)
+ encode_ok(&x);
+ else if (status == CONNECTION_BAD)
+ encode_error(&x, conn);
} else {
-\011PQconsumeInput(conn);
-\011if (PQisBusy(conn))
-\011 return;
-\011res = PQgetResult(conn);
-\011encode_result(&x, res, conn);
-\011PQclear(res);
-\011for (;;) {
-\011 res = PQgetResult(conn);
-\011 if (res == NULL)
-\011\011break;
-\011 PQclear(res);
-\011}
+ PQconsumeInput(conn);
+ if (PQisBusy(conn))
+ return;
+ res = PQgetResult(conn);
+ encode_result(&x, res, conn);
+ PQclear(res);
+ for (;;) {
+ res = PQgetResult(conn);
+ if (res == NULL)
+ break;
+ PQclear(res);
+ }
}
if (x.index > 1) {
-\011driver_output(data->port, x.buff, x.index);
-\011if (data->connecting)
-\011 driver_select(data->port, (ErlDrvEvent)data->socket, DO_WRITE, 0);
+ driver_output(data->port, x.buff, x.index);
+ if (data->connecting)
+ driver_select(data->port, (ErlDrvEvent)data->socket, DO_WRITE, 0);
}
ei_x_free(&x);
}
@@ -592,17 +592,17 @@ static void ready_io(ErlDrvData drv_data, ErlDrvEvent event)
connect(ConnectStr) ->
case erl_ddll:load_driver(".", "pg_async") of
-\011ok -> ok;
-\011{error, already_loaded} -> ok;
-\011_ -> exit({error, could_not_load_driver})
+ ok -> ok;
+ {error, already_loaded} -> ok;
+ _ -> exit({error, could_not_load_driver})
end,
Port = open_port({spawn, ?MODULE}, [binary]),
port_control(Port, ?DRV_CONNECT, ConnectStr),
case return_port_data(Port) of
-\011ok ->
-\011 {ok, Port};
-\011Error ->
-\011 Error
+ ok ->
+ {ok, Port};
+ Error ->
+ Error
end.
disconnect(Port) ->
@@ -617,8 +617,8 @@ select(Port, Query) ->
return_port_data(Port) ->
receive
-\011{Port, {data, Data}} ->
-\011 binary_to_term(Data)
+ {Port, {data, Data}} ->
+ binary_to_term(Data)
end.
]]></code>
<p>The Erlang code is slightly different, this is because we
@@ -662,22 +662,22 @@ return_port_data(Port) ->
call-back <c><![CDATA[ready_async]]></c>.</p>
<code type="none"><![CDATA[
static ErlDrvEntry next_perm_driver_entry = {
- NULL,\011\011\011/* init */
+ NULL, /* init */
start,
- NULL, \011\011\011/* stop */
- output,\011\011\011
- NULL,\011\011\011/* ready_input */
- NULL,\011\011\011/* ready_output */
- "next_perm", /* the name of the driver */
- NULL,\011\011\011/* finish */
- NULL,\011\011\011/* handle */
- NULL,\011\011\011/* control */
- NULL,\011\011\011/* timeout */
- NULL,\011\011\011/* outputv */
+ NULL, /* stop */
+ output,
+ NULL, /* ready_input */
+ NULL, /* ready_output */
+ "next_perm", /* the name of the driver */
+ NULL, /* finish */
+ NULL, /* handle */
+ NULL, /* control */
+ NULL, /* timeout */
+ NULL, /* outputv */
ready_async,
- NULL,\011\011\011/* flush */
- NULL,\011\011\011/* call */
- NULL\011\011\011/* event */
+ NULL, /* flush */
+ NULL, /* call */
+ NULL /* event */
};
]]></code>
<p>The <c><![CDATA[output]]></c> function allocates the work-area of the
@@ -699,7 +699,7 @@ struct our_async_data {
};
our_async_data::our_async_data(ErlDrvPort p, int command,
-\011\011\011 const char* buf, int len)
+ const char* buf, int len)
: prev(command == 2),
data((int*)buf, (int*)buf + len / sizeof(int))
{
@@ -722,9 +722,9 @@ static void do_perm(void* async_data)
{
our_async_data* d = reinterpret_cast<our_async_data*>(async_data);
if (d->prev)
-\011prev_permutation(d->data.begin(), d->data.end());
+ prev_permutation(d->data.begin(), d->data.end());
else
-\011next_permutation(d->data.begin(), d->data.end());
+ next_permutation(d->data.begin(), d->data.end());
}
]]></code>
<p>In the <c><![CDATA[ready_async]]></c> function, the output is sent back to the
@@ -742,9 +742,9 @@ static void ready_async(ErlDrvData drv_data, ErlDrvThreadData async_data)
int n = d->data.size(), result_n = n*2 + 3;
ErlDrvTermData* result = new ErlDrvTermData[result_n], * rp = result;
for (vector<int>::iterator i = d->data.begin();
-\011 i != d->data.end(); ++i) {
-\011*rp++ = ERL_DRV_INT;
-\011*rp++ = *i;
+ i != d->data.end(); ++i) {
+ *rp++ = ERL_DRV_INT;
+ *rp++ = *i;
}
*rp++ = ERL_DRV_NIL;
*rp++ = ERL_DRV_LIST;
@@ -767,16 +767,16 @@ static void ready_async(ErlDrvData drv_data, ErlDrvThreadData async_data)
load() ->
case whereis(next_perm) of
-\011undefined ->
-\011 case erl_ddll:load_driver(".", "next_perm") of
-\011\011ok -> ok;
-\011\011{error, already_loaded} -> ok;
-\011\011E -> exit(E)
-\011 end,
-\011 Port = open_port({spawn, "next_perm"}, []),
-\011 register(next_perm, Port);
-\011_ ->
-\011 ok
+ undefined ->
+ case erl_ddll:load_driver(".", "next_perm") of
+ ok -> ok;
+ {error, already_loaded} -> ok;
+ E -> exit(E)
+ end,
+ Port = open_port({spawn, "next_perm"}, []),
+ register(next_perm, Port);
+ _ ->
+ ok
end.
list_to_integer_binaries(L) ->
@@ -793,8 +793,8 @@ next_perm(L, Nxt) ->
B = list_to_integer_binaries(L),
port_control(next_perm, Nxt, B),
receive
-\011Result ->
-\011 Result
+ Result ->
+ Result
end.
all_perm(L) ->
diff --git a/erts/doc/src/driver_entry.xml b/erts/doc/src/driver_entry.xml
index 6b7d2acf24..e71b48bd92 100644
--- a/erts/doc/src/driver_entry.xml
+++ b/erts/doc/src/driver_entry.xml
@@ -4,7 +4,7 @@
<cref>
<header>
<copyright>
- <year>2001</year><year>2009</year>
+ <year>2001</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>driver_entry</title>
@@ -188,7 +188,7 @@ typedef struct erl_drv_entry {
<p>This is called when the port is closed, with
<c>port_close/1</c> or <c>Port ! {self(), close}</c>. Note
that terminating the port owner process also closes the
- p\011 port.</p>
+ port.</p>
</item>
<tag><marker id="output"/>void (*output)(ErlDrvData drv_data, char *buf, int len)</tag>
<item>
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index 207aabca35..8e2c02e0ce 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -774,10 +774,10 @@ false</pre>
erlang:demonitor(MonitorRef),
receive
-\011{_, MonitorRef, _, _, _} ->
-\011 true
+ {_, MonitorRef, _, _, _} ->
+ true
after 0 ->
-\011 true
+ true
end</code>
</item>
<tag><c>info</c></tag>
@@ -2325,13 +2325,13 @@ os_prompt%</pre>
other. Values beginning with an uppercase letter is not part
of the result.</p>
<code type="none">
-\011total = processes + system
-\011processes = processes_used + ProcessesNotUsed
-\011system = atom + binary + code + ets + OtherSystem
-\011atom = atom_used + AtomNotUsed
+ total = processes + system
+ processes = processes_used + ProcessesNotUsed
+ system = atom + binary + code + ets + OtherSystem
+ atom = atom_used + AtomNotUsed
-\011RealTotal = processes + RealSystem
-\011RealSystem = system + MissedSystem</code>
+ RealTotal = processes + RealSystem
+ RealSystem = system + MissedSystem</code>
<p>More tuples in the returned list may be added in the future.</p>
<note>
<p>The <c>total</c> value is supposed to be the total amount
@@ -6965,10 +6965,10 @@ true</pre>
unlink(Id),
receive
-\011{'EXIT', Id, _} ->
-\011 true
+ {'EXIT', Id, _} ->
+ true
after 0 ->
-\011 true
+ true
end</code>
<note>
<p>Prior to OTP release R11B (erts version 5.5) <c>unlink/1</c>
diff --git a/erts/doc/src/erlsrv.xml b/erts/doc/src/erlsrv.xml
index 93db56fc7c..0dfad2a112 100644
--- a/erts/doc/src/erlsrv.xml
+++ b/erts/doc/src/erlsrv.xml
@@ -4,7 +4,7 @@
<comref>
<header>
<copyright>
- <year>1998</year><year>2009</year>
+ <year>1998</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>erlsrv</title>
@@ -251,7 +251,7 @@
necessarily the same as the interactive users. The service
runs as the local administrator. All arguments should be given
together in one string, use double quotes (") to give an
- argument string containing spaces and use quoted quotes (\\")
+ argument string containing spaces and use quoted quotes (\")
to give an quote within the argument string if
necessary.</item>
<tag>-i[nternalservicename] [&lt;internal name&gt;]</tag>
@@ -356,7 +356,7 @@ The environment of an Erlang machine started
*/
BOOL WINAPI service_aware_handler(DWORD ctrl){
if(ctrl == CTRL_LOGOFF_EVENT)
-\011return TRUE;
+ return TRUE;
return FALSE;
}
@@ -368,10 +368,10 @@ void initialize_handler(void){
*/
if(GetEnvironmentVariable("ERLSRV_SERVICE_NAME",buffer,
(DWORD) 2)){
-\011/*
-\011** Actually set the control handler
-\011*/
-\011SetConsoleCtrlHandler(&service_aware_handler, TRUE);
+ /*
+ ** Actually set the control handler
+ */
+ SetConsoleCtrlHandler(&service_aware_handler, TRUE);
}
} ]]></code>
</section>
@@ -388,8 +388,8 @@ void initialize_handler(void){
the runtime system should not need to overwrite existing (and probably
used) executables.</p>
<p>To easily manipulate the Erlang services, put
- the <c><![CDATA[<erlang_root>\\erts-<version>\\bin]]></c> directory in
- the path instead of <c><![CDATA[<erlang_root>\\bin]]></c>. The erlsrv program
+ the <c><![CDATA[<erlang_root>\erts-<version>\bin]]></c> directory in
+ the path instead of <c><![CDATA[<erlang_root>\bin]]></c>. The erlsrv program
can be found from inside Erlang by using the
<c><![CDATA[os:find_executable/1]]></c> Erlang function.</p>
<p>For release handling to work, use <c><![CDATA[start_erl]]></c> as the Erlang
diff --git a/erts/doc/src/escript.xml b/erts/doc/src/escript.xml
index 8df179b3e2..a89449df23 100644
--- a/erts/doc/src/escript.xml
+++ b/erts/doc/src/escript.xml
@@ -4,7 +4,7 @@
<comref>
<header>
<copyright>
- <year>2007</year><year>2009</year>
+ <year>2007</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>escript</title>
@@ -50,20 +50,18 @@ $ <input>cat factorial</input>
%%! -smp enable -sname factorial -mnesia debug verbose
main([String]) ->
try
-\011N = list_to_integer(String),
-\011F = fac(N),
-\011io:format("factorial ~w = ~w\
-", [N,F])
+ N = list_to_integer(String),
+ F = fac(N),
+ io:format("factorial ~w = ~w\n", [N,F])
catch
-\011_:_ ->
-\011 usage()
+ _:_ ->
+ usage()
end;
main(_) ->
usage().
usage() ->
- io:format("usage: factorial integer\
-"),
+ io:format("usage: factorial integer\n"),
halt(1).
fac(0) -> 1;
diff --git a/erts/doc/src/inet_cfg.xml b/erts/doc/src/inet_cfg.xml
index 18cf65759a..2a033c037c 100644
--- a/erts/doc/src/inet_cfg.xml
+++ b/erts/doc/src/inet_cfg.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>2004</year><year>2009</year>
+ <year>2004</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>Inet configuration</title>
@@ -230,6 +230,13 @@
(use the Erlang DNS client
<seealso marker="kernel:inet_res">inet_res</seealso>
for nameserver queries).</p>
+ <p>The lookup method <c><![CDATA[string]]></c> tries to
+ parse the hostname as a IPv4 or IPv6 string and return
+ the resulting IP address. It is automatically tried
+ first when <c><![CDATA[native]]></c> is <em>not</em>
+ in the <c><![CDATA[Methods]]></c> list. To skip it in this case
+ the pseudo lookup method <c><![CDATA[nostring]]></c> can be
+ inserted anywhere in the <c><![CDATA[Methods]]></c> list.</p>
<p></p>
</item>
<tag><em><c><![CDATA[{cache_size, Size}.]]></c></em></tag>
diff --git a/erts/doc/src/match_spec.xml b/erts/doc/src/match_spec.xml
index 26480473d2..b9f955e4db 100644
--- a/erts/doc/src/match_spec.xml
+++ b/erts/doc/src/match_spec.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>1999</year><year>2009</year>
+ <year>1999</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>Match specifications in Erlang</title>
@@ -360,52 +360,52 @@
</p>
<table>
<row>
- <cell align="left" valign="middle">Expression\011\011</cell>
- <cell align="left" valign="middle">Variable bindings\011\011</cell>
- <cell align="left" valign="middle">Result\011</cell>
+ <cell align="left" valign="middle">Expression </cell>
+ <cell align="left" valign="middle">Variable bindings </cell>
+ <cell align="left" valign="middle">Result </cell>
</row>
<row>
- <cell align="left" valign="middle">{{'$1','$2'}}\011\011</cell>
+ <cell align="left" valign="middle">{{'$1','$2'}} </cell>
<cell align="left" valign="middle">'$1' = a, '$2' = b</cell>
<cell align="left" valign="middle">{a,b}</cell>
</row>
<row>
- <cell align="left" valign="middle">{const, {'$1', '$2'}}\011</cell>
+ <cell align="left" valign="middle">{const, {'$1', '$2'}} </cell>
<cell align="left" valign="middle">doesn't matter</cell>
<cell align="left" valign="middle">{'$1', '$2'}</cell>
</row>
<row>
- <cell align="left" valign="middle">a\011\011\011</cell>
- <cell align="left" valign="middle">doesn't matter\011\011\011</cell>
+ <cell align="left" valign="middle">a </cell>
+ <cell align="left" valign="middle">doesn't matter </cell>
<cell align="left" valign="middle">a</cell>
</row>
<row>
- <cell align="left" valign="middle">'$1'\011\011\011</cell>
- <cell align="left" valign="middle">'$1' = []\011\011\011</cell>
+ <cell align="left" valign="middle">'$1' </cell>
+ <cell align="left" valign="middle">'$1' = [] </cell>
<cell align="left" valign="middle">[]</cell>
</row>
<row>
- <cell align="left" valign="middle">['$1']\011\011\011</cell>
- <cell align="left" valign="middle">'$1' = []\011\011\011</cell>
+ <cell align="left" valign="middle">['$1'] </cell>
+ <cell align="left" valign="middle">'$1' = [] </cell>
<cell align="left" valign="middle">[[]]</cell>
</row>
<row>
- <cell align="left" valign="middle">[{{a}}]\011\011\011</cell>
+ <cell align="left" valign="middle">[{{a}}] </cell>
<cell align="left" valign="middle">doesn't matter</cell>
<cell align="left" valign="middle">[{a}]</cell>
</row>
<row>
- <cell align="left" valign="middle">42\011\011\011</cell>
+ <cell align="left" valign="middle">42 </cell>
<cell align="left" valign="middle">doesn't matter</cell>
<cell align="left" valign="middle">42</cell>
</row>
<row>
- <cell align="left" valign="middle">"hello"\011\011\011</cell>
+ <cell align="left" valign="middle">"hello" </cell>
<cell align="left" valign="middle">doesn't matter</cell>
<cell align="left" valign="middle">"hello"</cell>
</row>
<row>
- <cell align="left" valign="middle">$1\011\011\011</cell>
+ <cell align="left" valign="middle">$1 </cell>
<cell align="left" valign="middle">doesn't matter</cell>
<cell align="left" valign="middle">49 (the ASCII value for the character '1')</cell>
</row>
@@ -507,8 +507,8 @@
a list which in turn begins with the second argument times
two (i. e. [{[4,x],y},2] or [{[8], y, z},4])</p>
<code type="none"><![CDATA[
-[{['$1', '$2'],\011[{'=:=', {'*', 2, '$2'}, {hd, {element, 1, '$1'}}}],
- []}]\011
+[{['$1', '$2'],[{'=:=', {'*', 2, '$2'}, {hd, {element, 1, '$1'}}}],
+ []}]
]]></code>
<p>Match three arguments. When all three are equal and are
numbers, append the process dump to the trace message, else
diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml
index 5fe414841e..70f2d95103 100644
--- a/erts/doc/src/notes.xml
+++ b/erts/doc/src/notes.xml
@@ -4371,16 +4371,16 @@
following code might hang:</p>
<code type="none"><![CDATA[
Mon = erlang:monitor(process, Pid),
-\011 %% ...
-\011 exit(Pid, bang),
+ %% ...
+ exit(Pid, bang),
erlang:demonitor(Mon),
-\011 receive
-\011 {'DOWN', Mon , process, Pid, _} -> ok
-\011 %% We were previously guaranteed to get a down message
-\011 %% (since we exited the process ourself), so we could
-\011 %% in this case leave out:
-\011 %% after 0 -> ok
-\011 end,
+ receive
+ {'DOWN', Mon , process, Pid, _} -> ok
+ %% We were previously guaranteed to get a down message
+ %% (since we exited the process ourself), so we could
+ %% in this case leave out:
+ %% after 0 -> ok
+ end,
]]></code>
<p>*** POTENTIAL INCOMPATIBILITY ***</p>
<p>Own Id: OTP-5772</p>
@@ -5342,7 +5342,7 @@
<list type="bulleted">
<item>
<p>If Erlang/OTP was installed in a short directory name,
- such as <c><![CDATA[C:\\Program\\erl5.4.2]]></c>, the emulator would not
+ such as <c><![CDATA[C:\Program\erl5.4.2]]></c>, the emulator would not
start.</p>
<p>Own Id: OTP-5254</p>
</item>
diff --git a/erts/doc/src/tty.xml b/erts/doc/src/tty.xml
index 23694e5965..7d662a2849 100644
--- a/erts/doc/src/tty.xml
+++ b/erts/doc/src/tty.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>tty - A command line interface</title>
@@ -47,7 +47,7 @@
<section>
<title>Normal Mode</title>
<p>In normal mode keystrokes from the user are collected and interpreted by <c><![CDATA[tty]]></c>. Most of the <em>emacs</em> line editing commands are supported. The following is a complete list of the supported line editing commands.<br></br></p>
- <p><em>Note:</em>\011The notation <c><![CDATA[C-a]]></c> means pressing the control key and the letter <c><![CDATA[a]]></c> simultaneously. <c><![CDATA[M-f]]></c> means pressing the <c><![CDATA[ESC]]></c> key followed by the letter <c><![CDATA[f]]></c>.
+ <p><em>Note:</em> The notation <c><![CDATA[C-a]]></c> means pressing the control key and the letter <c><![CDATA[a]]></c> simultaneously. <c><![CDATA[M-f]]></c> means pressing the <c><![CDATA[ESC]]></c> key followed by the letter <c><![CDATA[f]]></c>.
</p>
<table>
<row>
diff --git a/erts/doc/src/zlib.xml b/erts/doc/src/zlib.xml
index 9f39ac657a..b1e768bce9 100644
--- a/erts/doc/src/zlib.xml
+++ b/erts/doc/src/zlib.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>2005</year><year>2009</year>
+ <year>2005</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>zlib</title>
@@ -372,11 +372,11 @@ list_to_binary([B1,B2])</pre>
<pre>
unpack(Z, Compressed, Dict) ->
case catch zlib:inflate(Z, Compressed) of
-\011 {'EXIT',{{need_dictionary,DictID},_}} ->
- \011 zlib:inflateSetDictionary(Z, Dict),
-\011 Uncompressed = zlib:inflate(Z, []);
-\011 Uncompressed ->
-\011 Uncompressed
+ {'EXIT',{{need_dictionary,DictID},_}} ->
+ zlib:inflateSetDictionary(Z, Dict),
+ Uncompressed = zlib:inflate(Z, []);
+ Uncompressed ->
+ Uncompressed
end.</pre>
</desc>
</func>
@@ -466,8 +466,8 @@ unpack(Z, Compressed, Dict) ->
the required initial value for the crc.</p>
<pre>
Crc = lists:foldl(fun(Bin,Crc0) ->
-\011 zlib:crc32(Z, Crc0, Bin),
-\011 end, zlib:crc32(Z,&lt;&lt; &gt;&gt;), Bins)</pre>
+ zlib:crc32(Z, Crc0, Bin),
+ end, zlib:crc32(Z,&lt;&lt; &gt;&gt;), Bins)</pre>
</desc>
</func>
<func>
@@ -517,8 +517,8 @@ Crc = lists:foldl(fun(Bin,Crc0) ->
the required initial value for the checksum.</p>
<pre>
Crc = lists:foldl(fun(Bin,Crc0) ->
-\011 zlib:adler32(Z, Crc0, Bin),
-\011 end, zlib:adler32(Z,&lt;&lt; &gt;&gt;), Bins)</pre>
+ zlib:adler32(Z, Crc0, Bin),
+ end, zlib:adler32(Z,&lt;&lt; &gt;&gt;), Bins)</pre>
</desc>
</func>
<func>
diff --git a/erts/emulator/beam/erl_db.c b/erts/emulator/beam/erl_db.c
index e07a76835b..15b1c6bb56 100644
--- a/erts/emulator/beam/erl_db.c
+++ b/erts/emulator/beam/erl_db.c
@@ -1,19 +1,19 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 1996-2009. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 1996-2010. 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
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
+ *
* %CopyrightEnd%
*/
diff --git a/erts/emulator/beam/erl_db_hash.c b/erts/emulator/beam/erl_db_hash.c
index dbe13204d9..4141f9766b 100644
--- a/erts/emulator/beam/erl_db_hash.c
+++ b/erts/emulator/beam/erl_db_hash.c
@@ -1,19 +1,19 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 1998-2009. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 1998-2010. 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
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
+ *
* %CopyrightEnd%
*/
diff --git a/erts/emulator/beam/erl_lock_count.c b/erts/emulator/beam/erl_lock_count.c
index 32fddce38b..0d7e1335c1 100644
--- a/erts/emulator/beam/erl_lock_count.c
+++ b/erts/emulator/beam/erl_lock_count.c
@@ -1,19 +1,19 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 2008-2009. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 2008-2010. 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
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
+ *
* %CopyrightEnd%
*/
diff --git a/erts/emulator/beam/erl_lock_count.h b/erts/emulator/beam/erl_lock_count.h
index 86c85226e4..e3044c371f 100644
--- a/erts/emulator/beam/erl_lock_count.h
+++ b/erts/emulator/beam/erl_lock_count.h
@@ -1,19 +1,19 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 2008-2009. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 2008-2010. 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
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
+ *
* %CopyrightEnd%
*/
diff --git a/erts/emulator/beam/io.c b/erts/emulator/beam/io.c
index 34afe5656c..c5de180cb2 100644
--- a/erts/emulator/beam/io.c
+++ b/erts/emulator/beam/io.c
@@ -1,19 +1,19 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 1996-2009. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 1996-2010. 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
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
+ *
* %CopyrightEnd%
*/
diff --git a/erts/etc/common/escript.c b/erts/etc/common/escript.c
index ab37d4af46..1bc5eb7651 100644
--- a/erts/etc/common/escript.c
+++ b/erts/etc/common/escript.c
@@ -1,19 +1,19 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 2007-2009. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 2007-2010. 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
* compliance with the License. You should have received a copy of the
* Erlang Public License along with this software. If not, it can be
* retrieved online at http://www.erlang.org/.
- *
+ *
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
- *
+ *
* %CopyrightEnd%
*/
/*
@@ -199,9 +199,10 @@ find_prog(char *origpath)
continue;
} else {
/* Wow we found the executable. */
- strcpy(abspath, wildcard);
+ strcpy(relpath, wildcard);
FindClose(dir_handle);
- return strsave(abspath);
+ look_for_sep = FALSE;
+ break;
}
#else
dp = opendir(dir);
@@ -216,11 +217,12 @@ find_prog(char *origpath)
if (strcmp(origpath, dirp->d_name) == 0) {
/* Wow we found the executable. */
- strcpy(abspath, dir);
- strcat(abspath, DIRSEPSTR);
- strcat(abspath, dirp->d_name);
+ strcpy(relpath, dir);
+ strcat(relpath, DIRSEPSTR);
+ strcat(relpath, dirp->d_name);
closedir(dp);
- return strsave(abspath);
+ look_for_sep = FALSE;
+ break;
}
}
}
@@ -239,8 +241,8 @@ find_prog(char *origpath)
#else
if (!realpath(relpath, abspath)) {
#endif /* __WIN32__ */
- /* Cannot determine absolute path to escript. Try the relative. */
- return strsave(relpath);
+ /* Cannot determine absolute path to escript. Try the origin. */
+ return strsave(origpath);
} else {
return strsave(abspath);
}
@@ -373,11 +375,10 @@ main(int argc, char** argv)
if (strcmp(basename, "escript") == 0) {
#endif
/*
- * Push all options (without the hyphen) before the script name.
+ * Locate all options before the script name.
*/
while (argc > 1 && argv[1][0] == '-') {
- PUSH(argv[1]+1);
argc--;
argv++;
last_opt = argv;
@@ -402,6 +403,7 @@ main(int argc, char** argv)
scriptname[len-4] = '\0';
}
#endif
+
strcat(scriptname, ".escript");
}
@@ -418,7 +420,7 @@ main(int argc, char** argv)
PUSH3("-run", "escript", "start");
/*
- * Push all options (without the hyphen) before the script name.
+ * Push all options before the script name. But omit the leading hyphens.
*/
while (first_opt != last_opt) {
@@ -500,7 +502,7 @@ char *make_commandline(char **argv)
*(--p) = '\0';
if (debug) {
- printf("Processed commandline:%s\n",buff);
+ printf("Processed command line:%s\n",buff);
}
return buff;
}
diff --git a/erts/etc/unix/Install.src b/erts/etc/unix/Install.src
index 22357b057f..83f9690782 100644
--- a/erts/etc/unix/Install.src
+++ b/erts/etc/unix/Install.src
@@ -149,4 +149,4 @@ then
./misc/format_man_pages $ERL_ROOT
fi
-
+exit 0
diff --git a/lib/compiler/src/Makefile b/lib/compiler/src/Makefile
index fde2b1a655..70ddd54145 100644
--- a/lib/compiler/src/Makefile
+++ b/lib/compiler/src/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1996-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 1996-2010. 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
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
@@ -45,46 +45,46 @@ RELSYSDIR = $(RELEASE_PATH)/lib/compiler-$(VSN)
# Target Specs
# ----------------------------------------------------
MODULES = \
- compile \
- sys_pre_attributes \
- sys_pre_expand \
- sys_expand_pmod \
- v3_core \
- sys_core_fold \
- sys_core_inline \
- sys_core_dsetel \
- core_lib \
- core_scan \
- core_parse \
- core_lint \
- core_pp \
- v3_kernel \
- v3_kernel_pp \
- v3_life \
- v3_codegen \
+ beam_asm \
beam_block \
beam_bool \
- beam_dead \
- beam_jump \
- beam_type \
- beam_clean \
- beam_peep \
beam_bsm \
- beam_trim \
+ beam_clean \
+ beam_dead \
+ beam_dict \
+ beam_disasm \
beam_flatten \
+ beam_jump \
beam_listing \
- beam_asm \
- beam_dict \
beam_opcodes \
- beam_disasm \
+ beam_peep \
+ beam_trim \
+ beam_type \
beam_utils \
beam_validator \
- erl_bifs \
cerl \
cerl_clauses \
cerl_inline \
cerl_trees \
- rec_env
+ compile \
+ core_lib \
+ core_lint \
+ core_parse \
+ core_pp \
+ core_scan \
+ erl_bifs \
+ rec_env \
+ sys_core_dsetel \
+ sys_core_fold \
+ sys_core_inline \
+ sys_expand_pmod \
+ sys_pre_attributes \
+ sys_pre_expand \
+ v3_codegen \
+ v3_core \
+ v3_kernel \
+ v3_kernel_pp \
+ v3_life
BEAM_H = $(wildcard ../priv/beam_h/*.h)
@@ -114,6 +114,9 @@ APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
# FLAGS
# ----------------------------------------------------
+ifeq ($(NATIVE_LIBS_ENABLED),yes)
+ERL_COMPILE_FLAGS += +native
+endif
ERL_COMPILE_FLAGS += +inline +warn_unused_import -I../../stdlib/include -I$(EGEN) -W
# ----------------------------------------------------
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index d73c9cd762..b853800d73 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -1055,7 +1055,7 @@ test_native(#compile{options=Opts}) ->
is_native_enabled([native|_]) -> true;
is_native_enabled([no_native|_]) -> false;
-is_native_enabled([H|T]) -> is_native_enabled(T);
+is_native_enabled([_|Opts]) -> is_native_enabled(Opts);
is_native_enabled([]) -> false.
native_compile(#compile{code=none}=St) -> {ok,St};
diff --git a/lib/compiler/src/sys_pre_expand.erl b/lib/compiler/src/sys_pre_expand.erl
index 78dd73e0a2..f80d03dfac 100644
--- a/lib/compiler/src/sys_pre_expand.erl
+++ b/lib/compiler/src/sys_pre_expand.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1996-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
%% Purpose : Expand some source Erlang constructions. This is part of the
@@ -114,7 +114,7 @@ expand_pmod(Fs0, St0) ->
St1 = St0#expand{exports=Xs, defined=Ds},
{Fs2,St2} = add_instance(Ps, Fs1, St1),
{Fs3,St3} = ensure_new(Base, Ps0, Fs2, St2),
- {Fs3,St3#expand{attributes = [{abstract, [true]}
+ {Fs3,St3#expand{attributes = [{abstract, 0, [true]}
| St3#expand.attributes]}}
end.
@@ -173,7 +173,7 @@ define_functions(Forms, #expand{defined=Predef}=St) ->
St#expand{defined=ordsets:from_list(Fs)}.
module_attrs(St) ->
- {[{attribute,0,Name,Val} || {Name,Val} <- St#expand.attributes],St}.
+ {[{attribute,Line,Name,Val} || {Name,Line,Val} <- St#expand.attributes],St}.
module_predef_funcs(St) ->
PreDef = [{module_info,0},{module_info,1}],
@@ -197,8 +197,8 @@ module_predef_funcs(St) ->
forms([{attribute,_,file,_File}=F|Fs0], St0) ->
{Fs,St1} = forms(Fs0, St0),
{[F|Fs],St1};
-forms([{attribute,_,Name,Val}|Fs0], St0) ->
- St1 = attribute(Name, Val, St0),
+forms([{attribute,Line,Name,Val}|Fs0], St0) ->
+ St1 = attribute(Name, Val, Line, St0),
forms(Fs0, St1);
forms([{function,L,N,A,Cs}|Fs0], St0) ->
{Ff,St1} = function(L, N, A, Cs, St0),
@@ -207,30 +207,30 @@ forms([{function,L,N,A,Cs}|Fs0], St0) ->
forms([_|Fs], St) -> forms(Fs, St);
forms([], St) -> {[],St}.
-%% attribute(Attribute, Value, State) -> State'.
+%% attribute(Attribute, Value, Line, State) -> State'.
%% Process an attribute, this just affects the state.
-attribute(module, {Module, As}, St) ->
+attribute(module, {Module, As}, _L, St) ->
M = package_to_string(Module),
St#expand{module=list_to_atom(M),
- package = packages:strip_last(M),
+ package=packages:strip_last(M),
parameters=As};
-attribute(module, Module, St) ->
+attribute(module, Module, _L, St) ->
M = package_to_string(Module),
St#expand{module=list_to_atom(M),
- package = packages:strip_last(M)};
-attribute(export, Es, St) ->
+ package=packages:strip_last(M)};
+attribute(export, Es, _L, St) ->
St#expand{exports=union(from_list(Es), St#expand.exports)};
-attribute(import, Is, St) ->
+attribute(import, Is, _L, St) ->
import(Is, St);
-attribute(compile, C, St) when is_list(C) ->
+attribute(compile, C, _L, St) when is_list(C) ->
St#expand{compile=St#expand.compile ++ C};
-attribute(compile, C, St) ->
+attribute(compile, C, _L, St) ->
St#expand{compile=St#expand.compile ++ [C]};
-attribute(Name, Val, St) when is_list(Val) ->
- St#expand{attributes=St#expand.attributes ++ [{Name,Val}]};
-attribute(Name, Val, St) ->
- St#expand{attributes=St#expand.attributes ++ [{Name,[Val]}]}.
+attribute(Name, Val, Line, St) when is_list(Val) ->
+ St#expand{attributes=St#expand.attributes ++ [{Name,Line,Val}]};
+attribute(Name, Val, Line, St) ->
+ St#expand{attributes=St#expand.attributes ++ [{Name,Line,[Val]}]}.
function(L, N, A, Cs0, St0) ->
{Cs,St} = clauses(Cs0, St0#expand{func=N,arity=A,fcount=0}),
@@ -299,10 +299,10 @@ pattern({match,Line,Pat1, Pat2}, St0) ->
{TT,St2} = pattern(Pat1, St1),
{{match,Line,TT,TH},St2};
%% Compile-time pattern expressions, including unary operators.
-pattern({op,Line,Op,A}, St) ->
- {erl_eval:partial_eval({op,Line,Op,A}),St};
-pattern({op,Line,Op,L,R}, St) ->
- {erl_eval:partial_eval({op,Line,Op,L,R}),St}.
+pattern({op,_Line,_Op,_A}=Op, St) ->
+ {erl_eval:partial_eval(Op),St};
+pattern({op,_Line,_Op,_L,_R}=Op, St) ->
+ {erl_eval:partial_eval(Op),St}.
pattern_list([P0|Ps0], St0) ->
{P,St1} = pattern(P0, St0),
@@ -400,18 +400,18 @@ expr({'receive',Line,Cs0,To0,ToEs0}, St0) ->
{{'receive',Line,Cs,To,ToEs},St3};
expr({'fun',Line,Body}, St) ->
fun_tq(Line, Body, St);
-expr({call,Line,{atom,La,N},As0}, St0) ->
+expr({call,Line,{atom,La,N}=Atom,As0}, St0) ->
{As,St1} = expr_list(As0, St0),
Ar = length(As),
case erl_internal:bif(N, Ar) of
true ->
- {{call,Line,{remote,La,{atom,La,erlang},{atom,La,N}},As},St1};
+ {{call,Line,{remote,La,{atom,La,erlang},Atom},As},St1};
false ->
case imported(N, Ar, St1) of
{yes,Mod} ->
- {{call,Line,{remote,La,{atom,La,Mod},{atom,La,N}},As},St1};
+ {{call,Line,{remote,La,{atom,La,Mod},Atom},As},St1};
no ->
- {{call,Line,{atom,La,N},As},St1}
+ {{call,Line,Atom,As},St1}
end
end;
expr({call,Line,{record_field,_,_,_}=M,As0}, St0) ->
diff --git a/lib/compiler/src/v3_core.erl b/lib/compiler/src/v3_core.erl
index a39a3c538f..dfe15de4ff 100644
--- a/lib/compiler/src/v3_core.erl
+++ b/lib/compiler/src/v3_core.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1999-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1999-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
%% Purpose : Transform normal Erlang to Core Erlang
@@ -164,8 +164,8 @@ form({attribute,_,file,{File,_Line}}, {Fs,As,Es,Ws,_}, _Opts) ->
form({attribute,_,_,_}=F, {Fs,As,Es,Ws,File}, _Opts) ->
{Fs,[attribute(F)|As],Es,Ws,File}.
-attribute({attribute,_,Name,Val}) ->
- {#c_literal{val=Name},#c_literal{val=Val}}.
+attribute({attribute,Line,Name,Val}) ->
+ {#c_literal{val=Name, anno=[Line]}, #c_literal{val=Val, anno=[Line]}}.
function({function,_,Name,Arity,Cs0}, Es0, Ws0, File, Opts) ->
%%ok = io:fwrite("~p - ", [{Name,Arity}]),
diff --git a/lib/et/doc/src/fascicules.xml b/lib/et/doc/src/fascicules.xml
deleted file mode 100644
index 0678195e07..0000000000
--- a/lib/et/doc/src/fascicules.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
-
-<fascicules>
- <fascicule file="part" href="part_frame.html" entry="no">
- User's Guide
- </fascicule>
- <fascicule file="ref_man" href="ref_man_frame.html" entry="yes">
- Reference Manual
- </fascicule>
- <fascicule file="part_notes" href="part_notes_frame.html" entry="no">
- Release Notes
- </fascicule>
- <fascicule file="" href="../../../../doc/print.html" entry="no">
- Off-Print
- </fascicule>
-</fascicules>
-
diff --git a/lib/et/doc/src/files.mk b/lib/et/doc/src/files.mk
index 41964de892..41fffb83f1 100644
--- a/lib/et/doc/src/files.mk
+++ b/lib/et/doc/src/files.mk
@@ -26,8 +26,7 @@ XML_REF3_FILES = \
et_viewer.xml
XML_PART_FILES = \
- part.xml \
- part_notes.xml
+ part.xml
XML_CHAPTER_FILES = \
et_intro.xml \
diff --git a/lib/et/doc/src/part_notes.xml b/lib/et/doc/src/part_notes.xml
deleted file mode 100644
index 00b3d9df23..0000000000
--- a/lib/et/doc/src/part_notes.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE part SYSTEM "part.dtd">
-
-<part xmlns:xi="http://www.w3.org/2001/XInclude">
- <header>
- <copyright>
- <year>2002</year><year>2009</year>
- <holder>Ericsson AB. All Rights Reserved.</holder>
- </copyright>
- <legalnotice>
- 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
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- </legalnotice>
-
- <title>Event Tracer (ET) Release Notes</title>
- <prepared>H&aring;kan Mattsson</prepared>
- <docno></docno>
- <date></date>
- <rev>%VSN%</rev>
- </header>
- <description>
- <p>The Event Tracer (ET) uses the built-in trace mechanism in Erlang
- and provides tools for collection and graphical viewing of trace data.</p>
- </description>
- <xi:include href="notes.xml"/>
-</part>
-
diff --git a/lib/kernel/src/Makefile b/lib/kernel/src/Makefile
index cd011f09fe..9db6014a7d 100644
--- a/lib/kernel/src/Makefile
+++ b/lib/kernel/src/Makefile
@@ -143,6 +143,9 @@ APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
# FLAGS
# ----------------------------------------------------
+ifeq ($(NATIVE_LIBS_ENABLED),yes)
+ERL_COMPILE_FLAGS += +native
+endif
ERL_COMPILE_FLAGS += -I../include
# ----------------------------------------------------
diff --git a/lib/kernel/src/hipe_unified_loader.erl b/lib/kernel/src/hipe_unified_loader.erl
index 42eab67478..f289b8110d 100644
--- a/lib/kernel/src/hipe_unified_loader.erl
+++ b/lib/kernel/src/hipe_unified_loader.erl
@@ -96,14 +96,6 @@ load_hipe_modules() ->
%% code:load_file/1) and the atom `no_native' on failure.
load_native_code(Mod, Bin) when is_atom(Mod), is_binary(Bin) ->
- erlang:system_flag(multi_scheduling, block),
- try
- load_native_code_nosmp(Mod, Bin)
- after
- erlang:system_flag(multi_scheduling, unblock)
- end.
-
-load_native_code_nosmp(Mod, Bin) ->
Architecture = erlang:system_info(hipe_architecture),
try chunk_name(Architecture) of
ChunkTag ->
@@ -111,10 +103,15 @@ load_native_code_nosmp(Mod, Bin) ->
case code:get_chunk(Bin, ChunkTag) of
undefined -> no_native;
NativeCode when is_binary(NativeCode) ->
- OldReferencesToPatch = patch_to_emu_step1(Mod),
- case load_module(Mod, NativeCode, Bin, OldReferencesToPatch) of
- bad_crc -> no_native;
- Result -> Result
+ erlang:system_flag(multi_scheduling, block),
+ try
+ OldReferencesToPatch = patch_to_emu_step1(Mod),
+ case load_module(Mod, NativeCode, Bin, OldReferencesToPatch) of
+ bad_crc -> no_native;
+ Result -> Result
+ end
+ after
+ erlang:system_flag(multi_scheduling, unblock)
end
end
catch
@@ -128,17 +125,18 @@ load_native_code_nosmp(Mod, Bin) ->
-spec post_beam_load(atom()) -> 'ok'.
post_beam_load(Mod) when is_atom(Mod) ->
- erlang:system_flag(multi_scheduling, block),
- try
- post_beam_load_nosmp(Mod)
- after
- erlang:system_flag(multi_scheduling, unblock)
- end.
-
-post_beam_load_nosmp(Mod) ->
Architecture = erlang:system_info(hipe_architecture),
- try chunk_name(Architecture) of _ChunkTag -> patch_to_emu(Mod)
- catch _:_ -> ok
+ try chunk_name(Architecture) of
+ _ChunkTag ->
+ erlang:system_flag(multi_scheduling, block),
+ try
+ patch_to_emu(Mod)
+ after
+ erlang:system_flag(multi_scheduling, unblock)
+ end
+ catch
+ _:_ ->
+ ok
end.
%%========================================================================
diff --git a/lib/kernel/src/inet.erl b/lib/kernel/src/inet.erl
index b86aa1839e..eb503235d8 100644
--- a/lib/kernel/src/inet.erl
+++ b/lib/kernel/src/inet.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1997-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-module(inet).
@@ -45,6 +45,7 @@
%% resolve
-export([gethostbyname/1, gethostbyname/2, gethostbyname/3,
gethostbyname_tm/3]).
+-export([gethostbyname_string/2, gethostbyname_self/2]).
-export([gethostbyaddr/1, gethostbyaddr/2,
gethostbyaddr_tm/2]).
@@ -411,7 +412,17 @@ gethostbyname(Name,Family,Timeout) ->
Res.
gethostbyname_tm(Name,Family,Timer) ->
- gethostbyname_tm(Name,Family,Timer,inet_db:res_option(lookup)).
+ Opts0 = inet_db:res_option(lookup),
+ Opts =
+ case (lists:member(native, Opts0) orelse
+ lists:member(string, Opts0) orelse
+ lists:member(nostring, Opts0)) of
+ true ->
+ Opts0;
+ false ->
+ [string|Opts0]
+ end,
+ gethostbyname_tm(Name, Family, Timer, Opts).
-spec gethostbyaddr(Address :: string() | ip_address()) ->
@@ -850,75 +861,61 @@ getaddrs_tm(Address, Family, Timer) ->
%%
%% gethostbyname with option search
%%
-gethostbyname_tm(Name, Type, Timer, [dns | Opts]) ->
- Res = inet_res:gethostbyname_tm(Name, Type, Timer),
- case Res of
- {ok,_} -> Res;
- {error,timeout} -> Res;
- {error,formerr} -> {error,einval};
- {error,_} -> gethostbyname_tm(Name,Type,Timer,Opts)
- end;
-gethostbyname_tm(Name, Type, Timer, [file | Opts]) ->
- case inet_hosts:gethostbyname(Name, Type) of
- {error,formerr} -> {error,einval};
- {error,_} -> gethostbyname_tm(Name,Type,Timer,Opts);
- Result -> Result
- end;
-gethostbyname_tm(Name, Type, Timer, [yp | Opts]) ->
+gethostbyname_tm(Name, Type, Timer, [string|_]=Opts) ->
+ Result = gethostbyname_string(Name, Type),
+ gethostbyname_tm(Name, Type, Timer, Opts, Result);
+gethostbyname_tm(Name, Type, Timer, [dns|_]=Opts) ->
+ Result = inet_res:gethostbyname_tm(Name, Type, Timer),
+ gethostbyname_tm(Name, Type, Timer, Opts, Result);
+gethostbyname_tm(Name, Type, Timer, [file|_]=Opts) ->
+ Result = inet_hosts:gethostbyname(Name, Type),
+ gethostbyname_tm(Name, Type, Timer, Opts, Result);
+gethostbyname_tm(Name, Type, Timer, [yp|_]=Opts) ->
gethostbyname_tm_native(Name, Type, Timer, Opts);
-gethostbyname_tm(Name, Type, Timer, [nis | Opts]) ->
+gethostbyname_tm(Name, Type, Timer, [nis|_]=Opts) ->
gethostbyname_tm_native(Name, Type, Timer, Opts);
-gethostbyname_tm(Name, Type, Timer, [nisplus | Opts]) ->
+gethostbyname_tm(Name, Type, Timer, [nisplus|_]=Opts) ->
gethostbyname_tm_native(Name, Type, Timer, Opts);
-gethostbyname_tm(Name, Type, Timer, [wins | Opts]) ->
+gethostbyname_tm(Name, Type, Timer, [wins|_]=Opts) ->
gethostbyname_tm_native(Name, Type, Timer, Opts);
-gethostbyname_tm(Name, Type, Timer, [native | Opts]) ->
+gethostbyname_tm(Name, Type, Timer, [native|_]=Opts) ->
gethostbyname_tm_native(Name, Type, Timer, Opts);
-gethostbyname_tm(_, _, _, [no_default|_]) ->
- %% If the native resolver has failed, we should not bother
- %% to try to be smarter and parse the IP address here.
- {error,nxdomain};
-gethostbyname_tm(Name, Type, Timer, [_ | Opts]) ->
+gethostbyname_tm(Name, Type, Timer, [_|_]=Opts) ->
gethostbyname_tm(Name, Type, Timer, Opts);
-%% Last resort - parse the hostname as address
-gethostbyname_tm(Name, inet, _Timer, []) ->
- case inet_parse:ipv4_address(Name) of
- {ok,IP4} ->
- {ok,make_hostent(Name, [IP4], [], inet)};
- _ ->
- gethostbyname_self(Name)
- end;
-gethostbyname_tm(Name, inet6, _Timer, []) ->
- case inet_parse:ipv6_address(Name) of
- {ok,IP6} ->
- {ok,make_hostent(Name, [IP6], [], inet6)};
- _ ->
- %% Even if Name is a valid IPv4 address, we can't
- %% assume it's correct to return it on a IPv6
- %% format ( {0,0,0,0,0,16#ffff,?u16(A,B),?u16(C,D)} ).
- %% This host might not support IPv6.
- gethostbyname_self(Name)
+%% Make sure we always can look up our own hostname.
+gethostbyname_tm(Name, Type, Timer, []) ->
+ Result = gethostbyname_self(Name, Type),
+ gethostbyname_tm(Name, Type, Timer, [], Result).
+
+gethostbyname_tm(Name, Type, Timer, Opts, Result) ->
+ case Result of
+ {ok,_} ->
+ Result;
+ {error,formerr} ->
+ {error,einval};
+ {error,_} when Opts =:= [] ->
+ {error,nxdomain};
+ {error,_} ->
+ gethostbyname_tm(Name, Type, Timer, tl(Opts))
end.
gethostbyname_tm_native(Name, Type, Timer, Opts) ->
%% Fixme: add (global) timeout to gethost_native
- case inet_gethost_native:gethostbyname(Name, Type) of
- {error,formerr} -> {error,einval};
- {error,timeout} -> {error,timeout};
- {error,_} -> gethostbyname_tm(Name, Type, Timer, Opts++[no_default]);
- Result -> Result
- end.
+ Result = inet_gethost_native:gethostbyname(Name, Type),
+ gethostbyname_tm(Name, Type, Timer, Opts, Result).
-%% Make sure we always can look up our own hostname.
-gethostbyname_self(Name) ->
- Type = case inet_db:res_option(inet6) of
- true -> inet6;
- false -> inet
- end,
+
+
+gethostbyname_self(Name, Type) when is_atom(Name) ->
+ gethostbyname_self(atom_to_list(Name), Type);
+gethostbyname_self(Name, Type)
+ when is_list(Name), Type =:= inet;
+ is_list(Name), Type =:= inet6 ->
case inet_db:gethostname() of
Name ->
- {ok,make_hostent(Name, [translate_ip(loopback, Type)],
- [], Type)};
+ {ok,make_hostent(Name,
+ [translate_ip(loopback, Type)],
+ [], Type)};
Self ->
case inet_db:res_option(domain) of
"" -> {error,nxdomain};
@@ -931,7 +928,31 @@ gethostbyname_self(Name) ->
_ -> {error,nxdomain}
end
end
- end.
+ end;
+gethostbyname_self(_, _) ->
+ {error,formerr}.
+
+gethostbyname_string(Name, Type) when is_atom(Name) ->
+ gethostbyname_string(atom_to_list(Name), Type);
+gethostbyname_string(Name, Type)
+ when is_list(Name), Type =:= inet;
+ is_list(Name), Type =:= inet6 ->
+ case
+ case Type of
+ inet ->
+ inet_parse:ipv4_address(Name);
+ inet6 ->
+ %% XXX should we really translate IPv4 addresses here
+ %% even if we do not know if this host can do IPv6?
+ inet_parse:ipv6_address(Name)
+ end of
+ {ok,IP} ->
+ {ok,make_hostent(Name, [IP], [], Type)};
+ {error,einval} ->
+ {error,nxdomain}
+ end;
+gethostbyname_string(_, _) ->
+ {error,formerr}.
make_hostent(Name, Addrs, Aliases, Type) ->
#hostent{h_name = Name,
diff --git a/lib/kernel/src/inet_config.erl b/lib/kernel/src/inet_config.erl
index b5317f72f5..311e6bc9f9 100644
--- a/lib/kernel/src/inet_config.erl
+++ b/lib/kernel/src/inet_config.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1997-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-module(inet_config).
@@ -130,21 +130,25 @@ init() ->
{unix,_} ->
%% The Etc variable enables us to run tests with other
%% configuration files than the normal ones
- Etc = case os:getenv("ERL_INET_ETC_DIR") of
- false -> ?DEFAULT_ETC;
- _EtcDir ->
- _EtcDir
- end,
+ Etc =
+ case os:getenv("ERL_INET_ETC_DIR") of
+ false ->
+ ?DEFAULT_ETC;
+ _EtcDir ->
+ _EtcDir
+ end,
case inet_db:res_option(resolv_conf) of
undefined ->
- inet_db:set_resolv_conf(filename:join(Etc,
- ?DEFAULT_RESOLV));
+ inet_db:res_option(
+ resolv_conf_name,
+ filename:join(Etc, ?DEFAULT_RESOLV));
_ -> ok
end,
case inet_db:res_option(hosts_file) of
undefined ->
- inet_db:set_hosts_file(filename:join(Etc,
- ?DEFAULT_HOSTS));
+ inet_db:res_option(
+ hosts_file_name,
+ filename:join(Etc, ?DEFAULT_HOSTS));
_ -> ok
end;
_ -> ok
diff --git a/lib/kernel/src/inet_db.erl b/lib/kernel/src/inet_db.erl
index 211847014f..a05b380855 100644
--- a/lib/kernel/src/inet_db.erl
+++ b/lib/kernel/src/inet_db.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1997-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
@@ -425,7 +425,9 @@ res_optname(usevc) -> res_usevc;
res_optname(edns) -> res_edns;
res_optname(udp_payload_size) -> res_udp_payload_size;
res_optname(resolv_conf) -> res_resolv_conf;
+res_optname(resolv_conf_name) -> res_resolv_conf;
res_optname(hosts_file) -> res_hosts_file;
+res_optname(hosts_file_name) -> res_hosts_file;
res_optname(_) -> undefined.
res_check_option(nameserver, NSs) -> %% Legacy
@@ -458,9 +460,15 @@ res_check_option(udp_payload_size, S) when is_integer(S), S >= 512 -> true;
res_check_option(resolv_conf, "") -> true;
res_check_option(resolv_conf, F) ->
res_check_option_absfile(F);
+res_check_option(resolv_conf_name, "") -> true;
+res_check_option(resolv_conf_name, F) ->
+ res_check_option_absfile(F);
res_check_option(hosts_file, "") -> true;
res_check_option(hosts_file, F) ->
res_check_option_absfile(F);
+res_check_option(hosts_file_name, "") -> true;
+res_check_option(hosts_file_name, F) ->
+ res_check_option_absfile(F);
res_check_option(_, _) -> false.
res_check_option_absfile(F) ->
@@ -503,7 +511,7 @@ res_update_hosts() ->
res_update(res_hosts_file, res_hosts_file_tm, res_hosts_file_info,
set_hosts_file_tm, fun set_hosts_file/1).
-res_update(Tag, TagTm, TagInfo, CallTag, SetFun) ->
+res_update(Tag, TagTm, TagInfo, TagSetTm, SetFun) ->
case db_get(TagTm) of
undefined -> ok;
TM ->
@@ -522,12 +530,12 @@ res_update(Tag, TagTm, TagInfo, CallTag, SetFun) ->
atime = undefined},
case db_get(TagInfo) of
Finfo ->
- call({CallTag, Now});
+ call({TagSetTm, Now});
_ ->
SetFun(File)
end;
_ ->
- call({CallTag, Now}),
+ call({TagSetTm, Now}),
error
end
end;
@@ -974,37 +982,55 @@ handle_call(Request, From, #state{db=Db}=State) ->
{reply, error, State}
end;
+ {res_set, hosts_file_name=Option, Fname} ->
+ handle_set_file(
+ Option, Fname, res_hosts_file_tm, res_hosts_file_info,
+ undefined, From, State);
+ {res_set, resolv_conf_name=Option, Fname} ->
+ handle_set_file(
+ Option, Fname, res_resolv_conf_tm, res_resolv_conf_info,
+ undefined, From, State);
+
{res_set, hosts_file=Option, Fname} ->
- handle_set_file(Option, Fname,
- res_hosts_file_tm, res_hosts_file_info,
- fun (Bin) ->
- case inet_parse:hosts(Fname,
- {chars,Bin}) of
- {ok,Opts} ->
- [{load_hosts_file,Opts}];
- _ -> error
- end
- end,
- From, State);
+ handle_set_file(
+ Option, Fname, res_hosts_file_tm, res_hosts_file_info,
+ fun (Bin) ->
+ case inet_parse:hosts(
+ Fname, {chars,Bin}) of
+ {ok,Opts} ->
+ [{load_hosts_file,Opts}];
+ _ -> error
+ end
+ end,
+ From, State);
%%
{res_set, resolv_conf=Option, Fname} ->
- handle_set_file(Option, Fname,
- res_resolv_conf_tm, res_resolv_conf_info,
- fun (Bin) ->
- case inet_parse:resolv(Fname,
- {chars,Bin}) of
- {ok,Opts} ->
- [del_ns,
- clear_search,
- clear_cache
- |[Opt ||
- {T,_}=Opt <- Opts,
- (T =:= nameserver orelse
- T =:= search)]];
- _ -> error
- end
- end,
- From, State);
+ handle_set_file(
+ Option, Fname, res_resolv_conf_tm, res_resolv_conf_info,
+ fun (Bin) ->
+ case inet_parse:resolv(
+ Fname, {chars,Bin}) of
+ {ok,Opts} ->
+ Search =
+ lists:foldl(
+ fun ({search,L}, _) ->
+ L;
+ ({domain,""}, S) ->
+ S;
+ ({domain,D}, _) ->
+ [D];
+ (_, S) ->
+ S
+ end, [], Opts),
+ [del_ns,
+ clear_search,
+ clear_cache,
+ {search,Search}
+ |[Opt || {nameserver,_}=Opt <- Opts]];
+ _ -> error
+ end
+ end,
+ From, State);
%%
{res_set, Opt, Value} ->
case res_optname(Opt) of
@@ -1156,6 +1182,12 @@ handle_set_file(Option, Fname, TagTm, TagInfo, ParseFun, From,
ets:delete(Db, TagInfo),
ets:delete(Db, TagTm),
handle_set_file(ParseFun, <<>>, From, State);
+ true when ParseFun =:= undefined ->
+ File = filename:flatten(Fname),
+ ets:insert(Db, {res_optname(Option), File}),
+ ets:insert(Db, {TagInfo, undefined}),
+ ets:insert(Db, {TagTm, 0}),
+ {reply,ok,State};
true ->
File = filename:flatten(Fname),
ets:insert(Db, {res_optname(Option), File}),
@@ -1178,7 +1210,8 @@ handle_set_file(Option, Fname, TagTm, TagInfo, ParseFun, From,
handle_set_file(ParseFun, Bin, From, State) ->
case ParseFun(Bin) of
- error -> {reply,error,State};
+ error ->
+ {reply,error,State};
Opts ->
handle_rc_list(Opts, From, State)
end.
diff --git a/lib/kernel/src/inet_gethost_native.erl b/lib/kernel/src/inet_gethost_native.erl
index abdbe2b8cf..fabe9bf8b3 100644
--- a/lib/kernel/src/inet_gethost_native.erl
+++ b/lib/kernel/src/inet_gethost_native.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1998-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1998-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-module(inet_gethost_native).
@@ -443,19 +443,23 @@ gethostbyname(Name) ->
gethostbyname(Name, inet).
gethostbyname(Name, inet) when is_list(Name) ->
- getit(?OP_GETHOSTBYNAME, ?PROTO_IPV4, Name);
+ getit(?OP_GETHOSTBYNAME, ?PROTO_IPV4, Name, Name);
gethostbyname(Name, inet6) when is_list(Name) ->
- getit(?OP_GETHOSTBYNAME, ?PROTO_IPV6, Name);
+ getit(?OP_GETHOSTBYNAME, ?PROTO_IPV6, Name, Name);
gethostbyname(Name, Type) when is_atom(Name) ->
gethostbyname(atom_to_list(Name), Type);
gethostbyname(_, _) ->
{error, formerr}.
-gethostbyaddr({A,B,C,D}) when ?VALID_V4(A), ?VALID_V4(B), ?VALID_V4(C), ?VALID_V4(D) ->
- getit(?OP_GETHOSTBYADDR, ?PROTO_IPV4, <<A,B,C,D>>);
-gethostbyaddr({A,B,C,D,E,F,G,H}) when ?VALID_V6(A), ?VALID_V6(B), ?VALID_V6(C), ?VALID_V6(D),
- ?VALID_V6(E), ?VALID_V6(F), ?VALID_V6(G), ?VALID_V6(H) ->
- getit(?OP_GETHOSTBYADDR, ?PROTO_IPV6, <<A:16,B:16,C:16,D:16,E:16,F:16,G:16,H:16>>);
+gethostbyaddr({A,B,C,D}=Addr)
+ when ?VALID_V4(A), ?VALID_V4(B), ?VALID_V4(C), ?VALID_V4(D) ->
+ getit(?OP_GETHOSTBYADDR, ?PROTO_IPV4, <<A,B,C,D>>, Addr);
+gethostbyaddr({A,B,C,D,E,F,G,H}=Addr)
+ when ?VALID_V6(A), ?VALID_V6(B), ?VALID_V6(C), ?VALID_V6(D),
+ ?VALID_V6(E), ?VALID_V6(F), ?VALID_V6(G), ?VALID_V6(H) ->
+ getit
+ (?OP_GETHOSTBYADDR, ?PROTO_IPV6,
+ <<A:16,B:16,C:16,D:16,E:16,F:16,G:16,H:16>>, Addr);
gethostbyaddr(Addr) when is_list(Addr) ->
case inet_parse:address(Addr) of
{ok, IP} -> gethostbyaddr(IP);
@@ -466,30 +470,30 @@ gethostbyaddr(Addr) when is_atom(Addr) ->
gethostbyaddr(_) -> {error, formerr}.
control({debug_level, Level}) when is_integer(Level) ->
- getit(?OP_CONTROL, ?SETOPT_DEBUG_LEVEL, <<Level:32>>);
+ getit(?OP_CONTROL, ?SETOPT_DEBUG_LEVEL, <<Level:32>>, undefined);
control(soft_restart) ->
- getit(restart_port);
+ getit(restart_port, undefined);
control(_) -> {error, formerr}.
-getit(Op, Proto, Data) ->
- getit({Op, Proto, Data}).
+getit(Op, Proto, Data, DefaultName) ->
+ getit({Op, Proto, Data}, DefaultName).
-getit(Req) ->
+getit(Req, DefaultName) ->
Pid = ensure_started(),
Ref = make_ref(),
Pid ! {{self(),Ref}, Req},
receive
{Ref, {ok,BinHostent}} ->
- parse_address(BinHostent);
- {Ref, Error} ->
- Error
+ parse_address(BinHostent, DefaultName);
+ {Ref, Result} ->
+ Result
after 5000 ->
Ref2 = erlang:monitor(process,Pid),
Res2 = receive
{Ref, {ok,BinHostent}} ->
- parse_address(BinHostent);
- {Ref, Error} ->
- Error;
+ parse_address(BinHostent, DefaultName);
+ {Ref, Result} ->
+ Result;
{'DOWN', Ref2, process,
Pid, Reason} ->
{error, Reason}
@@ -546,21 +550,23 @@ ensure_started() ->
Pid
end.
-parse_address(BinHostent) ->
+parse_address(BinHostent, DefaultName) ->
case catch
begin
case BinHostent of
<<?UNIT_ERROR, Errstring/binary>> ->
{error, list_to_atom(listify(Errstring))};
<<?UNIT_IPV4, Naddr:32, T0/binary>> ->
- {T1,Addresses} = pick_addresses_v4(Naddr, T0),
- [Name | Names] = pick_names(T1),
+ {T1, Addresses} = pick_addresses_v4(Naddr, T0),
+ {Name, Names} =
+ expand_default_name(pick_names(T1), DefaultName),
{ok, #hostent{h_addr_list = Addresses, h_addrtype = inet,
h_aliases = Names, h_length = ?UNIT_IPV4,
h_name = Name}};
<<?UNIT_IPV6, Naddr:32, T0/binary>> ->
- {T1,Addresses} = pick_addresses_v6(Naddr, T0),
- [Name | Names] = pick_names(T1),
+ {T1, Addresses} = pick_addresses_v6(Naddr, T0),
+ {Name, Names} =
+ expand_default_name(pick_names(T1), DefaultName),
{ok, #hostent{h_addr_list = Addresses, h_addrtype = inet6,
h_aliases = Names, h_length = ?UNIT_IPV6,
h_name = Name}};
@@ -573,7 +579,15 @@ parse_address(BinHostent) ->
Normal ->
Normal
end.
-
+
+expand_default_name([], DefaultName) when is_list(DefaultName) ->
+ {DefaultName, []};
+expand_default_name([], DefaultName) when is_tuple(DefaultName) ->
+ {inet_parse:ntoa(DefaultName), []};
+expand_default_name([Name|Names], DefaultName)
+ when is_list(DefaultName); is_tuple(DefaultName) ->
+ {Name, Names}.
+
listify(Bin) ->
N = byte_size(Bin) - 1,
<<Bin2:N/binary, Ch>> = Bin,
diff --git a/lib/kernel/src/inet_parse.erl b/lib/kernel/src/inet_parse.erl
index 62d44fb723..3bd5fa0958 100644
--- a/lib/kernel/src/inet_parse.erl
+++ b/lib/kernel/src/inet_parse.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1997-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-module(inet_parse).
@@ -34,6 +34,7 @@
-export([nsswitch_conf/1, nsswitch_conf/2]).
-export([ipv4_address/1, ipv6_address/1]).
+-export([ipv4strict_address/1, ipv6strict_address/1]).
-export([address/1]).
-export([visible_string/1, domain/1]).
-export([ntoa/1, dots/1]).
@@ -456,17 +457,15 @@ is_dom2(_) ->
%%
-%% Test ipv4 address or ipv6 address
+%% Parse ipv4 address or ipv6 address
%% Return {ok, Address} | {error, Reason}
%%
address(Cs) when is_list(Cs) ->
case ipv4_address(Cs) of
- {ok,IP} -> {ok,IP};
+ {ok,IP} ->
+ {ok,IP};
_ ->
- case ipv6_address(Cs) of
- {ok, IP} -> {ok, IP};
- Error -> Error
- end
+ ipv6strict_address(Cs)
end;
address(_) ->
{error, einval}.
@@ -477,49 +476,145 @@ address(_) ->
%% d1.d2.d4
%% d1.d4
%% d4
+%% Any d may be octal, hexadecimal or decimal by C language standards.
+%% d4 fills all LSB bytes. This is legacy behaviour from Solaris
+%% and FreeBSD. And partly Linux that behave the same except
+%% it does not accept hexadecimal.
%%
%% Return {ok, IP} | {error, einval}
%%
ipv4_address(Cs) ->
- case catch ipv4_addr(Cs) of
- {'EXIT',_} -> {error,einval};
- Addr -> {ok,Addr}
+ try ipv4_addr(Cs) of
+ Addr ->
+ {ok,Addr}
+ catch
+ error:badarg ->
+ {error,einval}
end.
-ipv4_addr(Cs) ->
- ipv4_addr(d3(Cs), []).
+ipv4_addr(Cs) ->
+ case ipv4_addr(Cs, []) of
+ [D] when D < (1 bsl 32) ->
+ <<D1,D2,D3,D4>> = <<D:32>>,
+ {D1,D2,D3,D4};
+ [D,D1] when D < (1 bsl 24), D1 < 256 ->
+ <<D2,D3,D4>> = <<D:24>>,
+ {D1,D2,D3,D4};
+ [D,D2,D1] when D < (1 bsl 16), (D2 bor D1) < 256 ->
+ <<D3,D4>> = <<D:16>>,
+ {D1,D2,D3,D4};
+ [D4,D3,D2,D1] when (D4 bor D3 bor D2 bor D1) < 256 ->
+ {D1,D2,D3,D4};
+ _ ->
+ erlang:error(badarg)
+ end.
-ipv4_addr({Cs0,[]}, A) when length(A) =< 3 ->
- case [tod(Cs0)|A] of
- [D4,D3,D2,D1] ->
+ipv4_addr([_|_], [_,_,_,_]) ->
+ %% Early bailout for extra characters
+ erlang:error(badarg);
+ipv4_addr("0x"++Cs, Ds) ->
+ ipv4_addr(strip0(Cs), Ds, [], 16, 8);
+ipv4_addr("0X"++Cs, Ds) ->
+ ipv4_addr(strip0(Cs), Ds, [], 16, 8);
+ipv4_addr("0"++Cs, Ds) ->
+ ipv4_addr(strip0(Cs), Ds, [$0], 8, 11);
+ipv4_addr(Cs, Ds) when is_list(Cs) ->
+ ipv4_addr(Cs, Ds, [], 10, 10).
+
+ipv4_addr(Cs0, Ds, Rs, Base, N) ->
+ case ipv4_field(Cs0, N, Rs, Base) of
+ {D,""} ->
+ [D|Ds];
+ {D,[$.|[_|_]=Cs]} ->
+ ipv4_addr(Cs, [D|Ds]);
+ {_,_} ->
+ erlang:error(badarg)
+ end.
+
+strip0("0"++Cs) ->
+ strip0(Cs);
+strip0(Cs) when is_list(Cs) ->
+ Cs.
+
+
+%%
+%% Parse IPv4 strict dotted decimal address, no leading zeros:
+%% d1.d2.d3.d4
+%%
+%% Return {ok, IP} | {error, einval}
+%%
+ipv4strict_address(Cs) ->
+ try ipv4strict_addr(Cs) of
+ Addr ->
+ {ok,Addr}
+ catch
+ error:badarg ->
+ {error,einval}
+ end.
+
+ipv4strict_addr(Cs) ->
+ case ipv4strict_addr(Cs, []) of
+ [D4,D3,D2,D1] when (D4 bor D3 bor D2 bor D1) < 256 ->
{D1,D2,D3,D4};
- [D4,D2,D1] ->
- {D1,D2,0,D4};
- [D4,D1] ->
- {D1,0,0,D4};
- [D4] ->
- {0,0,0,D4}
- end;
-ipv4_addr({Cs0,"."++Cs1}, A) when length(A) =< 2 ->
- ipv4_addr(d3(Cs1), [tod(Cs0)|A]).
+ _ ->
+ erlang:error(badarg)
+ end.
+
+ipv4strict_addr([_|_], [_,_,_,_]) ->
+ %% Early bailout for extra characters
+ erlang:error(badarg);
+ipv4strict_addr("0", Ds) ->
+ [0|Ds];
+ipv4strict_addr("0."++Cs, Ds) ->
+ ipv4strict_addr(Cs, [0|Ds]);
+ipv4strict_addr(Cs0, Ds) when is_list(Cs0) ->
+ case ipv4_field(Cs0, 3, [], 10) of
+ {D,""} ->
+ [D|Ds];
+ {D,[$.|[_|_]=Cs]} ->
+ ipv4strict_addr(Cs, [D|Ds]);
+ {_,_} ->
+ erlang:error(badarg)
+ end.
+
-d3(Cs) -> d3(Cs, []).
-d3([C|Cs], R) when C >= $0, C =< $9, length(R) =< 2 ->
- d3(Cs, [C|R]);
-d3(Cs, [_|_]=R) ->
- {lists:reverse(R),Cs}.
+ipv4_field("", _, Rs, Base) ->
+ {ipv4_field(Rs, Base),""};
+ipv4_field("."++_=Cs, _, Rs, Base) ->
+ {ipv4_field(Rs, Base),Cs};
+ipv4_field("0"++_, _, [], _) ->
+ erlang:error(badarg);
+ipv4_field([C|Cs], N, Rs, Base) when N > 0 ->
+ ipv4_field(Cs, N-1, [C|Rs], Base);
+ipv4_field(Cs, _, _, _) when is_list(Cs) ->
+ erlang:error(badarg).
+
+ipv4_field(Rs, Base) ->
+ V = erlang:list_to_integer(lists:reverse(Rs), Base),
+ if V < 0 ->
+ erlang:error(badarg);
+ true ->
+ V
+ end.
-tod(Cs) ->
- case erlang:list_to_integer(Cs) of
- D when D >= 0, D =< 255 ->
- D;
+
+
+%%
+%% Forgiving IPv6 address
+%%
+%% Accepts IPv4 address and returns it as a IPv4 compatible IPv6 address
+%%
+ipv6_address(Cs) ->
+ case ipv4_address(Cs) of
+ {ok,{D1,D2,D3,D4}} ->
+ {ok,{0,0,0,0,0,16#ffff,(D1 bsl 8) bor D2,(D3 bsl 8) bor D4}};
_ ->
- erlang:error(badarg, [Cs])
+ ipv6strict_address(Cs)
end.
%%
-%% Parse IPv6 address:
+%% Parse IPv6 address according to RFC 4291:
%% x1:x2:x3:x4:x5:x6:x7:x8
%% x1:x2::x7:x8
%% ::x7:x8
@@ -530,77 +625,89 @@ tod(Cs) ->
%% ::x5:x6:d7a.d7b.d8a.d8b
%% x1:x2::d7a.d7b.d8a.d8b
%% ::d7a.d7b.d8a.d8b
+%% etc
%%
%% Return {ok, IP} | {error, einval}
%%
-ipv6_address(Cs) ->
- case catch ipv6_addr(Cs) of
- {'EXIT',_} -> {error,einval};
- Addr -> {ok,Addr}
+ipv6strict_address(Cs) ->
+ try ipv6_addr(Cs) of
+ Addr ->
+ {ok,Addr}
+ catch
+ error:badarg ->
+ {error,einval}
end.
ipv6_addr("::") ->
- ipv6_addr_done([], []);
+ ipv6_addr_done([], [], 0);
ipv6_addr("::"++Cs) ->
- ipv6_addr(x4(Cs), [], []);
+ ipv6_addr(hex(Cs), [], [], 0);
ipv6_addr(Cs) ->
- ipv6_addr(x4(Cs), []).
+ ipv6_addr(hex(Cs), [], 0).
%% Before "::"
-ipv6_addr({Cs0,[]}, A) when length(A) =:= 7 ->
- ipv6_addr_done([tox(Cs0)|A]);
-ipv6_addr({Cs0,"::"}, A) when length(A) =< 6 ->
- ipv6_addr_done([tox(Cs0)|A], []);
-ipv6_addr({Cs0,"::"++Cs1}, A) when length(A) =< 5 ->
- ipv6_addr(x4(Cs1), [tox(Cs0)|A], []);
-ipv6_addr({Cs0,":"++Cs1}, A) when length(A) =< 6 ->
- ipv6_addr(x4(Cs1), [tox(Cs0)|A]);
-ipv6_addr({Cs0,"."++Cs1}, A) when length(A) =:= 6 ->
- ipv6_addr(d3(Cs1), A, [], [tod(Cs0)]).
+ipv6_addr({Cs0,[]}, A, N) when N == 7 ->
+ ipv6_addr_done([hex_to_int(Cs0)|A]);
+ipv6_addr({Cs0,"::"}, A, N) when N =< 6 ->
+ ipv6_addr_done([hex_to_int(Cs0)|A], [], N+1);
+ipv6_addr({Cs0,"::"++Cs1}, A, N) when N =< 5 ->
+ ipv6_addr(hex(Cs1), [hex_to_int(Cs0)|A], [], N+1);
+ipv6_addr({Cs0,":"++Cs1}, A, N) when N =< 6 ->
+ ipv6_addr(hex(Cs1), [hex_to_int(Cs0)|A], N+1);
+ipv6_addr({Cs0,"."++_=Cs1}, A, N) when N == 6 ->
+ ipv6_addr_done(A, [], N, ipv4strict_addr(Cs0++Cs1));
+ipv6_addr(_, _, _) ->
+ erlang:error(badarg).
%% After "::"
-ipv6_addr({Cs0,[]}, A, B) when length(A)+length(B) =< 6 ->
- ipv6_addr_done(A, [tox(Cs0)|B]);
-ipv6_addr({Cs0,":"++Cs1}, A, B) when length(A)+length(B) =< 5 ->
- ipv6_addr(x4(Cs1), A, [tox(Cs0)|B]);
-ipv6_addr({Cs0,"."++Cs1}, A, B) when length(A)+length(B) =< 5 ->
- ipv6_addr(x4(Cs1), A, B, [tod(Cs0)]).
+ipv6_addr({Cs0,[]}, A, B, N) when N =< 6 ->
+ ipv6_addr_done(A, [hex_to_int(Cs0)|B], N+1);
+ipv6_addr({Cs0,":"++Cs1}, A, B, N) when N =< 5 ->
+ ipv6_addr(hex(Cs1), A, [hex_to_int(Cs0)|B], N+1);
+ipv6_addr({Cs0,"."++_=Cs1}, A, B, N) when N =< 5 ->
+ ipv6_addr_done(A, B, N, ipv4strict_addr(Cs0++Cs1));
+ipv6_addr(_, _, _, _) ->
+ erlang:error(badarg).
-%% After "."
-ipv6_addr({Cs0,[]}, A, B, C) when length(C) =:= 3 ->
- ipv6_addr_done(A, B, [tod(Cs0)|C]);
-ipv6_addr({Cs0,"."++Cs1}, A, B, C) when length(C) =< 2 ->
- ipv6_addr(d3(Cs1), A, B, [tod(Cs0)|C]).
+ipv6_addr_done(Ar, Br, N, {D1,D2,D3,D4}) ->
+ ipv6_addr_done(Ar, [((D3 bsl 8) bor D4),((D1 bsl 8) bor D2)|Br], N+2).
-ipv6_addr_done(Ar, Br, [D4,D3,D2,D1]) ->
- ipv6_addr_done(Ar, [((D3 bsl 8) bor D4),((D1 bsl 8) bor D2)|Br]).
-
-ipv6_addr_done(Ar, Br) ->
- ipv6_addr_done(Br++dup(8-length(Ar)-length(Br), 0, Ar)).
+ipv6_addr_done(Ar, Br, N) ->
+ ipv6_addr_done(Br++dup(8-N, 0, Ar)).
ipv6_addr_done(Ar) ->
list_to_tuple(lists:reverse(Ar)).
-x4(Cs) -> x4(Cs, []).
-
-x4([C|Cs], R) when C >= $0, C =< $9, length(R) =< 3 ->
- x4(Cs, [C|R]);
-x4([C|Cs], R) when C >= $a, C =< $f, length(R) =< 3 ->
- x4(Cs, [C|R]);
-x4([C|Cs], R) when C >= $A, C =< $F, length(R) =< 3 ->
- x4(Cs, [C|R]);
-x4(Cs, [_|_]=R) ->
- {lists:reverse(R),Cs}.
-
-tox(Cs) ->
- erlang:list_to_integer(Cs, 16).
+%% Collect Hex digits
+hex(Cs) -> hex(Cs, []).
+%%
+hex([C|Cs], R) when C >= $0, C =< $9 ->
+ hex(Cs, [C|R]);
+hex([C|Cs], R) when C >= $a, C =< $f ->
+ hex(Cs, [C|R]);
+hex([C|Cs], R) when C >= $A, C =< $F ->
+ hex(Cs, [C|R]);
+hex(Cs, [_|_]=R) when is_list(Cs) ->
+ {lists:reverse(R),Cs};
+hex(_, _) ->
+ erlang:error(badarg).
+
+%% Hex string to integer
+hex_to_int(Cs0) ->
+ case strip0(Cs0) of
+ Cs when length(Cs) =< 4 ->
+ erlang:list_to_integer("0"++Cs, 16);
+ _ ->
+ erlang:error(badarg)
+ end.
+%% Dup onto head of existing list
dup(0, _, L) ->
L;
dup(N, E, L) when is_integer(N), N >= 1 ->
- dup(N-1, E, [E|L]);
-dup(N, E, L) ->
- erlang:error(badarg, [N,E,L]).
+ dup(N-1, E, [E|L]).
+
+
%% Convert IPv4 adress to ascii
%% Convert IPv6 / IPV4 adress to ascii (plain format)
@@ -674,7 +781,7 @@ separate(_E, [H], R) ->
lists:reverse(R, [H]).
%% convert to A.B decimal form
-dig_to_dec(0) -> [$0,$.,$0];
+dig_to_dec(0) -> "0.0";
dig_to_dec(X) ->
integer_to_list((X bsr 8) band 16#ff) ++ "." ++
integer_to_list(X band 16#ff).
diff --git a/lib/kernel/test/inet_SUITE.erl b/lib/kernel/test/inet_SUITE.erl
index cf33e8b27f..eb8f918491 100644
--- a/lib/kernel/test/inet_SUITE.erl
+++ b/lib/kernel/test/inet_SUITE.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1997-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-module(inet_SUITE).
@@ -28,7 +28,7 @@
gethostnative_parallell/1, cname_loop/1,
gethostnative_soft_restart/1,gethostnative_debug_level/1,getif/1]).
--export([get_hosts/1, get_ipv6_hosts/1, parse_hosts/1,
+-export([get_hosts/1, get_ipv6_hosts/1, parse_hosts/1, parse_address/1,
kill_gethost/0, parallell_gethost/0]).
-export([init_per_testcase/2, end_per_testcase/2]).
@@ -249,14 +249,16 @@ t_getaddr_v6(Config) when is_list(Config) ->
?line {ok,IP46} = inet:getaddr(IP46, inet6),
?line {ok,IP46} = inet:getaddr(Name, inet6),
?line {ok,IP46} = inet:getaddr(FullName, inet6),
- ?line IP4toIP6 = inet:getaddr(IPStr, inet6),
- ?line case IP4toIP6 of
- {ok,IP46} -> % only native can do this
- ?line true = lists:member(native,
- inet_db:res_option(lookup));
- {error,nxdomain} ->
- ok
- end,
+ ?line {ok,IP46} = inet:getaddr(IPStr, inet6),
+%% ?line IP4toIP6 = inet:getaddr(IPStr, inet6),
+%% ?line case IP4toIP6 of
+%% {ok,IP46} ->
+%% ?line ok;
+%% {error,nxdomain} ->
+%% ?line false =
+%% lists:member(native,
+%% inet_db:res_option(lookup))
+%% end,
?line {Name6, FullName6, IPStr6, IP6, _} =
?config(test_host_ipv6_only, Config),
?line {ok,_} = inet:getaddr(list_to_atom(Name6), inet6),
@@ -301,7 +303,6 @@ ipv4_to_ipv6(Config) when is_list(Config) ->
end,
?line case {IP4to6Res,inet:gethostbyname(IPStr, inet6)} of
{true,{ok,HEnt}} ->
- ?line true = lists:member(native, inet_db:res_option(lookup)),
?line HEnt_ = HEnt#hostent{h_addrtype = inet6,
h_length = 16,
h_addr_list = [IP_46]},
@@ -374,9 +375,10 @@ get_hosts([C|Rest], Cur, Ip, Result) ->
get_hosts([], _, _, Result) ->
Result.
-parse(suite) -> [parse_hosts];
+parse(suite) -> [parse_hosts, parse_address];
parse(doc) -> ["Test that parsing of the hosts file or equivalent works,",
"and that erroneous lines are skipped"].
+
parse_hosts(Config) when is_list(Config) ->
?line DataDir = ?config(data_dir,Config),
?line HostFile = filename:join(DataDir, "hosts"),
@@ -388,6 +390,170 @@ parse_hosts(Config) when is_list(Config) ->
?line ResolvErr1 = filename:join(DataDir,"resolv.conf.err1"),
?line inet_parse:resolv(ResolvErr1).
+parse_address(Config) when is_list(Config) ->
+ V4Strict =
+ [{{0,0,0,0},"0.0.0.0"},
+ {{1,2,3,4},"1.2.3.4"},
+ {{253,252,251,250},"253.252.251.250"},
+ {{1,2,255,254},"1.2.255.254"}],
+ V6Strict =
+ [{{0,0,0,0,0,0,0,0},"::"},
+ {{15,0,0,0,0,0,0,2},"f::2"},
+ {{15,16#f11,0,0,0,0,256,2},"f:f11::0100:2"},
+ {{0,0,0,0,0,0,0,16#17},"::17"},
+ {{16#700,0,0,0,0,0,0,0},"0700::"},
+ {{0,0,0,0,0,0,2,1},"::2:1"},
+ {{0,0,0,0,0,3,2,1},"::3:2:1"},
+ {{0,0,0,0,4,3,2,1},"::4:3:2:1"},
+ {{0,0,0,5,4,3,2,1},"::5:4:3:2:1"},
+ {{0,0,6,5,4,3,2,1},"::6:5:4:3:2:1"},
+ {{0,7,6,5,4,3,2,1},"::7:6:5:4:3:2:1"},
+ {{7,0,0,0,0,0,0,0},"7::"},
+ {{7,6,0,0,0,0,0,0},"7:6::"},
+ {{7,6,5,0,0,0,0,0},"7:6:5::"},
+ {{7,6,5,4,0,0,0,0},"7:6:5:4::"},
+ {{7,6,5,4,3,0,0,0},"7:6:5:4:3::"},
+ {{7,6,5,4,3,2,0,0},"7:6:5:4:3:2::"},
+ {{7,6,5,4,3,2,1,0},"7:6:5:4:3:2:1::"},
+ {{16#c11,16#c22,16#5c33,16#c440,16#55c0,16#c66c,16#77,16#88},
+ "c11:0c22:5c33:c440:55c0:c66c:77:0088"},
+ {{16#c11,0,16#5c33,16#c440,16#55c0,16#c66c,16#77,16#88},
+ "c11::5c33:c440:55c0:c66c:77:0088"},
+ {{16#c11,16#c22,0,16#c440,16#55c0,16#c66c,16#77,16#88},
+ "c11:0c22::c440:55c0:c66c:77:0088"},
+ {{16#c11,16#c22,16#5c33,0,16#55c0,16#c66c,16#77,16#88},
+ "c11:0c22:5c33::55c0:c66c:77:0088"},
+ {{16#c11,16#c22,16#5c33,16#c440,0,16#c66c,16#77,16#88},
+ "c11:0c22:5c33:c440::c66c:77:0088"},
+ {{16#c11,16#c22,16#5c33,16#c440,16#55c0,0,16#77,16#88},
+ "c11:0c22:5c33:c440:55c0::77:0088"},
+ {{16#c11,16#c22,16#5c33,16#c440,16#55c0,16#c66c,0,16#88},
+ "c11:0c22:5c33:c440:55c0:c66c::0088"},
+ {{16#c11,0,0,16#c440,16#55c0,16#c66c,16#77,16#88},
+ "c11::c440:55c0:c66c:77:0088"},
+ {{16#c11,16#c22,0,0,16#55c0,16#c66c,16#77,16#88},
+ "c11:0c22::55c0:c66c:77:0088"},
+ {{16#c11,16#c22,16#5c33,0,0,16#c66c,16#77,16#88},
+ "c11:0c22:5c33::c66c:77:0088"},
+ {{16#c11,16#c22,16#5c33,16#c440,0,0,16#77,16#88},
+ "c11:0c22:5c33:c440::77:0088"},
+ {{16#c11,16#c22,16#5c33,16#c440,16#55c0,0,0,16#88},
+ "c11:0c22:5c33:c440:55c0::0088"},
+ {{16#c11,0,0,0,16#55c0,16#c66c,16#77,16#88},
+ "c11::55c0:c66c:77:0088"},
+ {{16#c11,16#c22,0,0,0,16#c66c,16#77,16#88},
+ "c11:0c22::c66c:77:0088"},
+ {{16#c11,16#c22,16#5c33,0,0,0,16#77,16#88},
+ "c11:0c22:5c33::77:0088"},
+ {{16#c11,16#c22,16#5c33,16#c440,0,0,0,16#88},
+ "c11:0c22:5c33:c440::0088"},
+ {{16#c11,0,0,0,0,16#c66c,16#77,16#88},
+ "c11::c66c:77:0088"},
+ {{16#c11,16#c22,0,0,0,0,16#77,16#88},
+ "c11:0c22::77:0088"},
+ {{16#c11,16#c22,16#5c33,0,0,0,0,16#88},
+ "c11:0c22:5c33::0088"},
+ {{16#c11,0,0,0,0,0,16#77,16#88},
+ "c11::77:0088"},
+ {{16#c11,16#c22,0,0,0,0,0,16#88},
+ "c11:0c22::0088"},
+ {{0,0,0,0,0,65535,258,65534},"::FFFF:1.2.255.254"},
+ {{16#ffff,16#ffff,16#ffff,16#ffff,16#ffff,16#ffff,16#ffff,16#ffff},
+ "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"}
+ |[{{D2,0,0,0,0,P,(D1 bsl 8) bor D2,(D3 bsl 8) bor D4},
+ erlang:integer_to_list(D2, 16)++"::"++Q++S}
+ || {{D1,D2,D3,D4},S} <- V4Strict,
+ {P,Q} <- [{0,""},{16#17,"17:"},{16#ff0,"0ff0:"}]]],
+ V4Sloppy =
+ [{{10,1,16#98,16#76},"10.0x019876"},
+ {{8#12,1,8#130,8#321},"012.01.054321"},
+ {{255,255,255,255},"255.255.255.0377"},
+ {{255,255,255,255},"0Xff.000000000377.0x0000ff.255"},
+ {{255,255,255,255},"255.255.65535"},
+ {{255,255,255,255},"255.0xFF.0177777"},
+ {{255,255,255,255},"255.16777215"},
+ {{255,255,255,255},"00377.0XFFFFFF"},
+ {{255,255,255,255},"4294967295"},
+ {{255,255,255,255},"0xffffffff"},
+ {{255,255,255,255},"00000000000037777777777"},
+ {{16#12,16#34,16#56,16#78},"0x12345678"},
+ {{16#12,16#34,16#56,16#78},"0x12.0x345678"},
+ {{16#12,16#34,16#56,16#78},"0x12.0X34.0x5678"},
+ {{16#12,16#34,16#56,16#78},"0x12.0X34.0x56.0X78"},
+ {{0,0,0,0},"0"},
+ {{0,0,0,0},"00"},
+ {{0,0,0,0},"0.0"},
+ {{0,0,0,0},"00.00.00"},
+ {{0,0,0,0},"0.00.0.0"},
+ {{0,0,0,0},"0.0.000000000000.0"}],
+ V6Sloppy =
+ [{{0,0,0,0,0,65535,(D1 bsl 8) bor D2,(D3 bsl 8) bor D4},S}
+ || {{D1,D2,D3,D4},S} <- V4Strict++V4Sloppy],
+ V4Err =
+ ["0.256.0.1",
+ "1.2.3.4.5",
+ "256.255.65535",
+ "4294967296",
+ "0x100000000",
+ "040000000000",
+ "1.2.3.-4",
+ "1.2.-3.4",
+ "1.-2.3.4",
+ "-1.2.3.4",
+ "10.",
+ "172.16.",
+ "198.168.0.",
+ "127.0.0.1."],
+ V6Err =
+ [":::",
+ "f:::2",
+ "::-1",
+ "::g",
+ "f:f11::10100:2",
+ "::17000",
+ "10000::",
+ "::8:7:6:5:4:3:2:1",
+ "8:7:6:5:4:3:2:1::",
+ "8:7:6:5:4::3:2:1",
+ "::1.2.3.4.5",
+ "::1.2.3.04",
+ "::1.256.3.4",
+ "::-5.4.3.2",
+ "::5.-4.3.2",
+ "::5.4.-3.2",
+ "::5.4.3.-2",
+ "::FFFF:1.2.3.4.5",
+ "::10.",
+ "::FFFF:172.16.",
+ "fe80::198.168.0.",
+ "fec0::fFfF:127.0.0.1."],
+ t_parse_address
+ (ipv6_address,
+ V6Strict++V6Sloppy++V6Err++V4Err),
+ t_parse_address
+ (ipv6strict_address,
+ V6Strict++V6Err++V4Err++[S || {_,S} <- V6Sloppy]),
+ t_parse_address
+ (ipv4_address,
+ V4Strict++V4Sloppy++V4Err++V6Err++[S || {_,S} <- V6Strict]),
+ t_parse_address
+ (ipv4strict_address,
+ V4Strict++V4Err++V6Err++[S || {_,S} <- V4Sloppy++V6Strict]).
+
+t_parse_address(Func, []) ->
+ io:format("~p done.~n", [Func]),
+ ok;
+t_parse_address(Func, [{Addr,String}|L]) ->
+ io:format("~p = ~p.~n", [Addr,String]),
+ {ok,Addr} = inet_parse:Func(String),
+ t_parse_address(Func, L);
+t_parse_address(Func, [String|L]) ->
+ io:format("~p.~n", [String]),
+ {error,einval} = inet_parse:Func(String),
+ t_parse_address(Func, L).
+
+
+
t_gethostnative(suite) ->[];
t_gethostnative(doc) ->[];
t_gethostnative(Config) when is_list(Config) ->
diff --git a/lib/kernel/test/inet_res_SUITE.erl b/lib/kernel/test/inet_res_SUITE.erl
index 659cfc5988..cc32d1f8f9 100644
--- a/lib/kernel/test/inet_res_SUITE.erl
+++ b/lib/kernel/test/inet_res_SUITE.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2009-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-module(inet_res_SUITE).
@@ -239,16 +239,37 @@ resolve(_Opts, []) -> ok;
resolve(Opts, [{Class,Type,Name,Answers,Authority}=Q|Qs]) ->
io:format("Query: ~p~nOptions: ~p~n", [Q,Opts]),
{ok,Msg} = inet_res:resolve(Name, Class, Type, Opts),
- if Answers =/= undefined ->
- AnList = lists:sort(Answers),
- AnList = lists:sort([inet_dns:rr(RR, data) ||
- RR <- inet_dns:msg(Msg, anlist)]);
- true -> ok end,
- if Authority =/= undefined ->
- NsList = lists:sort(Authority),
- NsList = lists:sort([inet_dns:rr(RR, data) ||
- RR <- inet_dns:msg(Msg, nslist)]);
- true -> ok end,
+ AnList =
+ if
+ Answers =/= undefined ->
+ lists:sort(Answers);
+ true ->
+ undefined
+ end,
+ NsList =
+ if
+ Authority =/= undefined ->
+ lists:sort(Authority);
+ true ->
+ undefined
+ end,
+ case {lists:sort
+ ([inet_dns:rr(RR, data) || RR <- inet_dns:msg(Msg, anlist)]),
+ lists:sort
+ ([inet_dns:rr(RR, data) || RR <- inet_dns:msg(Msg, nslist)])} of
+ {AnList,NsList} ->
+ ok;
+ {NsList,AnList} when Type =:= ns ->
+ %% This whole case statement is kind of inside out just
+ %% to accept this case when some legacy DNS resolvers
+ %% return the answer to a NS query in the answer section
+ %% instead of in the authority section.
+ ok;
+ {AnList,_} when NsList =:= undefined ->
+ ok;
+ {_,NsList} when AnList =:= undefined ->
+ ok
+ end,
Buf = inet_dns:encode(Msg),
{ok,Msg} = inet_dns:decode(Buf),
resolve(Opts, Qs).
@@ -292,10 +313,23 @@ edns0(Config) when is_list(Config) ->
MXs = lists:sort(inet_res_filter(inet_dns:msg(Msg2, anlist), in, mx)),
Buf2 = inet_dns:encode(Msg2),
{ok,Msg2} = inet_dns:decode(Buf2),
- [OptRR] = [RR || RR <- inet_dns:msg(Msg2, arlist),
- inet_dns:rr(RR, type) =:= opt],
- io:format("~p~n", [inet_dns:rr(OptRR)]),
- ok.
+ case [RR || RR <- inet_dns:msg(Msg2, arlist),
+ inet_dns:rr(RR, type) =:= opt] of
+ [OptRR] ->
+ io:format("~p~n", [inet_dns:rr(OptRR)]),
+ ok;
+ [] ->
+ case os:type() of
+ {unix,sunos} ->
+ case os:version() of
+ {M,V,_} when M < 5; M == 5, V =< 8 ->
+ %% In our test park only known platform
+ %% with an DNS resolver that can not do
+ %% EDNS0.
+ {comment,"No EDNS0"}
+ end
+ end
+ end.
inet_res_filter(Anlist, Class, Type) ->
[inet_dns:rr(RR, data) || RR <- Anlist,
@@ -331,11 +365,13 @@ files_monitor(suite) ->
files_monitor(doc) ->
["Tests monitoring of /etc/hosts and /etc/resolv.conf, but not them"];
files_monitor(Config) when is_list(Config) ->
+ Search = inet_db:res_option(search),
HostsFile = inet_db:res_option(hosts_file),
ResolvConf = inet_db:res_option(resolv_conf),
Inet6 = inet_db:res_option(inet6),
try do_files_monitor(Config)
after
+ inet_db:res_option(search, Search),
inet_db:res_option(resolv_conf, ResolvConf),
inet_db:res_option(hosts_file, HostsFile),
inet_db:res_option(inet6, Inet6)
@@ -344,7 +380,13 @@ files_monitor(Config) when is_list(Config) ->
do_files_monitor(Config) ->
Dir = ?config(priv_dir, Config),
{ok,Hostname} = inet:gethostname(),
- FQDN = Hostname++"."++inet_db:res_option(domain),
+ FQDN =
+ case inet_db:res_option(domain) of
+ "" ->
+ Hostname;
+ _ ->
+ Hostname++"."++inet_db:res_option(domain)
+ end,
HostsFile = filename:join(Dir, "files_monitor_hosts"),
ResolvConf = filename:join(Dir, "files_monitor_resolv.conf"),
ok = inet_db:res_option(resolv_conf, ResolvConf),
@@ -362,20 +404,20 @@ do_files_monitor(Config) ->
{error,nxdomain} = inet_res:gethostbyname(FQDN),
{ok,{127,0,0,10}} = inet:getaddr("mx.otptest", inet),
{ok,{0,0,0,0,0,0,32512,28}} = inet:getaddr("resolve.otptest", inet6),
- ok = inet_db:res_option(inet6, true),
{ok,#hostent{h_name = Hostname,
h_addrtype = inet6,
h_length = 16,
h_addr_list = [{0,0,0,0,0,0,0,1}]}} =
- inet:gethostbyname(Hostname),
+ inet:gethostbyname(Hostname, inet6),
{ok,#hostent{h_name = FQDN,
h_addrtype = inet6,
h_length = 16,
h_addr_list = [{0,0,0,0,0,0,0,1}]}} =
- inet:gethostbyname(FQDN),
+ inet:gethostbyname(FQDN, inet6),
{error,nxdomain} = inet_res:gethostbyname("resolve"),
%% XXX inet does not honour res_option inet6, might be a problem?
%% therefore inet_res is called here
+ ok = inet_db:res_option(inet6, true),
{ok,#hostent{h_name = "resolve.otptest",
h_addrtype = inet6,
h_length = 16,
diff --git a/lib/megaco/test/Makefile b/lib/megaco/test/Makefile
index 85c97359d7..682b83d368 100644
--- a/lib/megaco/test/Makefile
+++ b/lib/megaco/test/Makefile
@@ -62,8 +62,6 @@ SOURCE = $(HRL_FILES) $(ERL_FILES)
TARGET_FILES = $(MODULES:%=%.$(EMULATOR))
-COVER_SPEC_FILE = megaco.cover
-
APP_CASES = app appup
CODEC_CASES = codec1 codec2 codec3a codec3b codec3c
@@ -80,10 +78,10 @@ MAKE_EMAKE = $(wildcard $(ERL_TOP)/make/make_emakefile)
ifeq ($(MAKE_EMAKE),)
BUILDTARGET = $(TARGET_FILES)
-RELTEST_FILES = $(MEGACO_SPECS) $(COVER_SPEC_FILE) $(SOURCE)
+RELTEST_FILES = $(TEST_SPEC_FILE) $(COVER_SPEC_FILE) $(SOURCE)
else
BUILDTARGET = emakebuild
-RELTEST_FILES = $(EMAKEFILE) $(MEGACO_SPECS) $(COVER_SPEC_FILE) $(SOURCE)
+RELTEST_FILES = $(EMAKEFILE) $(TEST_SPEC_FILE) $(COVER_SPEC_FILE) $(SOURCE)
endif
diff --git a/lib/megaco/test/modules.mk b/lib/megaco/test/modules.mk
index 0186a84c26..049d8babe2 100644
--- a/lib/megaco/test/modules.mk
+++ b/lib/megaco/test/modules.mk
@@ -1,24 +1,26 @@
#-*-makefile-*- ; force emacs to enter makefile-mode
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2001-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2001-2010. 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
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
TEST_SPEC_FILE = megaco.spec
+COVER_SPEC_FILE = megaco.cover
+
BEHAVIOUR_MODULES = \
megaco_test_generator
diff --git a/lib/megaco/vsn.mk b/lib/megaco/vsn.mk
index b0574bbeef..1ee78c423a 100644
--- a/lib/megaco/vsn.mk
+++ b/lib/megaco/vsn.mk
@@ -19,7 +19,7 @@
APPLICATION = megaco
MEGACO_VSN = 3.13.1
-PRE_VSN =-p03
+PRE_VSN =-p04
APP_VSN = "$(APPLICATION)-$(MEGACO_VSN)$(PRE_VSN)"
TICKETS = OTP-8317 OTP-8323 OTP-8362 OTP-8403
diff --git a/lib/percept/src/egd_render.erl b/lib/percept/src/egd_render.erl
index cea9d2d926..4a0247dd33 100644
--- a/lib/percept/src/egd_render.erl
+++ b/lib/percept/src/egd_render.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2008-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
@@ -179,7 +179,7 @@ color(Trans,Layers,Type,OldC) ->
color([],_) -> {0.0,0.0,0.0,0.0};
color([{_,C}|_],opaque) -> C;
-color(Layers,alpha) -> color1({0,0,0,0},Layers).
+color(Layers,alpha) -> color1({0.0,0.0,0.0,0.0},Layers).
color1(Color,[]) -> Color;
color1(Color,[{_,C}|Layers]) -> color1(alpha_blend(Color,C),Layers).
diff --git a/lib/percept/test/egd_SUITE.erl b/lib/percept/test/egd_SUITE.erl
index a2595400dd..fde02b47d5 100644
--- a/lib/percept/test/egd_SUITE.erl
+++ b/lib/percept/test/egd_SUITE.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2007-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2007-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
@@ -143,6 +143,8 @@ image_shape(Config) when is_list(Config) ->
?line ok = bitmap_point_has_color(Bitmap, {W,H}, Pt2, Fgc),
?line ok = bitmap_point_has_color(Bitmap, {W,H}, Pt1, Fgc),
+ ?line <<_/binary>> = egd:render(Im, raw_bitmap, [{render_engine, alpha}]),
+
?line ok = egd:destroy(Im),
erase(image_size),
ok.
@@ -177,6 +179,8 @@ image_primitives(Config) when is_list(Config) ->
?line ok = bitmap_point_has_color(Bitmap, {W,H}, Pt2, Fgc),
?line ok = bitmap_point_has_color(Bitmap, {W,H}, Pt1, Fgc),
+ ?line <<_/binary>> = egd_render:binary(Im2, alpha),
+
erase(image_size),
ok.
diff --git a/lib/reltool/doc/src/Makefile b/lib/reltool/doc/src/Makefile
index 2c634bdf6c..8bc1488f77 100644
--- a/lib/reltool/doc/src/Makefile
+++ b/lib/reltool/doc/src/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2009-2010. 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
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
include $(ERL_TOP)/make/target.mk
@@ -39,6 +39,10 @@ include files.mk
# ----------------------------------------------------
+XML_FILES = \
+ $(BOOK_FILES) $(XML_APPLICATION_FILES) $(XML_REF3_FILES) \
+ $(XML_PART_FILES) $(XML_CHAPTER_FILES)
+
HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
$(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
@@ -46,10 +50,6 @@ INFO_FILE = ../../info
MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
-XML_FILES = \
- $(BOOK_FILES) $(XML_CHAPTER_FILES) \
- $(XML_PART_FILES) $(XML_REF3_FILES) $(XML_APPLICATION_FILES)
-
HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
@@ -72,15 +72,20 @@ $(TOP_PDF_FILE): $(XML_FILES)
pdf: $(TOP_PDF_FILE)
-html: gifs $(HTML_REF_MAN_FILE)
+html:images $(HTML_REF_MAN_FILE)
man: $(MAN3_FILES)
-gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
+images: $(IMAGE_FILES:%=$(HTMLDIR)/%)
debug opt:
clean clean_docs:
+ for file in $(XML_FILES); do \
+ if [ -f $$file\src ]; then \
+ rm -f $$file; \
+ fi \
+ done
rm -rf $(HTMLDIR)/*
rm -f $(MAN3DIR)/*
rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
@@ -95,8 +100,7 @@ release_docs_spec: docs
$(INSTALL_DIR) $(RELSYSDIR)/doc/pdf
$(INSTALL_DATA) $(TOP_PDF_FILE) $(RELSYSDIR)/doc/pdf
$(INSTALL_DIR) $(RELSYSDIR)/doc/html
- $(INSTALL_DATA) $(HTMLDIR)/* \
- $(RELSYSDIR)/doc/html
+ $(INSTALL_DATA) $(HTMLDIR)/* $(RELSYSDIR)/doc/html
$(INSTALL_DATA) $(INFO_FILE) $(RELSYSDIR)
$(INSTALL_DIR) $(RELEASE_PATH)/man/man3
$(INSTALL_DATA) $(MAN3DIR)/* $(RELEASE_PATH)/man/man3
diff --git a/lib/reltool/doc/src/book.gif b/lib/reltool/doc/src/book.gif
deleted file mode 100644
index 94b3868792..0000000000
--- a/lib/reltool/doc/src/book.gif
+++ /dev/null
Binary files differ
diff --git a/lib/reltool/doc/src/fascicules.xml b/lib/reltool/doc/src/fascicules.xml
deleted file mode 100644
index a57808974e..0000000000
--- a/lib/reltool/doc/src/fascicules.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
-
-<fascicules>
- <fascicule file="part" href="part_frame.html" entry="no">
- User's Guide
- </fascicule>
- <fascicule file="ref_man" href="ref_man_frame.html" entry="yes">
- Reference Manual
- </fascicule>
- <fascicule file="part_notes" href="part_notes_frame.html" entry="no">
- Release Notes
- </fascicule>
- <fascicule file="" href="../../../../doc/print.html" entry="no">
- Off-Print
- </fascicule>
-</fascicules>
diff --git a/lib/reltool/doc/src/files.mk b/lib/reltool/doc/src/files.mk
index b2dc06411d..07b52f4934 100644
--- a/lib/reltool/doc/src/files.mk
+++ b/lib/reltool/doc/src/files.mk
@@ -1,20 +1,20 @@
#-*-makefile-*- ; force emacs to enter makefile-mode
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 2009-2010. 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
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
XML_APPLICATION_FILES = \
@@ -24,8 +24,7 @@ XML_REF3_FILES = \
reltool.xml
XML_PART_FILES = \
- part.xml \
- part_notes.xml
+ part.xml
XML_CHAPTER_FILES = \
reltool_intro.xml \
@@ -35,11 +34,5 @@ XML_CHAPTER_FILES = \
BOOK_FILES = book.xml
-GIF_FILES = \
- book.gif \
- note.gif \
- notes.gif \
- ref_man.gif \
- user_guide.gif \
- warning.gif
+IMAGE_FILES =
diff --git a/lib/reltool/doc/src/note.gif b/lib/reltool/doc/src/note.gif
deleted file mode 100644
index 6fffe30419..0000000000
--- a/lib/reltool/doc/src/note.gif
+++ /dev/null
Binary files differ
diff --git a/lib/reltool/doc/src/notes.gif b/lib/reltool/doc/src/notes.gif
deleted file mode 100644
index e000cca26a..0000000000
--- a/lib/reltool/doc/src/notes.gif
+++ /dev/null
Binary files differ
diff --git a/lib/reltool/doc/src/part_notes.xml b/lib/reltool/doc/src/part_notes.xml
deleted file mode 100644
index 5a2aeecce6..0000000000
--- a/lib/reltool/doc/src/part_notes.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="latin1" ?>
-<!DOCTYPE part SYSTEM "part.dtd">
-
-<part xmlns:xi="http://www.w3.org/2001/XInclude">
- <header>
- <copyright>
- <year>2009</year>
- <year>2009</year>
- <holder>Ericsson AB, All Rights Reserved</holder>
- </copyright>
- <legalnotice>
- 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
- compliance with the License. You should have received a copy of the
- Erlang Public License along with this software. If not, it can be
- retrieved online at http://www.erlang.org/.
-
- Software distributed under the License is distributed on an "AS IS"
- basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- the License for the specific language governing rights and limitations
- under the License.
-
- The Initial Developer of the Original Code is Ericsson AB.
- </legalnotice>
-
- <title>Reltool Release Notes</title>
- <prepared>H&aring;kan Mattsson</prepared>
- <docno></docno>
- <date></date>
- <rev>%VSN%</rev>
- </header>
- <description>
- <p><c>Reltool</c> is a release management tool. It analyses a given
- Erlang/OTP installation and determines various dependencies
- between applications. The <c>graphical</c> frontend depicts the
- dependencies and enables interactive customization of a
- target system. The backend provides a <c>batch</c> interface
- for generation of customized target systems.</p>
- </description>
- <xi:include href="notes.xml"/>
-</part>
diff --git a/lib/reltool/doc/src/ref_man.gif b/lib/reltool/doc/src/ref_man.gif
deleted file mode 100644
index b13c4efd53..0000000000
--- a/lib/reltool/doc/src/ref_man.gif
+++ /dev/null
Binary files differ
diff --git a/lib/reltool/doc/src/reltool_examples.xml b/lib/reltool/doc/src/reltool_examples.xml
index 3d087862e6..d6db246f6c 100644
--- a/lib/reltool/doc/src/reltool_examples.xml
+++ b/lib/reltool/doc/src/reltool_examples.xml
@@ -45,7 +45,8 @@
its server can be obtained with <c>reltool:get_server/1</c></p>
<pre>
-Erlang R13B02 (erts-5.7.3) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:0] [kernel-poll:false]
+Erlang R13B02 (erts-5.7.3) [source] [64-bit] [smp:4:4] [rq:4]
+ [async-threads:0] [kernel-poll:false]
Eshell V5.7.3 (abort with ^G)
1&gt; {ok, Win} = reltool:start([]).
@@ -72,10 +73,13 @@ ok
<title>Inspecting the configuration</title>
<pre>
-Erlang R13B02 (erts-5.7.3) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:0] [kernel-poll:false]
+Erlang R13B02 (erts-5.7.3) [source] [64-bit] [smp:4:4] [rq:4]
+ [async-threads:0] [kernel-poll:false]
Eshell V5.7.3 (abort with ^G)
-1&gt; Config = {sys, [{escript, "examples/display_args", [{incl_cond, include}]},
+1&gt; Config = {sys, [{escript,
+ "examples/display_args",
+ [{incl_cond, include}]},
{app, inets, [{incl_cond, include}]},
{app, mnesia, [{incl_cond, exclude}]},
{app, ssl, [{incl_cond, exclude}]},
@@ -244,7 +248,8 @@ Eshell V5.7.3 (abort with ^G)
<title>Generate release and script files</title>
<pre>
5&gt; {ok, Server} = reltool:start_server([{config, {sys, [{boot_rel, "NAME"},
- {rel, "NAME", "VSN", [kernel, stdlib, sasl]}]}}]).
+ {rel, "NAME", "VSN",
+ [kernel, stdlib, sasl]}]}}]).
{ok,&lt;0.1288.0&gt;}
6&gt; reltool:get_config(Server).
{ok,{sys,[{boot_rel,"NAME"},
@@ -297,10 +302,13 @@ ok
<section>
<title>Create a target system</title>
<pre>
-Erlang R13B02 (erts-5.7.3) [source] [64-bit] [smp:4:4] [rq:4] [async-threads:0] [kernel-poll:false]
+Erlang R13B02 (erts-5.7.3) [source] [64-bit] [smp:4:4] [rq:4]
+ [async-threads:0] [kernel-poll:false]
Eshell V5.7.3 (abort with ^G)
-1&gt; Config = {sys, [{escript, "examples/display_args", [{incl_cond, include}]},
+1&gt; Config = {sys, [{escript,
+ "examples/display_args",
+ [{incl_cond, include}]},
{app, inets, [{incl_cond, include}]},
{app, mnesia, [{incl_cond, exclude}]},
{app, ssl, [{incl_cond, exclude}]},
@@ -320,11 +328,11 @@ Eshell V5.7.3 (abort with ^G)
[{write_file,"start_erl.data","5.7.3 1.0"},
{create_dir,"1.0",
[{write_file,"start_clean.rel",
- [37,37,32,114,101,108,32,103,101,110,101,114,97,116|...]},
+ [37,37,32,114,101,108,32,103,101,110,101|...]},
{write_file,"start_clean.script",
- [37,37,32,115,99,114,105,112,116,32,103,101,110|...]},
+ [37,37,32,115,99,114,105,112,116,32|...]},
{write_file,"start_clean.boot",
- &lt;&lt;131,104,3,100,0,6,115,99,114,105,112,116,...&gt;&gt;},
+ &lt;&lt;131,104,3,100,0,6,115,99,114,...&gt;&gt;},
{write_file,"start_sasl.rel",
[37,37,32,114,101,108,32,103,101,110,101|...]},
{write_file,"start_sasl.script",
@@ -409,11 +417,13 @@ Eshell V5.7.3 (abort with ^G)
{copy_file,...},
{...}|...]},
{create_dir,"src",
- [{copy_file,[...]},{copy_file,...},{...}|...]}]}]},
+ [{copy_file,[...]},
+ {copy_file,...},{...}|...]}]}]},
{archive,"crypto-1.6.1.ez",[],
[{create_dir,"crypto-1.6.1",
[{create_dir,"ebin",
- [{copy_file,[...]},{copy_file,...},{...}|...]},
+ [{copy_file,[...]},
+ {copy_file,...},{...}|...]},
{create_dir,"src",[{copy_file,...},{...}|...]}]}]},
{create_dir,"crypto-1.6.1",
[{create_dir,"priv",
diff --git a/lib/reltool/doc/src/user_guide.gif b/lib/reltool/doc/src/user_guide.gif
deleted file mode 100644
index e6275a803d..0000000000
--- a/lib/reltool/doc/src/user_guide.gif
+++ /dev/null
Binary files differ
diff --git a/lib/reltool/doc/src/warning.gif b/lib/reltool/doc/src/warning.gif
deleted file mode 100644
index 96af52360e..0000000000
--- a/lib/reltool/doc/src/warning.gif
+++ /dev/null
Binary files differ
diff --git a/lib/reltool/src/reltool_target.erl b/lib/reltool/src/reltool_target.erl
index 895fc6702b..6d85a98d9f 100644
--- a/lib/reltool/src/reltool_target.erl
+++ b/lib/reltool/src/reltool_target.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2009-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
-module(reltool_target).
@@ -966,9 +966,9 @@ do_eval_spec({create_dir, Dir, Files}, OrigSourceDir, SourceDir, TargetDir) ->
TargetDir2 = filename:join([TargetDir, Dir]),
reltool_utils:create_dir(TargetDir2),
do_eval_spec(Files, OrigSourceDir, SourceDir2, TargetDir2);
-do_eval_spec({create_dir, NewDir, OldDir, Files}, OrigSourceDir, _SourceDir, TargetDir) ->
+do_eval_spec({create_dir, Dir, OldDir, Files}, OrigSourceDir, _SourceDir, TargetDir) ->
SourceDir2 = filename:join([OrigSourceDir, OldDir]),
- TargetDir2 = filename:join([TargetDir, NewDir]),
+ TargetDir2 = filename:join([TargetDir, Dir]),
reltool_utils:create_dir(TargetDir2),
do_eval_spec(Files, SourceDir2, SourceDir2, TargetDir2);
do_eval_spec({archive, Archive, Options, Files}, OrigSourceDir, SourceDir, TargetDir) ->
@@ -992,9 +992,9 @@ do_eval_spec({copy_file, File}, _OrigSourceDir, SourceDir, TargetDir) ->
SourceFile = filename:join([SourceDir, File]),
TargetFile = filename:join([TargetDir, File]),
reltool_utils:copy_file(SourceFile, TargetFile);
-do_eval_spec({copy_file, NewFile, OldFile}, OrigSourceDir, _SourceDir, TargetDir) ->
+do_eval_spec({copy_file, File, OldFile}, OrigSourceDir, _SourceDir, TargetDir) ->
SourceFile = filename:join([OrigSourceDir, OldFile]),
- TargetFile = filename:join([TargetDir, NewFile]),
+ TargetFile = filename:join([TargetDir, File]),
reltool_utils:copy_file(SourceFile, TargetFile);
do_eval_spec({write_file, File, IoList}, _OrigSourceDir, _SourceDir, TargetDir) ->
TargetFile = filename:join([TargetDir, File]),
@@ -1014,8 +1014,8 @@ cleanup_spec({create_dir, Dir, Files}, TargetDir) ->
TargetDir2 = filename:join([TargetDir, Dir]),
cleanup_spec(Files, TargetDir2),
file:del_dir(TargetDir2);
-cleanup_spec({create_dir, NewDir, _OldDir, Files}, TargetDir) ->
- TargetDir2 = filename:join([TargetDir, NewDir]),
+cleanup_spec({create_dir, Dir, _OldDir, Files}, TargetDir) ->
+ TargetDir2 = filename:join([TargetDir, Dir]),
cleanup_spec(Files, TargetDir2),
file:del_dir(TargetDir2);
cleanup_spec({archive, Archive, _Options, Files}, TargetDir) ->
@@ -1125,6 +1125,8 @@ match(String, [#regexp{source = _, compiled = MP} | Regexps]) ->
end.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Old style installation
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
install(RelName, TargetDir) ->
try
@@ -1220,7 +1222,6 @@ subst_var([C| Rest], Vars, Result, VarAcc) ->
subst_var(Rest, Vars, Result, [C| VarAcc]);
subst_var([], Vars, Result, VarAcc) ->
subst([], Vars, [VarAcc ++ [$% | Result]]).
-
start_scripts() ->
["erl", "start", "start_erl"].
diff --git a/lib/stdlib/src/Makefile b/lib/stdlib/src/Makefile
index 37c836a254..237818c08b 100644
--- a/lib/stdlib/src/Makefile
+++ b/lib/stdlib/src/Makefile
@@ -146,6 +146,9 @@ APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
# FLAGS
# ----------------------------------------------------
+ifeq ($(NATIVE_LIBS_ENABLED),yes)
+ERL_COMPILE_FLAGS += +native
+endif
ERL_COMPILE_FLAGS += -I../include -I../../kernel/include
# ----------------------------------------------------
diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl
index 156d68554e..91f7641af7 100644
--- a/lib/stdlib/src/erl_lint.erl
+++ b/lib/stdlib/src/erl_lint.erl
@@ -1,20 +1,20 @@
%% -*- erlang-indent-level: 4 -*-
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1996-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
%% Do necessary checking of Erlang code.
@@ -78,7 +78,7 @@ value_option(Flag, Default, On, OnVal, Off, OffVal, Opts) ->
calls = dict:new(), %Who calls who
imported = [], %Actually imported functions
used_records=sets:new() :: set(), %Used record definitions
- used_types = sets:new() :: set() %Used type definitions
+ used_types = dict:new() :: dict() %Used type definitions
}).
%% Define the lint state record.
@@ -277,6 +277,8 @@ format_error({conflicting_behaviours,{Name,Arity},B,FirstL,FirstB}) ->
format_error({undefined_behaviour_func, {Func,Arity}, Behaviour}) ->
io_lib:format("undefined callback function ~w/~w (behaviour '~w')",
[Func,Arity,Behaviour]);
+format_error({undefined_behaviour_func, {Func,Arity,_Spec}, Behaviour}) ->
+ format_error({undefined_behaviour_func, {Func,Arity}, Behaviour});
format_error({undefined_behaviour,Behaviour}) ->
io_lib:format("behaviour ~w undefined", [Behaviour]);
format_error({undefined_behaviour_callbacks,Behaviour}) ->
@@ -288,7 +290,7 @@ format_error({ill_defined_behaviour_callbacks,Behaviour}) ->
%% --- types and specs ---
format_error({singleton_typevar, Name}) ->
io_lib:format("type variable ~w is only used once (is unbound)", [Name]);
-format_error({type_ref, {TypeName, Arity}}) ->
+format_error({undefined_type, {TypeName, Arity}}) ->
io_lib:format("type ~w~s undefined", [TypeName, gen_type_paren(Arity)]);
format_error({unused_type, {TypeName, Arity}}) ->
io_lib:format("type ~w~s is unused", [TypeName, gen_type_paren(Arity)]);
@@ -757,10 +759,11 @@ post_traversal_check(Forms, St0) ->
St7 = check_bif_clashes(Forms, St6),
St8 = check_specs_without_function(St7),
St9 = check_functions_without_spec(Forms, St8),
- StA = check_unused_types(Forms, St9),
- StB = check_untyped_records(Forms, StA),
- StC = check_on_load(StB),
- check_unused_records(Forms, StC).
+ StA = check_undefined_types(St9),
+ StB = check_unused_types(Forms, StA),
+ StC = check_untyped_records(Forms, StB),
+ StD = check_on_load(StC),
+ check_unused_records(Forms, StD).
%% check_behaviour(State0) -> State
%% Check that the behaviour attribute is valid.
@@ -786,13 +789,20 @@ behaviour_callbacks(Line, B, St0) ->
Funcs when is_list(Funcs) ->
All = all(fun({FuncName, Arity}) ->
is_atom(FuncName) andalso is_integer(Arity);
+ ({FuncName, Arity, Spec}) ->
+ is_atom(FuncName) andalso is_integer(Arity)
+ andalso is_list(Spec);
(_Other) ->
false
end,
Funcs),
+ MaybeRemoveSpec = fun({_F,_A}=FA) -> FA;
+ ({F,A,_S}) -> {F,A};
+ (Other) -> Other
+ end,
if
All =:= true ->
- {Funcs, St0};
+ {[MaybeRemoveSpec(F) || F <- Funcs], St0};
true ->
St1 = add_warning(Line,
{ill_defined_behaviour_callbacks,B},
@@ -970,6 +980,16 @@ check_undefined_functions(#lint{called=Called0,defined=Def0}=St0) ->
add_error(L, {undefined_function,NA}, St)
end, St0, Undef).
+%% check_undefined_types(State0) -> State
+
+check_undefined_types(#lint{usage=Usage,types=Def}=St0) ->
+ Used = Usage#usage.used_types,
+ UTAs = dict:fetch_keys(Used),
+ Undef = [{TA,dict:fetch(TA, Used)} || TA <- UTAs, not dict:is_key(TA, Def)],
+ foldl(fun ({TA,L}, St) ->
+ add_error(L, {undefined_type,TA}, St)
+ end, St0, Undef).
+
%% check_bif_clashes(Forms, State0) -> State
check_bif_clashes(Forms, St0) ->
@@ -1427,20 +1447,11 @@ is_pattern_expr_1({tuple,_Line,Es}) ->
all(fun is_pattern_expr/1, Es);
is_pattern_expr_1({nil,_Line}) -> true;
is_pattern_expr_1({cons,_Line,H,T}) ->
- case is_pattern_expr_1(H) of
- true -> is_pattern_expr_1(T);
- false -> false
- end;
+ is_pattern_expr_1(H) andalso is_pattern_expr_1(T);
is_pattern_expr_1({op,_Line,Op,A}) ->
- case erl_internal:arith_op(Op, 1) of
- true -> is_pattern_expr_1(A);
- false -> false
- end;
+ erl_internal:arith_op(Op, 1) andalso is_pattern_expr_1(A);
is_pattern_expr_1({op,_Line,Op,A1,A2}) ->
- case erl_internal:arith_op(Op, 2) of
- true -> all(fun is_pattern_expr/1, [A1,A2]);
- false -> false
- end;
+ erl_internal:arith_op(Op, 2) andalso all(fun is_pattern_expr/1, [A1,A2]);
is_pattern_expr_1(_Other) -> false.
%% pattern_bin([Element], VarTable, Old, BinVarTable, State) ->
@@ -1817,28 +1828,17 @@ is_gexpr({bin,_L,Fs}, RDs) ->
end, Fs);
is_gexpr({call,_L,{atom,_Lf,F},As}, RDs) ->
A = length(As),
- case erl_internal:guard_bif(F, A) of
- true -> is_gexpr_list(As, RDs);
- false -> false
- end;
+ erl_internal:guard_bif(F, A) andalso is_gexpr_list(As, RDs);
is_gexpr({call,_L,{remote,_Lr,{atom,_Lm,erlang},{atom,_Lf,F}},As}, RDs) ->
A = length(As),
- case erl_internal:guard_bif(F, A) orelse is_gexpr_op(F, A) of
- true -> is_gexpr_list(As, RDs);
- false -> false
- end;
+ (erl_internal:guard_bif(F, A) orelse is_gexpr_op(F, A))
+ andalso is_gexpr_list(As, RDs);
is_gexpr({call,L,{tuple,Lt,[{atom,Lm,erlang},{atom,Lf,F}]},As}, RDs) ->
is_gexpr({call,L,{remote,Lt,{atom,Lm,erlang},{atom,Lf,F}},As}, RDs);
is_gexpr({op,_L,Op,A}, RDs) ->
- case is_gexpr_op(Op, 1) of
- true -> is_gexpr(A, RDs);
- false -> false
- end;
+ is_gexpr_op(Op, 1) andalso is_gexpr(A, RDs);
is_gexpr({op,_L,Op,A1,A2}, RDs) ->
- case is_gexpr_op(Op, 2) of
- true -> is_gexpr_list([A1,A2], RDs);
- false -> false
- end;
+ is_gexpr_op(Op, 2) andalso is_gexpr_list([A1,A2], RDs);
is_gexpr(_Other, _RDs) -> false.
is_gexpr_op('andalso', 2) -> true;
@@ -2388,7 +2388,7 @@ check_type(Types, St) ->
{SeenVars, St1} = check_type(Types, dict:new(), St),
dict:fold(fun(Var, {seen_once, Line}, AccSt) ->
case atom_to_list(Var) of
- [$_|_] -> AccSt;
+ "_"++_ -> AccSt;
_ -> add_error(Line, {singleton_typevar, Var}, AccSt)
end;
(_Var, seen_multiple, AccSt) ->
@@ -2400,7 +2400,7 @@ check_type({ann_type, _L, [_Var, Type]}, SeenVars, St) ->
check_type({paren_type, _L, [Type]}, SeenVars, St) ->
check_type(Type, SeenVars, St);
check_type({remote_type, L, [{atom, _, Mod}, {atom, _, Name}, Args]},
- SeenVars, St = #lint{module=CurrentMod}) ->
+ SeenVars, #lint{module=CurrentMod} = St) ->
St1 =
case (dict:is_key({Name, length(Args)}, default_types())
orelse is_var_arity_type(Name)) of
@@ -2463,21 +2463,15 @@ check_type({type, _L, product, Args}, SeenVars, St) ->
lists:foldl(fun(T, {AccSeenVars, AccSt}) ->
check_type(T, AccSeenVars, AccSt)
end, {SeenVars, St}, Args);
-check_type({type, La, TypeName, Args}, SeenVars,
- St = #lint{types=Defs, usage=Usage}) ->
+check_type({type, La, TypeName, Args}, SeenVars, #lint{usage=Usage} = St) ->
Arity = length(Args),
- St1 =
- case dict:is_key({TypeName, Arity}, Defs) of
- true ->
- UsedTypes1 = Usage#usage.used_types,
- UsedTypes2 = sets:add_element({TypeName, Arity}, UsedTypes1),
- St#lint{usage=Usage#usage{used_types=UsedTypes2}};
- false ->
- case is_var_arity_type(TypeName) of
- true -> St;
- false -> add_error(La, {type_ref, {TypeName, Arity}}, St)
- end
- end,
+ St1 = case is_var_arity_type(TypeName) of
+ true -> St;
+ false ->
+ OldUsed = Usage#usage.used_types,
+ UsedTypes = dict:store({TypeName, Arity}, La, OldUsed),
+ St#lint{usage=Usage#usage{used_types=UsedTypes}}
+ end,
check_type({type, -1, product, Args}, SeenVars, St1).
check_record_types(Line, Name, Fields, SeenVars, St) ->
@@ -2636,7 +2630,7 @@ check_specs([FunType|Left], Arity, St0) ->
check_specs([], _Arity, St) ->
St.
-check_specs_without_function(St = #lint{module=Mod, defined=Funcs}) ->
+check_specs_without_function(#lint{module=Mod,defined=Funcs,specs=Specs}=St) ->
Fun = fun({M, F, A} = MFA, Line, AccSt) when M =:= Mod ->
case gb_sets:is_element({F, A}, Funcs) of
true -> AccSt;
@@ -2644,7 +2638,7 @@ check_specs_without_function(St = #lint{module=Mod, defined=Funcs}) ->
end;
({_M, _F, _A}, _Line, AccSt) -> AccSt
end,
- dict:fold(Fun, St, St#lint.specs).
+ dict:fold(Fun, St, Specs).
%% This generates warnings for functions without specs; if the user has
%% specified both options, we do not generate the same warnings twice.
@@ -2688,7 +2682,7 @@ check_unused_types(Forms, St = #lint{usage=Usage, types=Types}) ->
(Type, FileLine, AccSt) ->
case loc(FileLine) of
{FirstFile, _} ->
- case sets:is_element(Type, UsedTypes) of
+ case dict:is_key(Type, UsedTypes) of
true -> AccSt;
false ->
add_warning(FileLine,
@@ -3009,7 +3003,7 @@ check_old_unused_vars(Vt, Vt0, St0) ->
unused_vars(Vt, Vt0, _St0) ->
U0 = orddict:filter(fun (V, {_State,unused,_Ls}) ->
case atom_to_list(V) of
- [$_|_] -> false;
+ "_"++_ -> false;
_ -> true
end;
(_V, _How) -> false
diff --git a/lib/stdlib/test/erl_lint_SUITE.erl b/lib/stdlib/test/erl_lint_SUITE.erl
index bfbd7b3dc1..8581b496aa 100644
--- a/lib/stdlib/test/erl_lint_SUITE.erl
+++ b/lib/stdlib/test/erl_lint_SUITE.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1999-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1999-2010. 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
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
-%%
+%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
-%%
+%%
%% %CopyrightEnd%
%%
-module(erl_lint_SUITE).
@@ -2597,7 +2597,7 @@ otp_8051(Config) when is_list(Config) ->
<<"-opaque foo() :: bar().
">>,
[],
- {error,[{1,erl_lint,{type_ref,{bar,0}}}],
+ {error,[{1,erl_lint,{undefined_type,{bar,0}}}],
[{1,erl_lint,{unused_type,{foo,0}}}]}}],
?line [] = run(Config, Ts),
ok.
diff --git a/lib/tools/doc/src/Makefile b/lib/tools/doc/src/Makefile
index 5ac8718b61..433f123ae5 100644
--- a/lib/tools/doc/src/Makefile
+++ b/lib/tools/doc/src/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1997-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 1997-2010. 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
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
include $(ERL_TOP)/make/target.mk
diff --git a/lib/tools/doc/src/part.xml b/lib/tools/doc/src/part.xml
index 19f0763410..bf9e1ebbec 100644
--- a/lib/tools/doc/src/part.xml
+++ b/lib/tools/doc/src/part.xml
@@ -4,7 +4,7 @@
<part xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>Tools User's Guide</title>
diff --git a/lib/tools/doc/src/ref_man.xml b/lib/tools/doc/src/ref_man.xml
index 6cd4975075..d4861af9f3 100644
--- a/lib/tools/doc/src/ref_man.xml
+++ b/lib/tools/doc/src/ref_man.xml
@@ -4,7 +4,7 @@
<application xmlns:xi="http://www.w3.org/2001/XInclude">
<header>
<copyright>
- <year>1996</year><year>2009</year>
+ <year>1996</year><year>2010</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,12 +13,12 @@
compliance with the License. You should have received a copy of the
Erlang Public License along with this software. If not, it can be
retrieved online at http://www.erlang.org/.
-
+
Software distributed under the License is distributed on an "AS IS"
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
the License for the specific language governing rights and limitations
under the License.
-
+
</legalnotice>
<title>Tools Reference Manual</title>
diff --git a/lib/tools/src/Makefile b/lib/tools/src/Makefile
index 2105f51d5f..360f4f8f29 100644
--- a/lib/tools/src/Makefile
+++ b/lib/tools/src/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
-#
-# Copyright Ericsson AB 1996-2009. All Rights Reserved.
-#
+#
+# Copyright Ericsson AB 1996-2010. 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
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
include $(ERL_TOP)/make/target.mk
diff --git a/lib/tools/src/lcnt.erl b/lib/tools/src/lcnt.erl
index 53894b933c..989a661b75 100644
--- a/lib/tools/src/lcnt.erl
+++ b/lib/tools/src/lcnt.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2010. 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
diff --git a/lib/tools/test/lcnt_SUITE.erl b/lib/tools/test/lcnt_SUITE.erl
index cb01d233f8..e6866f721d 100644
--- a/lib/tools/test/lcnt_SUITE.erl
+++ b/lib/tools/test/lcnt_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2010. 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
diff --git a/otp_build b/otp_build
index 3e8c60ef52..ad9d38ebca 100755
--- a/otp_build
+++ b/otp_build
@@ -1,20 +1,20 @@
#! /bin/sh
#
# %CopyrightBegin%
-#
+#
# Copyright Ericsson AB 2002-2010. 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
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
-#
+#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
-#
+#
# %CopyrightEnd%
#
@@ -40,7 +40,7 @@ bootstrap_apps="erts lib/asn1 lib/compiler lib/hipe lib/ic lib/kernel lib/parset
# We will quote a bit more than needed, but the important thing is that
# all that needs quoting will be quoted...
-DONT_QUOTE="A-Za-z0-9/=_+-"
+DONT_QUOTE="A-Za-z0-9~/=_+-"
# Utility functions
usage ()
@@ -225,6 +225,8 @@ set_config_flags ()
export CONFIG_FLAGS;
}
+NL="\
+"
create_lib_configure_in()
{
cd $ERL_TOP
@@ -241,7 +243,7 @@ create_lib_configure_in()
lib/*)
if [ -f "$lib_app/configure.in" ]; then
app=`echo "$lib_app" | sed "s|lib/\(.*\)|\1|"`
- sdirs="${sdirs}test ! -f $app/configure || AC_CONFIG_SUBDIRS($app/.)\n"
+ sdirs="${sdirs}test ! -f $app/configure || AC_CONFIG_SUBDIRS($app/.)${NL}"
fi;;
*)
;;
@@ -258,7 +260,7 @@ create_lib_configure_in()
done
if [ $is_bapp = false ] && [ -f "$lib_app/configure.in" ]; then
app=`echo "$lib_app" | sed "s|lib/\(.*\)|\1|"`
- sdirs="${sdirs} test ! -f $app/configure || AC_CONFIG_SUBDIRS($app/.)\n"
+ sdirs="${sdirs} test ! -f $app/configure || AC_CONFIG_SUBDIRS($app/.)${NL}"
fi
done
@@ -431,7 +433,11 @@ try_cross_configure ()
--build=*)
build_value=`echo $x | sed "s|^--build=\(.*\)|\1|"`;;
--xcomp-conf=*)
- xcomp_conf=`echo "X$arg" | sed "s|^X--xcomp-conf=\(.*\)\$|\1|g"`
+ # tilde expansion is not handled by the `configure' script,
+ # but we do it for this argument. This argument is however not
+ # a `configure' argument.
+ xcomp_conf=`echo "X$arg" | sed "s|^X--xcomp-conf=\(.*\)\$|\1|g;s|\([^$DONT_QUOTE]\)|\\\\\\\\\1|g"`
+ eval "xcomp_conf=$xcomp_conf"
test "X$xcomp_conf" != "X" || {
echo "$0: Missing xcomp-conf file name"
exit 1
@@ -442,7 +448,7 @@ try_cross_configure ()
}
. "$xcomp_conf"
test $? -eq 0 || {
- echo "$0: Failed to read xcomp-conf file: $conf"
+ echo "$0: Failed to read xcomp-conf file: $xcomp_conf"
exit 1
}
test "X$erl_xcomp_build" = "X" || build_value="$erl_xcomp_build"
diff --git a/xcomp/README b/xcomp/README
deleted file mode 100644
index f4285cd16f..0000000000
--- a/xcomp/README
+++ /dev/null
@@ -1,449 +0,0 @@
-===============================================================================
- Cross Compiling Erlang/OTP
-===============================================================================
-
-%CopyrightBegin%
-
-Copyright Ericsson AB 2009-2010. 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
-compliance with the License. You should have received a copy of the
-Erlang Public License along with this software. If not, it can be
-retrieved online at http://www.erlang.org/.
-
-Software distributed under the License is distributed on an "AS IS"
-basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
-the License for the specific language governing rights and limitations
-under the License.
-
-%CopyrightEnd%
-
-===============================================================================
-
-This document describes how to cross compile Erlang/OTP. Note that the support
-for cross compiling Erlang/OTP is in its early stage of development, and
-should be considered as experimental. You are encouraged to read the whole
-document before attempting to cross compile Erlang/OTP.
-
-Building Erlang/OTP can be done either by using the `$ERL_TOP/otp_build'
-script, or by invoking `configure' and `make' directly. The
-`erl-xcomp.conf.template' file contains all available configuration variables
-and can be used as a template when creating a configuration. See
-`erl-xcomp-TileraMDE2.0-tilepro.conf` and `erl-xcomp-x86_64-saf-linux-gnu.conf'
-for examples of working configurations.
-
-The configuration files can be passed to `$ERL_TOP/otp_build configure' using
-the `--xcomp-conf' command line argument. Note that `configure' doesn't accept
-this command line argument. When using the `configure' script directly, pass
-the configuration variables as arguments to `configure' (or exported in the
-environment). If the default behavior of a variable is satisfactory, the
-variable doesn't need to be set. However, the `configure' script will issue a
-warning when a default value is used. When a variable has been set, no warning
-will be issued.
-
-All Erlang/OTP applications except the `wx' application can be cross compiled.
-The build of the `wx' driver will currently be automatically disabled when
-cross compiling.
-
-Note, that `$ERL_TOP/otp_build configure' will produce a default configuration
-that differs from what `$ERL_TOP/configure' will produce by default. For
-example, currently `--disable-dynamic-ssl-lib' is added to the
-`$ERL_TOP/configure' command line arguments unless `--enable-dynamic-ssl-lib'
-has been explicitly passed. The defaults used by `$ERL_TOP/otp_build configure'
-may change at any time without prior notice.
-
-The build system, including cross compilation configuration variables used,
-may be subject to non backward compatible changes without prior notice.
-Current cross build system has been tested when cross compiling some Linux/GNU
-systems, but has only been partly tested for more esoteric platforms. The
-VxWorks example file is highly dependent on our environment and is here more
-or less only for internal use.
-
-Please submit any patches for cross compiling in a way consistent with this
-system. All input is welcome as we have a very limited set of cross compiling
-environments to test with. If a new configuration variable is needed, add it
-to `$ERL_TOP/xcomp/erl-xcomp.conf.template', and use it in `configure.in'.
-Other files that might need to be updated are:
-- `$ERL_TOP/xcomp/erl-xcomp-vars.sh'
-- `$ERL_TOP/erl-build-tool-vars.sh'
-- `$ERL_TOP/erts/aclocal.m4'
-- `$ERL_TOP/xcomp/README'
-- `$ERL_TOP/xcomp/erl-xcomp-*.conf'
-Note that this might be an incomplete list of files that need to be updated.
-
-General information on how to submit patches can be found at:
- http://wiki.github.com/erlang/otp/submitting-patches
-
-======= Build and Install =====================================================
-
- [1]
-
-Change directory into the top directory of the Erlang/OTP source tree.
-
- $ cd $ERL_TOP
-
-------- Build -----------------------------------------------------------------
-
-In order to compile Erlang code, a small Erlang bootstrap system has to be
-built, or an Erlang/OTP system of the same release as the one being built
-has to be provided in the `$PATH'. The Erlang/OTP for the target system will
-be built using this Erlang system, together with the cross compilation tools
-provided.
-
-If you want to build using a compatible Erlang/OTP system in the `$PATH',
-jump to [3].
-
--- Building a bootstrap system --
-
- [2]
-
- $ ./configure --enable-bootstrap-only
- $ make
-
-The `--enable-bootstrap-only' argument to `configure' isn't strictly necessary,
-but will speed things up. It will only run `configure' in applications
-necessary for the bootstrap, and will disable a lot of things not needed by
-the bootstrap system. If you run `configure' without `--enable-boostrap-only'
-you also have to run make as `make bootstrap'; otherwise, the whole system will
-be built.
-
--- Cross building the system --
-
- [3]
-
- $ ./configure --build=<BUILD> --host=<HOST> [Other Configure Args]
- $ make
-
-<BUILD> should equal the CPU-VENDOR-OS triplet of the system that you build
-on. If you execute `$ERL_TOP/erts/autoconf/config.guess', it will in most
-cases print the triplet you want to use for this.
-
-<HOST> is the system that you build for. It does not have to be a full
-CPU-VENDOR-OS triplet, but can be. The full CPU-VENDOR-OS triplet will be
-created by executing `$ERL_TOP/erts/autoconf/config.sub <HOST>'. If
-`config.sub' fails, you need to be more specific.
-
-Pass the cross compilation variables as command line arguments to `configure'
-using a `<VAR>=<VALUE>' syntax (or export them in the environment). Note that
-you can *not* pass a configuration file using `--xcomp-conf=<FILE>' when you
-invoke `configure' directly. The `--xcomp-conf=<FILE>' argument can only
-be passed to `$ERL_TOP/otp_build configure'.
-
-`make' will verify that the Erlang/OTP system used when building is of the
-same release as the system being built, and will fail if this is not the case.
-It is possible, however not recommended, to force the cross compilation even
-though the wrong Erlang/OTP system is used. This by invoking `make' like this:
-`make ERL_XCOMP_FORCE_DIFFERENT_OTP=yes'. Note that this build might fail,
-silently produce suboptimal code, or silently produce erroneous code.
-
--- Installing --
-
-You can either install using the installation paths determined by `configure'
-[4], or install manually using [5].
-
- [4]
-
- $ make install DESTDIR=<TEMPORARY_PREFIX>
-
-`make install' will install at a location specified when doing `configure'.
-`configure' arguments specifying where the installation should reside are for
-example: `--prefix', `--exec-prefix', `--libdir', `--bindir', etc. By default
-it will install under `/usr/local'. You typically do not want to install your
-cross build under `/usr/local' on your build machine. Using `DESTDIR' will
-cause the installation paths to be prefixed by `$DESTDIR'. This makes it
-possible to install and package the installation on the build machine without
-having to place the installation in the same directory on the build machine as
-it should be executed from on the target machine.
-
-When `make install' has finished, change directory into `$DESTDIR', package
-the system, move it to the target machine, and unpack it. Note that the
-installation will only be working on the target machine at the location
-determined by `configure'.
-
-Installing manually:
-
- [5]
-
- $ make release RELEASE_ROOT=<RELEASE_DIR>
-
-`make release' will copy what you have built for the target machine to
-`<RELEASE_DIR>'. The `Install' script will not be run. The content of
-`<RELEASE_DIR>' is what by default ends up in `/usr/local/lib/erlang'.
-
-The `Install' script used when installing Erlang/OTP requires common Unix
-tools such as `sed' to be present in your `$PATH'. If your target system
-does not have such tools, you need to run the `Install' script on your
-build machine before packaging Erlang/OTP. The `Install' script should
-currently be invoked as follows in the directory where it resides
-(the top directory):
- `./Install [-cross] [-minimal|-sasl] <ERL_ROOT>'
- where:
- -minimal - Creates an installation that starts up a minimal amount
- of applications, i.e., only `kernel' and `stdlib' are
- started. The minimal system is normally enough.
- -sasl - Creates an installation that also starts up the `sasl'
- application.
- -cross - For cross compilation. Informs the install script that it
- is run on the build machine.
- <ERL_ROOT> - The absolute path to the Erlang installation to use at run
- time. This is often the same as the current working
- directory, but does not have to be. It can follow any other
- path through the file system to the same directory.
-If neither `-minimal', nor `-sasl' is passed as argument you will be
-prompted.
-
-You can now either:
-
- [6]
-
-* Decide where the installation should be located on the target machine, run
- the `Install' script on the build machine, and package the installed
- installation. The installation just need to be unpacked at the right
- location on the target machine:
-
- $ cd <RELEASE_DIR>
- $ ./Install -cross [-minimal|-sasl] <ABSOLUTE_INSTALL_DIR_ON_TARGET>
-
- [7]
-
-* Package the installation in <RELEASE_DIR>, place it wherever you want on
- your target machine, and run the `Install' script on your target machine:
-
- $ cd <ABSOLUTE_INSTALL_DIR_ON_TARGET>
- $ ./Install [-minimal|-sasl] <ABSOLUTE_INSTALL_DIR_ON_TARGET>
-
--- Building with the `otp_build' script --
-
- [8]
-
- $ cd $ERL_TOP
-
- [9]
-
- $ ./otp_build configure [--build=<BUILD>] [--host=<HOST>] \
- [--with-xcomp-conf=<FILE>] [Other Configure Args]
-
-If you have your cross compilation configuration in a file, pass it using the
-`--xcomp-conf=<FILE>' command line argument. If not, pass the configuration
-variables on the command line using a `<VAR>=<VALUE>' syntax (or in the
-environment).
-
-`--build=<BUILD>', and `--host=<HOST>' are the same as described at [3].
-The `--xcomp-conf=<FILE>' argument causes `otp_build' to read the cross
-compilation configuration from `<FILE>'. All of these arguments are in this
-case optional, but `<BUILD>', and `<HOST>' must be given either by passing
-`--build=<BUILD>' and `--host=<HOST>' on the command line, or by setting
-`erl_xcomp_build=<HOST>', and `erl_xcomp_host=<HOST>' in `<FILE>' and
-passing the `--xcomp-conf=<FILE>' argument.
-
-`otp_build configure' will configure both for the boostrap system on the
-build machine and the cross host system.
-
- [10]
-
- $ ./otp_build boot -a
-
-`otp_build boot -a' will first build a bootstrap system for the build machine
-and then do the cross build of the system.
-
- [11]
-
- $ ./otp_build release -a <RELEASE_DIR>
-
-`otp_build release -a' will do the same as [5], and you will after this have
-to do a manual install either by doing [6], or [7].
-
-======== Currently used configuration variables ===============================
-
-Note that you cannot define arbitrary variables in a cross compilation
-configuration file. Only the ones listed below will be guaranteed to be
-visible throughout the whole execution of all `configure' scripts. Other
-variables needs to be defined as arguments to `configure' or exported in
-the environment.
-
--------- `otp_build' only variables -------------------------------------------
-
-Variables in this section are only used, when configuring Erlang/OTP for
-cross compilation using `$ERL_TOP/otp_build configure'.
-
-NOTE! These variables currently have *no* effect if you configure using the
-`configure' script directly.
-
-* erl_xcomp_build - Build system.
- This value will be passed as `--build=$erl_xcomp_build' argument to the
- `configure' script. It does not have to be a full CPU-VENDOR-OS triplet,
- but can be. The full CPU-VENDOR-OS triplet will be created by:
- `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_build'
- If `erl_xcomp_build=guess', the build system will be guessed using:
- `$ERL_TOP/erts/autoconf/config.guess'.
-
-* erl_xcomp_host - Cross host system.
- This value will be passed as `--host=$erl_xcomp_host' argument to the
- `configure' script. It does not have to be a full CPU-VENDOR-OS triplet,
- but can be. The full CPU-VENDOR-OS triplet will be created by:
- `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host'
-
-* erl_xcomp_configure_flags - Extra configure flags.
- Extra flags to pass to the `configure' script.
-
--------- Cross compiler and other tools to use --------------------------------
-
-If the cross compilation tools are prefixed by `<HOST>-' you probably do
-not need to set these variables (where `<HOST>' is what has been passed as
-`--host=<HOST>' argument to `configure').
-
-* CC - C compiler.
-
-* CFLAGS - C compiler flags.
-
-* STATIC_CFLAGS - Static C compiler flags.
-
-* CFLAG_RUNTIME_LIBRARY_PATH - C compiler runtime library path flag.
- This flag should set a specific runtime library path for the shared
- library at link time. Note that this is actually a linker flag, but it
- needs to be passed via the compiler.
-
-* CPP - C pre-processor.
-
-* CPPFLAGS - C pre-processor flags.
-
-* CXX - C++ compiler.
-
-* CXXFLAGS - C++ compiler flags.
-
-* LD - Linker.
-
-* LDFLAGS - Linker flags.
-
-* LIBS - Libraries.
-
--- Dynamic Erlang Driver linker flags --
-
-NOTE! Either set all or non of the DED_LD* variables.
-
-* DED_LD - Linker.
-
-* DED_LDFLAGS - Linker flags.
-
-* DED_LD_FLAG_RUNTIME_LIBRARY_PATH - Linker runtime library path flag.
- This flag should set a specific runtime library path for the shared
- library at link time.
-
--- Large file support --
-
-NOTE! Either set all or non of the LFS_* variables.
-
-* LFS_CFLAGS - Large file support C compiler flags.
-
-* LFS_LDFLAGS - Large file support linker flags.
-
-* LFS_LIBS - Large file support libraries.
-
--- Other tools --
-
-* RANLIB - `ranlib' archive index tool.
-
-* AR - `ar' archiving tool.
-
-* GETCONF - `getconf' system configuration inspection tool.
-
--------- Cross System Root Locations ------------------------------------------
-
-* erl_xcomp_sysroot - Absolute cross system root path.
- The absolute path to the system root of the cross compilation
- environment. Currently, the `crypto', `odbc', `ssh' and `ssl'
- applications need the system root. These applications will be skipped
- if the system root has not been set. The system root might be needed
- for other things too. If this is the case and the system root has not
- been set, `configure' will fail and request you to set it.
-
-* erl_xcomp_isysroot - Absolute cross include system root path.
- The absolute path to the system root for includes of the cross
- compilation environment. If not set, this value defaults to
- `$erl_xcomp_sysroot', i.e., only set this value if the include system
- root path is not the same as the system root path.
-
--------- Optional feature, or bug tests ---------------------------------------
-
-These tests cannot (always) be done automatically when cross compiling. You
-usually does not need to set these variables. Only set these if you really
-know what you are doing.
-
-Note that some of these values will override results of tests performed
-by `configure', and some will not be used until `configure' is sure that
-it cannot figure the result out.
-
-The `configure' script will issue a warning when a default value is used.
-When a variable has been set, no warning will be issued.
-
-* erl_xcomp_bigendian - yes|no
- If `yes', the target system must be big endian. If `no', little endian.
- This can often be automatically detected, but not always. If not
- automatically detected, `configure' will fail unless this variable is
- set. No default value is used, i.e., `configure' will try to figure
- this out automatically.
-
-* erl_xcomp_linux_clock_gettime_correction - yes|no (defaults to `yes' on
- Linux; otherwise, `no')
- If `yes', `clock_gettime(CLOCK_MONOTONIC, _)' on the target system must
- work. This variable is recommended to be set to `no' on Linux systems
- with kernel versions less than 2.6.
-
-* erl_xcomp_linux_nptl - yes|no (defaults to `yes' on Linux; otherwise, `no')
- If `yes', the target system must have NPTL (Native POSIX Thread Library).
- Older Linux systems have LinuxThreads instead of NPTL (Linux kernel
- versions typically less than 2.6).
-
-* erl_xcomp_linux_usable_sigusrx - yes|no (defaults to `yes')
- If `yes', the `SIGUSR1' and `SIGUSR2' signals must be usable by the ERTS.
- Old LinuxThreads thread libraries (Linux kernel versions less than 2.2)
- used these signals and made them unusable by the ERTS.
-
-* erl_xcomp_linux_usable_sigaltstack - yes|no (defaults to `yes' on Linux;
- otherwise, `no')
- If `yes', `sigaltstack()' must be usable on the target system.
- `sigaltstack()' on Linux kernel versions less than 2.4 are broken.
-
-* erl_xcomp_poll - yes|no (defaults to `no' on Darwin/MacOSX; otherwise, `yes')
- If `yes', the target system must have a working `poll()' implementation
- that also can handle devices. If `no', `select()' will be used instead of
- `poll()'.
-
-* erl_xcomp_kqueue - yes|no (defaults to `no')
- If `yes', the target system must have a working `kqueue()' implementation
- that returns a file descriptor which can be used by `poll()' and/or
- `select()'. If `no' and the target system has not got `epoll()' or
- `/dev/poll', the kernel-poll feature will be disabled.
-
-* erl_xcomp_putenv_copy - yes|no (defaults to `no')
- If `yes', the target system must have a `putenv()' implementation that
- stores a copy of the key/value pair.
-
-* erl_xcomp_reliable_fpe - yes|no (defaults to `no')
- If `yes', the target system must have reliable floating point exceptions.
-
-* erl_xcomp_getaddrinfo - yes|no (defaults to `no')
- If `yes', the target system must have a working `getaddrinfo()'
- implementation that can handle both IPv4 and IPv6.
-
-* erl_xcomp_gethrvtime_procfs_ioctl - yes|no (defaults to `no')
- If `yes', the target system must have a working `gethrvtime()'
- implementation and is used with procfs `ioctl()'.
-
-* erl_xcomp_clock_gettime_cpu_time - yes|no (defaults to `no')
- If `yes', the target system must have a working `clock_gettime()'
- implementation that can be used for retrieving process CPU time.
-
-* erl_xcomp_after_morecore_hook - yes|no (defaults to `no')
- If `yes', the target system must have a working `__after_morecore_hook'
- that can be used for tracking used `malloc()' implementations core memory
- usage.
-
-* erl_xcomp_dlsym_brk_wrappers - yes|no (defaults to `no')
- If `yes', the target system must have a working `dlsym(RTLD_NEXT, <S>)'
- implementation that can be used on `brk' and `sbrk' symbols used by the
- `malloc()' implementation in use, and by this track the `malloc()'
- implementations core memory usage.
-
-===============================================================================
diff --git a/xcomp/README.md b/xcomp/README.md
new file mode 100644
index 0000000000..e97b26e605
--- /dev/null
+++ b/xcomp/README.md
@@ -0,0 +1,485 @@
+Cross Compiling Erlang/OTP
+==========================
+
+This document describes how to cross compile Erlang/OTP. Note that the support
+for cross compiling Erlang/OTP is in its early stage of development, and
+should be considered as experimental. You are encouraged to read the whole
+document before attempting to cross compile Erlang/OTP.
+
+Building Erlang/OTP can be done either by using the `$ERL_TOP/otp_build`
+script, or by invoking `$ERL_TOP/configure` and `make` directly (where
+`$ERL_TOP` is the top directory in the source tree). Building using `otp_build`
+is easier since it involves fewer steps, but the `otp_build` build procedure
+is not as flexible as the `configure`/`make` build procedure. The binary
+releases that we deliver are built using `otp_build`. Also note that
+`otp_build configure` will produce a default configuration that differs from
+what `configure` will produce by default. For example, currently
+`--disable-dynamic-ssl-lib` is added to the `configure` command line arguments
+unless `--enable-dynamic-ssl-lib` has been explicitly passed. The defaults
+used by `otp_build configure` may change at any time without prior notice.
+
+The `$ERL_TOP/xcomp/erl-xcomp.conf.template` file contains all available cross
+configuration variables and can be used as a template when creating a cross
+compilation configuration. For examples of working cross configurations see
+the `$ERL_TOP/xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf` file and the
+`$ERL_TOP/xcomp/erl-xcomp-x86_64-saf-linux-gnu.conf` file. If the default
+behavior of a variable is satisfactory, the variable does not need to be set.
+However, the `configure` script will issue a warning when a default value is
+used. When a variable has been set, no warning will be issued.
+
+A cross configuration file can be passed to `otp_build configure` using the
+`--xcomp-conf` command line argument. Note that `configure` does not accept
+this command line argument. When using the `configure` script directly, pass
+the configuration variables as arguments to `configure` using a
+`<VARIABLE>=<VALUE>` syntax. Variables can also be passed as environment
+variables to `configure`. However, if you pass the configuration in the
+environment, make sure to unset all of these environment variables before
+invoking `make`; otherwise, the environment variables might set make variables
+in some applications, or parts of some applications, and you may end up with
+an erroneously configured build.
+
+All Erlang/OTP applications except the `wx` application can be cross compiled.
+The build of the `wx` driver will currently be automatically disabled when
+cross compiling.
+
+The build system, including cross compilation configuration variables used,
+may be subject to non backward compatible changes without prior notice.
+Current cross build system has been tested when cross compiling some Linux/GNU
+systems, but has only been partly tested for more esoteric platforms. The
+VxWorks example file is highly dependent on our environment and is here more
+or less only for internal use.
+
+Please submit any patches for cross compiling in a way consistent with this
+system. All input is welcome as we have a very limited set of cross compiling
+environments to test with. If a new configuration variable is needed, add it
+to `$ERL_TOP/xcomp/erl-xcomp.conf.template`, and use it in `configure.in`.
+Other files that might need to be updated are:
+
+- `$ERL_TOP/xcomp/erl-xcomp-vars.sh`
+- `$ERL_TOP/erl-build-tool-vars.sh`
+- `$ERL_TOP/erts/aclocal.m4`
+- `$ERL_TOP/xcomp/README`
+- `$ERL_TOP/xcomp/erl-xcomp-*.conf`
+
+Note that this might be an incomplete list of files that need to be updated.
+
+General information on how to submit patches can be found at:
+ <http://wiki.github.com/erlang/otp/submitting-patches>
+
+If you are building in a `git` working directory, the `configure` scripts need
+to be generated before you can start building. This is done by invoking
+`./otp_build autoconf` in the `$ERL_TOP` directory. The `configure` scripts
+also have to be regenerated when a `configure.in` or `aclocal.m4` file is
+modified. Note that this is *not* needed when building an unmodified version
+of the released source.
+
+Build and Install
+-----------------
+
+ [1]
+
+Change directory into the top directory of the Erlang/OTP source tree.
+
+ $ cd $ERL_TOP
+
+### Build ###
+
+In order to compile Erlang code, a small Erlang bootstrap system has to be
+built, or an Erlang/OTP system of the same release as the one being built
+has to be provided in the `$PATH`. The Erlang/OTP for the target system will
+be built using this Erlang system, together with the cross compilation tools
+provided.
+
+If you want to build using a compatible Erlang/OTP system in the `$PATH`,
+jump to [3].
+
+#### Building a Bootstrap System ####
+
+ [2]
+
+ $ ./configure --enable-bootstrap-only
+ $ make
+
+The `--enable-bootstrap-only` argument to `configure` isn't strictly necessary,
+but will speed things up. It will only run `configure` in applications
+necessary for the bootstrap, and will disable a lot of things not needed by
+the bootstrap system. If you run `configure` without `--enable-boostrap-only`
+you also have to run make as `make bootstrap`; otherwise, the whole system will
+be built.
+
+#### Cross Building the System ####
+
+ [3]
+
+ $ ./configure --host=<HOST> --build=<BUILD> [Other Config Args]
+ $ make
+
+`<HOST>` is the host/target system that you build for. It does not have to be
+a full `CPU-VENDOR-OS` triplet, but can be. The full `CPU-VENDOR-OS` triplet
+will be created by executing `$ERL_TOP/erts/autoconf/config.sub <HOST>`. If
+`config.sub` fails, you need to be more specific.
+
+`<BUILD>` should equal the `CPU-VENDOR-OS` triplet of the system that you
+build on. If you execute `$ERL_TOP/erts/autoconf/config.guess`, it will in
+most cases print the triplet you want to use for this.
+
+Pass the cross compilation variables as command line arguments to `configure`
+using a `<VARIABLE>=<VALUE>` syntax. Note that you can *not* pass a
+configuration file using `--xcomp-conf=<FILE>` when you invoke `configure`
+directly. The `--xcomp-conf=<FILE>` argument can only be passed to
+`otp_build configure`.
+
+`make` will verify that the Erlang/OTP system used when building is of the
+same release as the system being built, and will fail if this is not the case.
+It is possible, however not recommended, to force the cross compilation even
+though the wrong Erlang/OTP system is used. This by invoking `make` like this:
+`make ERL_XCOMP_FORCE_DIFFERENT_OTP=yes`. Note that this build might fail,
+silently produce suboptimal code, or silently produce erroneous code.
+
+#### Installing ####
+
+You can either install using the installation paths determined by `configure`
+[4], or install manually using [5].
+
+ [4]
+
+ $ make install DESTDIR=<TEMPORARY_PREFIX>
+
+`make install` will install at a location specified when doing `configure`.
+`configure` arguments specifying where the installation should reside are for
+example: `--prefix`, `--exec-prefix`, `--libdir`, `--bindir`, etc. By default
+it will install under `/usr/local`. You typically do not want to install your
+cross build under `/usr/local` on your build machine. Using `DESTDIR` will
+cause the installation paths to be prefixed by `$DESTDIR`. This makes it
+possible to install and package the installation on the build machine without
+having to place the installation in the same directory on the build machine as
+it should be executed from on the target machine.
+
+When `make install` has finished, change directory into `$DESTDIR`, package
+the system, move it to the target machine, and unpack it. Note that the
+installation will only be working on the target machine at the location
+determined by `configure`.
+
+Installing manually:
+
+ [5]
+
+ $ make release RELEASE_ROOT=<RELEASE_DIR>
+
+`make release` will copy what you have built for the target machine to
+`<RELEASE_DIR>`. The `Install` script will not be run. The content of
+`<RELEASE_DIR>` is what by default ends up in `/usr/local/lib/erlang`.
+
+The `Install` script used when installing Erlang/OTP requires common Unix
+tools such as `sed` to be present in your `$PATH`. If your target system
+does not have such tools, you need to run the `Install` script on your
+build machine before packaging Erlang/OTP. The `Install` script should
+currently be invoked as follows in the directory where it resides
+(the top directory):
+
+ $ ./Install [-cross] [-minimal|-sasl] <ERL_ROOT>
+
+where:
+
+ * `-minimal` - Creates an installation that starts up a minimal
+ amount of applications, i.e., only `kernel` and
+ `stdlib` are started. The minimal system is normally
+ enough, and is what `make install` uses.
+ * `-sasl` - Creates an installation that also starts up the
+ `sasl` application.
+ * `-cross` - For cross compilation. Informs the install script
+ that it is run on the build machine.
+ * `<ERL_ROOT>` - The absolute path to the Erlang installation to use
+ at run time. This is often the same as the current
+ working directory, but does not have to be. It can
+ follow any other path through the file system to the
+ same directory.
+
+If neither `-minimal`, nor `-sasl` is passed as argument you will be
+prompted.
+
+You can now either do [6] or [7]:
+
+ [6]
+
+Decide where the installation should be located on the target machine, run
+the `Install` script on the build machine, and package the installed
+installation. The installation just need to be unpacked at the right location
+on the target machine:
+
+ $ cd <RELEASE_DIR>
+ $ ./Install -cross [-minimal|-sasl] <ABSOLUTE_INSTALL_DIR_ON_TARGET>
+
+ [7]
+
+Package the installation in <RELEASE_DIR>, place it wherever you want on your
+target machine, and run the `Install` script on your target machine:
+
+ $ cd <ABSOLUTE_INSTALL_DIR_ON_TARGET>
+ $ ./Install [-minimal|-sasl] <ABSOLUTE_INSTALL_DIR_ON_TARGET>
+
+#### Building With the `otp_build` Script ####
+
+ [8]
+
+ $ cd $ERL_TOP
+
+ [9]
+
+ $ ./otp_build configure --xcomp-conf=<FILE> [Other Config Args]
+
+alternatively:
+
+ $ ./otp_build configure --host=<HOST> --build=<BUILD> [Other Config Args]
+
+If you have your cross compilation configuration in a file, pass it using the
+`--xcomp-conf=<FILE>` command line argument. If not, pass `--host=<HOST>`,
+`--build=<BUILD>`, and the configuration variables using a `<VARIABLE>=<VALUE>`
+syntax on the command line (same as in [3]). Note that `<HOST>` and `<BUILD>`
+have to be passed one way or the other; either by using `erl_xcomp_host=<HOST>`
+and `erl_xcomp_build=<BUILD>` in the configuration file, or by using the
+`--host=<HOST>`, and `--build=<BUILD>` command line arguments.
+
+`otp_build configure` will configure both for the boostrap system on the
+build machine and the cross host system.
+
+ [10]
+
+ $ ./otp_build boot -a
+
+`otp_build boot -a` will first build a bootstrap system for the build machine
+and then do the cross build of the system.
+
+ [11]
+
+ $ ./otp_build release -a <RELEASE_DIR>
+
+`otp_build release -a` will do the same as [5], and you will after this have
+to do a manual install either by doing [6], or [7].
+
+Currently Used Configuration Variables
+--------------------------------------
+
+Note that you cannot define arbitrary variables in a cross compilation
+configuration file. Only the ones listed below will be guaranteed to be
+visible throughout the whole execution of all `configure` scripts. Other
+variables needs to be defined as arguments to `configure` or exported in
+the environment.
+
+### Variables for `otp_build` Only ###
+
+Variables in this section are only used, when configuring Erlang/OTP for
+cross compilation using `$ERL_TOP/otp_build configure`.
+
+*NOTE*! These variables currently have *no* effect if you configure using
+the `configure` script directly.
+
+* `erl_xcomp_build` - The build system used. This value will be passed as
+ `--build=$erl_xcomp_build` argument to the `configure` script. It does
+ not have to be a full `CPU-VENDOR-OS` triplet, but can be. The full
+ `CPU-VENDOR-OS` triplet will be created by
+ `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_build`.
+ If set to `guess`, the build system will be guessed using
+ `$ERL_TOP/erts/autoconf/config.guess`.
+
+* `erl_xcomp_host` - Cross host/target system to build for. This value will
+ be passed as `--host=$erl_xcomp_host` argument to the `configure` script.
+ It does not have to be a full `CPU-VENDOR-OS` triplet, but can be. The
+ full `CPU-VENDOR-OS` triplet will be created by:
+ `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host`
+
+* `erl_xcomp_configure_flags` - Extra configure flags to pass to the
+ `configure` script.
+
+### Cross Compiler and Other Tools ###
+
+If the cross compilation tools are prefixed by `<HOST>-` you probably do
+not need to set these variables (where `<HOST>` is what has been passed as
+`--host=<HOST>` argument to `configure`).
+
+All variables in this section can also be used when native compiling.
+
+* `CC` - C compiler.
+
+* `CFLAGS` - C compiler flags.
+
+* `STATIC_CFLAGS` - Static C compiler flags.
+
+* `CFLAG_RUNTIME_LIBRARY_PATH` - This flag should set runtime library
+ search path for the shared libraries. Note that this actually is a
+ linker flag, but it needs to be passed via the compiler.
+
+* `CPP` - C pre-processor.
+
+* `CPPFLAGS` - C pre-processor flags.
+
+* `CXX` - C++ compiler.
+
+* `CXXFLAGS` - C++ compiler flags.
+
+* `LD` - Linker.
+
+* `LDFLAGS` - Linker flags.
+
+* `LIBS` - Libraries.
+
+#### *D*ynamic *E*rlang *D*river Linking ####
+
+*NOTE*! Either set all or none of the `DED_LD*` variables.
+
+* `DED_LD` - Linker for Dynamically loaded Erlang Drivers.
+
+* `DED_LDFLAGS` - Linker flags to use with `DED_LD`.
+
+* `DED_LD_FLAG_RUNTIME_LIBRARY_PATH` - This flag should set runtime library
+ search path for shared libraries when linking with `DED_LD`.
+
+#### Large File Support ####
+
+*NOTE*! Either set all or none of the `LFS_*` variables.
+
+* `LFS_CFLAGS` - Large file support C compiler flags.
+
+* `LFS_LDFLAGS` - Large file support linker flags.
+
+* `LFS_LIBS` - Large file support libraries.
+
+#### Other Tools ####
+
+* `RANLIB` - `ranlib` archive index tool.
+
+* `AR` - `ar` archiving tool.
+
+* `GETCONF` - `getconf` system configuration inspection tool. `getconf` is
+ currently used for finding out large file support flags to use, and
+ on Linux systems for finding out if we have an NPTL thread library or
+ not.
+
+### Cross System Root Locations ###
+
+* `erl_xcomp_sysroot` - The absolute path to the system root of the cross
+ compilation environment. Currently, the `crypto`, `odbc`, `ssh` and
+ `ssl` applications need the system root. These applications will be
+ skipped if the system root has not been set. The system root might be
+ needed for other things too. If this is the case and the system root
+ has not been set, `configure` will fail and request you to set it.
+
+* `erl_xcomp_isysroot` - The absolute path to the system root for includes
+ of the cross compilation environment. If not set, this value defaults
+ to `$erl_xcomp_sysroot`, i.e., only set this value if the include system
+ root path is not the same as the system root path.
+
+### Optional Feature, and Bug Tests ###
+
+These tests cannot (always) be done automatically when cross compiling. You
+usually do not need to set these variables. Only set these if you really
+know what you are doing.
+
+Note that some of these values will override results of tests performed
+by `configure`, and some will not be used until `configure` is sure that
+it cannot figure the result out.
+
+The `configure` script will issue a warning when a default value is used.
+When a variable has been set, no warning will be issued.
+
+* `erl_xcomp_after_morecore_hook` - `yes|no`. Defaults to `no`. If `yes`, the
+ target system must have a working `__after_morecore_hook` that can be
+ used for tracking used `malloc()` implementations core memory usage.
+ This is currently only used by unsupported features.
+
+* `erl_xcomp_bigendian` - `yes|no`. No default. If `yes`, the target system
+ must be big endian. If `no`, little endian. This can often be
+ automatically detected, but not always. If not automatically detected,
+ `configure` will fail unless this variable is set. Since no default
+ value is used, `configure` will try to figure this out automatically.
+
+* `erl_xcomp_clock_gettime_cpu_time` - `yes|no`. Defaults to `no`. If `yes`,
+ the target system must have a working `clock_gettime()` implementation
+ that can be used for retrieving process CPU time.
+
+* `erl_xcomp_getaddrinfo` - `yes|no`. Defaults to `no`. If `yes`, the target
+ system must have a working `getaddrinfo()` implementation that can
+ handle both IPv4 and IPv6.
+
+* `erl_xcomp_gethrvtime_procfs_ioctl` - `yes|no`. Defaults to `no`. If `yes`,
+ the target system must have a working `gethrvtime()` implementation and
+ is used with procfs `ioctl()`.
+
+* `erl_xcomp_dlsym_brk_wrappers` - `yes|no`. Defaults to `no`. If `yes`, the
+ target system must have a working `dlsym(RTLD_NEXT, <S>)` implementation
+ that can be used on `brk` and `sbrk` symbols used by the `malloc()`
+ implementation in use, and by this track the `malloc()` implementations
+ core memory usage. This is currently only used by unsupported features.
+
+* `erl_xcomp_kqueue` - `yes|no`. Defaults to `no`. If `yes`, the target system
+ must have a working `kqueue()` implementation that returns a file
+ descriptor which can be used by `poll()` and/or `select()`. If `no` and
+ the target system has not got `epoll()` or `/dev/poll`, the kernel-poll
+ feature will be disabled.
+
+* `erl_xcomp_linux_clock_gettime_correction` - `yes|no`. Defaults to `yes` on
+ Linux; otherwise, `no`. If `yes`, `clock_gettime(CLOCK_MONOTONIC, _)` on
+ the target system must work. This variable is recommended to be set to
+ `no` on Linux systems with kernel versions less than 2.6.
+
+* `erl_xcomp_linux_nptl` - `yes|no`. Defaults to `yes` on Linux; otherwise,
+ `no`. If `yes`, the target system must have NPTL (Native POSIX Thread
+ Library). Older Linux systems have LinuxThreads instead of NPTL (Linux
+ kernel versions typically less than 2.6).
+
+* `erl_xcomp_linux_usable_sigaltstack` - `yes|no`. Defaults to `yes` on Linux;
+ otherwise, `no`. If `yes`, `sigaltstack()` must be usable on the target
+ system. `sigaltstack()` on Linux kernel versions less than 2.4 are
+ broken.
+
+* `erl_xcomp_linux_usable_sigusrx` - `yes|no`. Defaults to `yes`. If `yes`,
+ the `SIGUSR1` and `SIGUSR2` signals must be usable by the ERTS. Old
+ LinuxThreads thread libraries (Linux kernel versions typically less than
+ 2.2) used these signals and made them unusable by the ERTS.
+
+* `erl_xcomp_poll` - `yes|no`. Defaults to `no` on Darwin/MacOSX; otherwise,
+ `yes`. If `yes`, the target system must have a working `poll()`
+ implementation that also can handle devices. If `no`, `select()` will be
+ used instead of `poll()`.
+
+* `erl_xcomp_putenv_copy` - `yes|no`. Defaults to `no`. If `yes`, the target
+ system must have a `putenv()` implementation that stores a copy of the
+ key/value pair.
+
+* `erl_xcomp_reliable_fpe` - `yes|no`. Defaults to `no`. If `yes`, the target
+ system must have reliable floating point exceptions.
+
+Copyright and License
+---------------------
+
+> %CopyrightBegin%
+>
+> Copyright Ericsson AB 2009-2010. 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
+> compliance with the License. You should have received a copy of the
+> Erlang Public License along with this software. If not, it can be
+> retrieved online at http://www.erlang.org/.
+>
+> Software distributed under the License is distributed on an "AS IS"
+> basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+> the License for the specific language governing rights and limitations
+> under the License.
+>
+> %CopyrightEnd%
+
+
+<!--
+
+Modifying This Document
+-----------------------
+
+This document has been written using Markdown notation. This makes it possible
+to easily generate a nice looking HTML version of this file. When modifying
+this file, make sure that the modifications are made using valid Markdown
+notation. For more information on Markdown see:
+ <http://daringfireball.net/projects/markdown/>.
+
+-->
+
diff --git a/xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf b/xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf
index 5ceb4ec145..9379739744 100644
--- a/xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf
+++ b/xcomp/erl-xcomp-TileraMDE2.0-tilepro.conf
@@ -21,239 +21,238 @@
#### Author: Rickard Green
####
#### --------------------------------------------------------------------------
-#### When cross compiling Erlang/OTP using `otp_build', copy this file and set
+#### When cross compiling Erlang/OTP using `otp_build`, copy this file and set
#### the variables needed below. Then pass the path to the copy of this file as
-#### an argument to `otp_build' in the configure stage:
-#### `otp_build configure --xcomp-conf=<FILE>'
+#### an argument to `otp_build` in the configure stage:
+#### `otp_build configure --xcomp-conf=<FILE>`
#### --------------------------------------------------------------------------
### Note that you cannot define arbitrary variables in a cross compilation
### configuration file. Only the ones listed below will be guaranteed to be
-### visible throughout the whole execution of all `configure' scripts. Other
-### variables needs to be defined as arguments to `configure' or exported in
+### visible throughout the whole execution of all `configure` scripts. Other
+### variables needs to be defined as arguments to `configure` or exported in
### the environment.
-### ---- `otp_build' only variables -------------------------------------------
+### ### Variables for `otp_build` Only ###
### Variables in this section are only used, when configuring Erlang/OTP for
-### cross compilation using `$ERL_TOP/otp_build configure'.
-
-### NOTE! These variables currently have *no* effect if you configure using the
-### `configure' script directly.
-
-## erl_xcomp_build - Build system.
-## This value will be passed as `--build=$erl_xcomp_build' argument to the
-## `configure' script. It does not have to be a full CPU-VENDOR-OS triplet,
-## but can be. The full CPU-VENDOR-OS triplet will be created by:
-## `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_build'
-## If `erl_xcomp_build=guess', the build system will be guessed using:
-## `$ERL_TOP/erts/autoconf/config.guess'.
+### cross compilation using `$ERL_TOP/otp_build configure`.
+
+### *NOTE*! These variables currently have *no* effect if you configure using
+### the `configure` script directly.
+
+## `erl_xcomp_build` - The build system used. This value will be passed as
+## `--build=$erl_xcomp_build` argument to the `configure` script. It does
+## not have to be a full `CPU-VENDOR-OS` triplet, but can be. The full
+## `CPU-VENDOR-OS` triplet will be created by
+## `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_build`.
+## If set to `guess`, the build system will be guessed using
+## `$ERL_TOP/erts/autoconf/config.guess`.
erl_xcomp_build=guess
-## erl_xcomp_host - Cross host system.
-## This value will be passed as `--host=$erl_xcomp_host' argument to the
-## `configure' script. It does not have to be a full CPU-VENDOR-OS triplet,
-## but can be. The full CPU-VENDOR-OS triplet will be created by:
-## `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host'
+## `erl_xcomp_host` - Cross host/target system to build for. This value will
+## be passed as `--host=$erl_xcomp_host` argument to the `configure` script.
+## It does not have to be a full `CPU-VENDOR-OS` triplet, but can be. The
+## full `CPU-VENDOR-OS` triplet will be created by:
+## `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host`
erl_xcomp_host=tile
-## erl_xcomp_configure_flags - Extra configure flags.
-## Extra flags to pass to the `configure' script.
+## `erl_xcomp_configure_flags` - Extra configure flags to pass to the
+## `configure` script.
erl_xcomp_configure_flags="--without-termcap"
-### ---- Cross compiler and other tools to use --------------------------------
+### ### Cross Compiler and Other Tools ###
-### If the cross compilation tools are prefixed by `<HOST>-' you probably do
-### not need to set these variables (where `<HOST>' is what has been passed as
-### `--host=<HOST>' argument to `configure').
+### If the cross compilation tools are prefixed by `<HOST>-` you probably do
+### not need to set these variables (where `<HOST>` is what has been passed as
+### `--host=<HOST>` argument to `configure`).
-## CC - C compiler.
+### All variables in this section can also be used when native compiling.
+
+## `CC` - C compiler.
#CC=
-## CFLAGS - C compiler flags.
+## `CFLAGS` - C compiler flags.
#CFLAGS=
-## STATIC_CFLAGS - Static C compiler flags.
+## `STATIC_CFLAGS` - Static C compiler flags.
#STATIC_CFLAGS=
-## CFLAG_RUNTIME_LIBRARY_PATH - C compiler runtime library path flag.
-## This flag should set a specific runtime library path for the shared
-## library at link time. Note that this is actually a linker flag, but it
-## needs to be passed via the compiler.
+## `CFLAG_RUNTIME_LIBRARY_PATH` - This flag should set runtime library
+## search path for the shared libraries. Note that this actually is a
+## linker flag, but it needs to be passed via the compiler.
#CFLAG_RUNTIME_LIBRARY_PATH=
-## CPP - C pre-processor.
+## `CPP` - C pre-processor.
#CPP=
-## CPPFLAGS - C pre-processor flags.
+## `CPPFLAGS` - C pre-processor flags.
#CPPFLAGS=
-## CXX - C++ compiler.
+## `CXX` - C++ compiler.
#CXX=
-## CXXFLAGS - C++ compiler flags.
+## `CXXFLAGS` - C++ compiler flags.
#CXXFLAGS=
-## LD - Linker.
+## `LD` - Linker.
#LD=
-## LDFLAGS - Linker flags.
+## `LDFLAGS` - Linker flags.
#LDFLAGS=
-## LIBS - Libraries.
+## `LIBS` - Libraries.
#LIBS=
-### -- Dynamic Erlang Driver linker flags --
+### #### *D*ynamic *E*rlang *D*river Linking ####
-### NOTE! Either set all or non of the DED_LD* variables.
+### *NOTE*! Either set all or none of the `DED_LD*` variables.
-## DED_LD - Linker.
+## `DED_LD` - Linker for Dynamically loaded Erlang Drivers.
#DED_LD=
-## DED_LDFLAGS - Linker flags.
+## `DED_LDFLAGS` - Linker flags to use with `DED_LD`.
#DED_LDFLAGS=
-## DED_LD_FLAG_RUNTIME_LIBRARY_PATH - Linker runtime library path flag.
-## This flag should set a specific runtime library path for the shared
-## library at link time.
+## `DED_LD_FLAG_RUNTIME_LIBRARY_PATH` - This flag should set runtime library
+## search path for shared libraries when linking with `DED_LD`.
#DED_LD_FLAG_RUNTIME_LIBRARY_PATH=
-### -- Large file support --
+### #### Large File Support ####
-### NOTE! Either set all or non of the LFS_* variables.
+### *NOTE*! Either set all or none of the `LFS_*` variables.
-## LFS_CFLAGS - Large file support C compiler flags.
+## `LFS_CFLAGS` - Large file support C compiler flags.
#LFS_CFLAGS=
-## LFS_LDFLAGS - Large file support linker flags.
+## `LFS_LDFLAGS` - Large file support linker flags.
#LFS_LDFLAGS=
-## LFS_LIBS - Large file support libraries.
+## `LFS_LIBS` - Large file support libraries.
#LFS_LIBS=
-### -- Other tools --
+### #### Other Tools ####
-## RANLIB - `ranlib' archive index tool.
+## `RANLIB` - `ranlib` archive index tool.
#RANLIB=
-## AR - `ar' archiving tool.
+## `AR` - `ar` archiving tool.
#AR=
-## GETCONF - `getconf' system configuration inspection tool.
+## `GETCONF` - `getconf` system configuration inspection tool. `getconf` is
+## currently used for finding out large file support flags to use, and
+## on Linux systems for finding out if we have an NPTL thread library or
+## not.
#GETCONF=
-### ---- Cross System Root Locations ------------------------------------------
+### ### Cross System Root Locations ###
-## erl_xcomp_sysroot - Absolute cross system root path.
-## The absolute path to the system root of the cross compilation
-## environment. Currently, the `crypto', `odbc', `ssh' and `ssl'
-## applications need the system root. These applications will be skipped
-## if the system root has not been set. The system root might be needed
-## for other things too. If this is the case and the system root has not
-## been set, `configure' will fail and request you to set it.
+## `erl_xcomp_sysroot` - The absolute path to the system root of the cross
+## compilation environment. Currently, the `crypto`, `odbc`, `ssh` and
+## `ssl` applications need the system root. These applications will be
+## skipped if the system root has not been set. The system root might be
+## needed for other things too. If this is the case and the system root
+## has not been set, `configure` will fail and request you to set it.
erl_xcomp_sysroot="$TILERA_ROOT/tile"
-## erl_xcomp_isysroot - Absolute cross include system root path.
-## The absolute path to the system root for includes of the cross
-## compilation environment. If not set, this value defaults to
-## `$erl_xcomp_sysroot', i.e., only set this value if the include system
+## `erl_xcomp_isysroot` - The absolute path to the system root for includes
+## of the cross compilation environment. If not set, this value defaults
+## to `$erl_xcomp_sysroot`, i.e., only set this value if the include system
## root path is not the same as the system root path.
#erl_xcomp_isysroot=
-### ---- Optional feature, or bug tests ---------------------------------------
+### ### Optional Feature, and Bug Tests ###
### These tests cannot (always) be done automatically when cross compiling. You
-### usually does not need to set these variables. Only set these if you really
+### usually do not need to set these variables. Only set these if you really
### know what you are doing.
### Note that some of these values will override results of tests performed
-### by `configure', and some will not be used until `configure' is sure that
+### by `configure`, and some will not be used until `configure` is sure that
### it cannot figure the result out.
-### The `configure' script will issue a warning when a default value is used.
+### The `configure` script will issue a warning when a default value is used.
### When a variable has been set, no warning will be issued.
-## erl_xcomp_bigendian - yes|no
-## If `yes', the target system must be big endian. If `no', little endian.
-## This can often be automatically detected, but not always. If not
-## automatically detected, `configure' will fail unless this variable is
-## set. No default value is used, i.e., `configure' will try to figure
-## this out automatically.
-#erl_xcomp_bigendian=
+## `erl_xcomp_after_morecore_hook` - `yes|no`. Defaults to `no`. If `yes`, the
+## target system must have a working `__after_morecore_hook` that can be
+## used for tracking used `malloc()` implementations core memory usage.
+## This is currently only used by unsupported features.
+#erl_xcomp_after_morecore_hook=
-## erl_xcomp_linux_clock_gettime_correction - yes|no (defaults to `yes' on
-## Linux; otherwise, `no')
-## If `yes', `clock_gettime(CLOCK_MONOTONIC, _)' on the target system must
-## work. This variable is recommended to be set to `no' on Linux systems
-## with kernel versions less than 2.6.
-#erl_xcomp_linux_clock_gettime_correction=
+## `erl_xcomp_bigendian` - `yes|no`. No default. If `yes`, the target system
+## must be big endian. If `no`, little endian. This can often be
+## automatically detected, but not always. If not automatically detected,
+## `configure` will fail unless this variable is set. Since no default
+## value is used, `configure` will try to figure this out automatically.
+#erl_xcomp_bigendian=
-## erl_xcomp_linux_nptl - yes|no (defaults to `yes' on Linux; otherwise, `no')
-## If `yes', the target system must have NPTL (Native POSIX Thread Library).
-## Older Linux systems have LinuxThreads instead of NPTL (Linux kernel
-## versions typically less than 2.6).
-#erl_xcomp_linux_nptl=
+## `erl_xcomp_clock_gettime_cpu_time` - `yes|no`. Defaults to `no`. If `yes`,
+## the target system must have a working `clock_gettime()` implementation
+## that can be used for retrieving process CPU time.
+#erl_xcomp_clock_gettime_cpu_time=
-## erl_xcomp_linux_usable_sigusrx - yes|no (defaults to `yes')
-## If `yes', the `SIGUSR1' and `SIGUSR2' signals must be usable by the ERTS.
-## Old LinuxThreads thread libraries (Linux kernel versions less than 2.2)
-## used these signals and made them unusable by the ERTS.
-#erl_xcomp_linux_usable_sigusrx=
+## `erl_xcomp_getaddrinfo` - `yes|no`. Defaults to `no`. If `yes`, the target
+## system must have a working `getaddrinfo()` implementation that can
+## handle both IPv4 and IPv6.
+erl_xcomp_getaddrinfo=yes
-## erl_xcomp_linux_usable_sigaltstack - yes|no (defaults to `yes' on Linux;
-## otherwise, `no')
-## If `yes', `sigaltstack()' must be usable on the target system.
-## `sigaltstack()' on Linux kernel versions less than 2.4 are broken.
-#erl_xcomp_linux_usable_sigaltstack=
+## `erl_xcomp_gethrvtime_procfs_ioctl` - `yes|no`. Defaults to `no`. If `yes`,
+## the target system must have a working `gethrvtime()` implementation and
+## is used with procfs `ioctl()`.
+#erl_xcomp_gethrvtime_procfs_ioctl=
-## erl_xcomp_poll - yes|no (defaults to `no' on Darwin/MacOSX; otherwise, `yes')
-## If `yes', the target system must have a working `poll()' implementation
-## that also can handle devices. If `no', `select()' will be used instead of
-## `poll()'.
-#erl_xcomp_poll=
+## `erl_xcomp_dlsym_brk_wrappers` - `yes|no`. Defaults to `no`. If `yes`, the
+## target system must have a working `dlsym(RTLD_NEXT, <S>)` implementation
+## that can be used on `brk` and `sbrk` symbols used by the `malloc()`
+## implementation in use, and by this track the `malloc()` implementations
+## core memory usage. This is currently only used by unsupported features.
+#erl_xcomp_dlsym_brk_wrappers=
-## erl_xcomp_kqueue - yes|no (defaults to `no')
-## If `yes', the target system must have a working `kqueue()' implementation
-## that returns a file descriptor which can be used by `poll()' and/or
-## `select()'. If `no' and the target system has not got `epoll()' or
-## `/dev/poll', the kernel-poll feature will be disabled.
+## `erl_xcomp_kqueue` - `yes|no`. Defaults to `no`. If `yes`, the target system
+## must have a working `kqueue()` implementation that returns a file
+## descriptor which can be used by `poll()` and/or `select()`. If `no` and
+## the target system has not got `epoll()` or `/dev/poll`, the kernel-poll
+## feature will be disabled.
#erl_xcomp_kqueue=
-## erl_xcomp_putenv_copy - yes|no (defaults to `no')
-## If `yes', the target system must have a `putenv()' implementation that
-## stores a copy of the key/value pair.
-#erl_xcomp_putenv_copy=
+## `erl_xcomp_linux_clock_gettime_correction` - `yes|no`. Defaults to `yes` on
+## Linux; otherwise, `no`. If `yes`, `clock_gettime(CLOCK_MONOTONIC, _)` on
+## the target system must work. This variable is recommended to be set to
+## `no` on Linux systems with kernel versions less than 2.6.
+#erl_xcomp_linux_clock_gettime_correction=
-## erl_xcomp_reliable_fpe - yes|no (defaults to `no')
-## If `yes', the target system must have reliable floating point exceptions.
-#erl_xcomp_reliable_fpe=
+## `erl_xcomp_linux_nptl` - `yes|no`. Defaults to `yes` on Linux; otherwise,
+## `no`. If `yes`, the target system must have NPTL (Native POSIX Thread
+## Library). Older Linux systems have LinuxThreads instead of NPTL (Linux
+## kernel versions typically less than 2.6).
+#erl_xcomp_linux_nptl=
-## erl_xcomp_getaddrinfo - yes|no (defaults to `no')
-## If `yes', the target system must have a working `getaddrinfo()'
-## implementation that can handle both IPv4 and IPv6.
-erl_xcomp_getaddrinfo=yes
+## `erl_xcomp_linux_usable_sigaltstack` - `yes|no`. Defaults to `yes` on Linux;
+## otherwise, `no`. If `yes`, `sigaltstack()` must be usable on the target
+## system. `sigaltstack()` on Linux kernel versions less than 2.4 are
+## broken.
+#erl_xcomp_linux_usable_sigaltstack=
-## erl_xcomp_gethrvtime_procfs_ioctl - yes|no (defaults to `no')
-## If `yes', the target system must have a working `gethrvtime()'
-## implementation and is used with procfs `ioctl()'.
-#erl_xcomp_gethrvtime_procfs_ioctl=
+## `erl_xcomp_linux_usable_sigusrx` - `yes|no`. Defaults to `yes`. If `yes`,
+## the `SIGUSR1` and `SIGUSR2` signals must be usable by the ERTS. Old
+## LinuxThreads thread libraries (Linux kernel versions typically less than
+## 2.2) used these signals and made them unusable by the ERTS.
+#erl_xcomp_linux_usable_sigusrx=
-## erl_xcomp_clock_gettime_cpu_time - yes|no (defaults to `no')
-## If `yes', the target system must have a working `clock_gettime()'
-## implementation that can be used for retrieving process CPU time.
-#erl_xcomp_clock_gettime_cpu_time=
+## `erl_xcomp_poll` - `yes|no`. Defaults to `no` on Darwin/MacOSX; otherwise,
+## `yes`. If `yes`, the target system must have a working `poll()`
+## implementation that also can handle devices. If `no`, `select()` will be
+## used instead of `poll()`.
+#erl_xcomp_poll=
-## erl_xcomp_after_morecore_hook - yes|no (defaults to `no')
-## If `yes', the target system must have a working `__after_morecore_hook'
-## that can be used for tracking used `malloc()' implementations core memory
-## usage.
-#erl_xcomp_after_morecore_hook=
+## `erl_xcomp_putenv_copy` - `yes|no`. Defaults to `no`. If `yes`, the target
+## system must have a `putenv()` implementation that stores a copy of the
+## key/value pair.
+#erl_xcomp_putenv_copy=
-## erl_xcomp_dlsym_brk_wrappers - yes|no (defaults to `no')
-## If `yes', the target system must have a working `dlsym(RTLD_NEXT, <S>)'
-## implementation that can be used on `brk' and `sbrk' symbols used by the
-## `malloc()' implementation in use, and by this track the `malloc()'
-## implementations core memory usage.
-#erl_xcomp_dlsym_brk_wrappers=
+## `erl_xcomp_reliable_fpe` - `yes|no`. Defaults to `no`. If `yes`, the target
+## system must have reliable floating point exceptions.
+#erl_xcomp_reliable_fpe=
-#### --------------------------------------------------------------------------
+####
diff --git a/xcomp/erl-xcomp-vxworks_ppc32.conf b/xcomp/erl-xcomp-vxworks_ppc32.conf
index aa7c652d80..b75c7444bb 100644
--- a/xcomp/erl-xcomp-vxworks_ppc32.conf
+++ b/xcomp/erl-xcomp-vxworks_ppc32.conf
@@ -21,239 +21,238 @@
#### Author: Rickard Green/Patrik Nyblom
####
#### --------------------------------------------------------------------------
-#### When cross compiling Erlang/OTP using `otp_build', copy this file and set
+#### When cross compiling Erlang/OTP using `otp_build`, copy this file and set
#### the variables needed below. Then pass the path to the copy of this file as
-#### an argument to `otp_build' in the configure stage:
-#### `otp_build configure --xcomp-conf=<FILE>'
+#### an argument to `otp_build` in the configure stage:
+#### `otp_build configure --xcomp-conf=<FILE>`
#### --------------------------------------------------------------------------
### Note that you cannot define arbitrary variables in a cross compilation
### configuration file. Only the ones listed below will be guaranteed to be
-### visible throughout the whole execution of all `configure' scripts. Other
-### variables needs to be defined as arguments to `configure' or exported in
+### visible throughout the whole execution of all `configure` scripts. Other
+### variables needs to be defined as arguments to `configure` or exported in
### the environment.
-### ---- `otp_build' only variables -------------------------------------------
+### ### Variables for `otp_build` Only ###
### Variables in this section are only used, when configuring Erlang/OTP for
-### cross compilation using `$ERL_TOP/otp_build configure'.
-
-### NOTE! These variables currently have *no* effect if you configure using the
-### `configure' script directly.
-
-## erl_xcomp_build - Build system.
-## This value will be passed as `--build=$erl_xcomp_build' argument to the
-## `configure' script. It does not have to be a full CPU-VENDOR-OS triplet,
-## but can be. The full CPU-VENDOR-OS triplet will be created by:
-## `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_build'
-## If `erl_xcomp_build=guess', the build system will be guessed using:
-## `$ERL_TOP/erts/autoconf/config.guess'.
+### cross compilation using `$ERL_TOP/otp_build configure`.
+
+### *NOTE*! These variables currently have *no* effect if you configure using
+### the `configure` script directly.
+
+## `erl_xcomp_build` - The build system used. This value will be passed as
+## `--build=$erl_xcomp_build` argument to the `configure` script. It does
+## not have to be a full `CPU-VENDOR-OS` triplet, but can be. The full
+## `CPU-VENDOR-OS` triplet will be created by
+## `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_build`.
+## If set to `guess`, the build system will be guessed using
+## `$ERL_TOP/erts/autoconf/config.guess`.
erl_xcomp_build=guess
-## erl_xcomp_host - Cross host system.
-## This value will be passed as `--host=$erl_xcomp_host' argument to the
-## `configure' script. It does not have to be a full CPU-VENDOR-OS triplet,
-## but can be. The full CPU-VENDOR-OS triplet will be created by:
-## `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host'
+## `erl_xcomp_host` - Cross host/target system to build for. This value will
+## be passed as `--host=$erl_xcomp_host` argument to the `configure` script.
+## It does not have to be a full `CPU-VENDOR-OS` triplet, but can be. The
+## full `CPU-VENDOR-OS` triplet will be created by:
+## `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host`
erl_xcomp_host=powerpc-wrs-vxworks
-## erl_xcomp_configure_flags - Extra configure flags.
-## Extra flags to pass to the `configure' script.
+## `erl_xcomp_configure_flags` - Extra configure flags to pass to the
+## `configure` script.
erl_xcomp_configure_flags="--disable-threads --without-termcap"
-### ---- Cross compiler and other tools to use --------------------------------
+### ### Cross Compiler and Other Tools ###
-### If the cross compilation tools are prefixed by `<HOST>-' you probably do
-### not need to set these variables (where `<HOST>' is what has been passed as
-### `--host=<HOST>' argument to `configure').
+### If the cross compilation tools are prefixed by `<HOST>-` you probably do
+### not need to set these variables (where `<HOST>` is what has been passed as
+### `--host=<HOST>` argument to `configure`).
-## CC - C compiler.
+### All variables in this section can also be used when native compiling.
+
+## `CC` - C compiler.
CC="$WIND_BASE/gnu/3.4.4-vxworks-6.3/$WIND_HOST_TYPE/bin/ccppc"
-## CFLAGS - C compiler flags.
+## `CFLAGS` - C compiler flags.
CFLAGS="-DCPU=PPC32 -DTOOL_FAMILY=gnu -DTOOL=gnu -DWANT_NONBLOCKING -DHAVE_SENS -DHAVE_MEMMOVE -DVXWORKS -I$WIND_BASE/vxworks-6.3/target/h -I$WIND_BASE/gnu/3.4.4-vxworks-6.3/$WIND_HOST_TYPE/lib/gcc/powerpc-wrs-vxworks/3.4.4/include -I$WIND_BASE/vxworks-6.3/target/h/wrn/coreip -I$WIND_BASE/vxworks-6.3/target/h -mstrict-align -fvolatile -fno-builtin -mlongcall"
-## STATIC_CFLAGS - Static C compiler flags.
+## `STATIC_CFLAGS` - Static C compiler flags.
#STATIC_CFLAGS=
-## CFLAG_RUNTIME_LIBRARY_PATH - C compiler runtime library path flag.
-## This flag should set a specific runtime library path for the shared
-## library at link time. Note that this is actually a linker flag, but it
-## needs to be passed via the compiler.
+## `CFLAG_RUNTIME_LIBRARY_PATH` - This flag should set runtime library
+## search path for the shared libraries. Note that this actually is a
+## linker flag, but it needs to be passed via the compiler.
#CFLAG_RUNTIME_LIBRARY_PATH=
-## CPP - C pre-processor.
+## `CPP` - C pre-processor.
CPP="$CC $CFLAGS -E"
-## CPPFLAGS - C pre-processor flags.
+## `CPPFLAGS` - C pre-processor flags.
#CPPFLAGS=
-## CXX - C++ compiler.
+## `CXX` - C++ compiler.
#CXX=
-## CXXFLAGS - C++ compiler flags.
+## `CXXFLAGS` - C++ compiler flags.
#CXXFLAGS=
-## LD - Linker.
+## `LD` - Linker.
LD="$WIND_BASE/gnu/3.4.4-vxworks-6.3/$WIND_HOST_TYPE/bin/ldppc"
-## LDFLAGS - Linker flags.
+## `LDFLAGS` - Linker flags.
LDFLAGS="-mlongcall"
-## LIBS - Libraries.
+## `LIBS` - Libraries.
#LIBS=
-### -- Dynamic Erlang Driver linker flags --
+### #### *D*ynamic *E*rlang *D*river Linking ####
-### NOTE! Either set all or non of the DED_LD* variables.
+### *NOTE*! Either set all or none of the `DED_LD*` variables.
-## DED_LD - Linker.
+## `DED_LD` - Linker for Dynamically loaded Erlang Drivers.
#DED_LD=
-## DED_LDFLAGS - Linker flags.
+## `DED_LDFLAGS` - Linker flags to use with `DED_LD`.
#DED_LDFLAGS=
-## DED_LD_FLAG_RUNTIME_LIBRARY_PATH - Linker runtime library path flag.
-## This flag should set a specific runtime library path for the shared
-## library at link time.
+## `DED_LD_FLAG_RUNTIME_LIBRARY_PATH` - This flag should set runtime library
+## search path for shared libraries when linking with `DED_LD`.
#DED_LD_FLAG_RUNTIME_LIBRARY_PATH=
-### -- Large file support --
+### #### Large File Support ####
-### NOTE! Either set all or non of the LFS_* variables.
+### *NOTE*! Either set all or none of the `LFS_*` variables.
-## LFS_CFLAGS - Large file support C compiler flags.
+## `LFS_CFLAGS` - Large file support C compiler flags.
#LFS_CFLAGS=
-## LFS_LDFLAGS - Large file support linker flags.
+## `LFS_LDFLAGS` - Large file support linker flags.
#LFS_LDFLAGS=
-## LFS_LIBS - Large file support libraries.
+## `LFS_LIBS` - Large file support libraries.
#LFS_LIBS=
-### -- Other tools --
+### #### Other Tools ####
-## RANLIB - `ranlib' archive index tool.
+## `RANLIB` - `ranlib` archive index tool.
RANLIB="$WIND_BASE/gnu/3.4.4-vxworks-6.3/$WIND_HOST_TYPE/bin/ranlibppc"
-## AR - `ar' archiving tool.
+## `AR` - `ar` archiving tool.
AR="$WIND_BASE/gnu/3.4.4-vxworks-6.3/$WIND_HOST_TYPE/bin/arppc"
-## GETCONF - `getconf' system configuration inspection tool.
+## `GETCONF` - `getconf` system configuration inspection tool. `getconf` is
+## currently used for finding out large file support flags to use, and
+## on Linux systems for finding out if we have an NPTL thread library or
+## not.
#GETCONF=
-### ---- Cross System Root Locations ------------------------------------------
+### ### Cross System Root Locations ###
-## erl_xcomp_sysroot - Absolute cross system root path.
-## The absolute path to the system root of the cross compilation
-## environment. Currently, the `crypto', `odbc', `ssh' and `ssl'
-## applications need the system root. These applications will be skipped
-## if the system root has not been set. The system root might be needed
-## for other things too. If this is the case and the system root has not
-## been set, `configure' will fail and request you to set it.
+## `erl_xcomp_sysroot` - The absolute path to the system root of the cross
+## compilation environment. Currently, the `crypto`, `odbc`, `ssh` and
+## `ssl` applications need the system root. These applications will be
+## skipped if the system root has not been set. The system root might be
+## needed for other things too. If this is the case and the system root
+## has not been set, `configure` will fail and request you to set it.
#erl_xcomp_sysroot=
-## erl_xcomp_isysroot - Absolute cross include system root path.
-## The absolute path to the system root for includes of the cross
-## compilation environment. If not set, this value defaults to
-## `$erl_xcomp_sysroot', i.e., only set this value if the include system
+## `erl_xcomp_isysroot` - The absolute path to the system root for includes
+## of the cross compilation environment. If not set, this value defaults
+## to `$erl_xcomp_sysroot`, i.e., only set this value if the include system
## root path is not the same as the system root path.
#erl_xcomp_isysroot=
-### ---- Optional feature, or bug tests ---------------------------------------
+### ### Optional Feature, and Bug Tests ###
### These tests cannot (always) be done automatically when cross compiling. You
-### usually does not need to set these variables. Only set these if you really
+### usually do not need to set these variables. Only set these if you really
### know what you are doing.
### Note that some of these values will override results of tests performed
-### by `configure', and some will not be used until `configure' is sure that
+### by `configure`, and some will not be used until `configure` is sure that
### it cannot figure the result out.
-### The `configure' script will issue a warning when a default value is used.
+### The `configure` script will issue a warning when a default value is used.
### When a variable has been set, no warning will be issued.
-## erl_xcomp_bigendian - yes|no
-## If `yes', the target system must be big endian. If `no', little endian.
-## This can often be automatically detected, but not always. If not
-## automatically detected, `configure' will fail unless this variable is
-## set. No default value is used, i.e., `configure' will try to figure
-## this out automatically.
-erl_xcomp_bigendian=yes
+## `erl_xcomp_after_morecore_hook` - `yes|no`. Defaults to `no`. If `yes`, the
+## target system must have a working `__after_morecore_hook` that can be
+## used for tracking used `malloc()` implementations core memory usage.
+## This is currently only used by unsupported features.
+#erl_xcomp_after_morecore_hook=
-## erl_xcomp_linux_clock_gettime_correction - yes|no (defaults to `yes' on
-## Linux; otherwise, `no')
-## If `yes', `clock_gettime(CLOCK_MONOTONIC, _)' on the target system must
-## work. This variable is recommended to be set to `no' on Linux systems
-## with kernel versions less than 2.6.
-#erl_xcomp_linux_clock_gettime_correction=
+## `erl_xcomp_bigendian` - `yes|no`. No default. If `yes`, the target system
+## must be big endian. If `no`, little endian. This can often be
+## automatically detected, but not always. If not automatically detected,
+## `configure` will fail unless this variable is set. Since no default
+## value is used, `configure` will try to figure this out automatically.
+erl_xcomp_bigendian=yes
-## erl_xcomp_linux_nptl - yes|no (defaults to `yes' on Linux; otherwise, `no')
-## If `yes', the target system must have NPTL (Native POSIX Thread Library).
-## Older Linux systems have LinuxThreads instead of NPTL (Linux kernel
-## versions typically less than 2.6).
-#erl_xcomp_linux_nptl=
+## `erl_xcomp_clock_gettime_cpu_time` - `yes|no`. Defaults to `no`. If `yes`,
+## the target system must have a working `clock_gettime()` implementation
+## that can be used for retrieving process CPU time.
+#erl_xcomp_clock_gettime_cpu_time=
-## erl_xcomp_linux_usable_sigusrx - yes|no (defaults to `yes')
-## If `yes', the `SIGUSR1' and `SIGUSR2' signals must be usable by the ERTS.
-## Old LinuxThreads thread libraries (Linux kernel versions less than 2.2)
-## used these signals and made them unusable by the ERTS.
-#erl_xcomp_linux_usable_sigusrx=
+## `erl_xcomp_getaddrinfo` - `yes|no`. Defaults to `no`. If `yes`, the target
+## system must have a working `getaddrinfo()` implementation that can
+## handle both IPv4 and IPv6.
+#erl_xcomp_getaddrinfo=
-## erl_xcomp_linux_usable_sigaltstack - yes|no (defaults to `yes' on Linux;
-## otherwise, `no')
-## If `yes', `sigaltstack()' must be usable on the target system.
-## `sigaltstack()' on Linux kernel versions less than 2.4 are broken.
-#erl_xcomp_linux_usable_sigaltstack=
+## `erl_xcomp_gethrvtime_procfs_ioctl` - `yes|no`. Defaults to `no`. If `yes`,
+## the target system must have a working `gethrvtime()` implementation and
+## is used with procfs `ioctl()`.
+#erl_xcomp_gethrvtime_procfs_ioctl=
-## erl_xcomp_poll - yes|no (defaults to `no' on Darwin/MacOSX; otherwise, `yes')
-## If `yes', the target system must have a working `poll()' implementation
-## that also can handle devices. If `no', `select()' will be used instead of
-## `poll()'.
-#erl_xcomp_poll=
+## `erl_xcomp_dlsym_brk_wrappers` - `yes|no`. Defaults to `no`. If `yes`, the
+## target system must have a working `dlsym(RTLD_NEXT, <S>)` implementation
+## that can be used on `brk` and `sbrk` symbols used by the `malloc()`
+## implementation in use, and by this track the `malloc()` implementations
+## core memory usage. This is currently only used by unsupported features.
+#erl_xcomp_dlsym_brk_wrappers=
-## erl_xcomp_kqueue - yes|no (defaults to `no')
-## If `yes', the target system must have a working `kqueue()' implementation
-## that returns a file descriptor which can be used by `poll()' and/or
-## `select()'. If `no' and the target system has not got `epoll()' or
-## `/dev/poll', the kernel-poll feature will be disabled.
+## `erl_xcomp_kqueue` - `yes|no`. Defaults to `no`. If `yes`, the target system
+## must have a working `kqueue()` implementation that returns a file
+## descriptor which can be used by `poll()` and/or `select()`. If `no` and
+## the target system has not got `epoll()` or `/dev/poll`, the kernel-poll
+## feature will be disabled.
#erl_xcomp_kqueue=
-## erl_xcomp_putenv_copy - yes|no (defaults to `no')
-## If `yes', the target system must have a `putenv()' implementation that
-## stores a copy of the key/value pair.
-#erl_xcomp_putenv_copy=
+## `erl_xcomp_linux_clock_gettime_correction` - `yes|no`. Defaults to `yes` on
+## Linux; otherwise, `no`. If `yes`, `clock_gettime(CLOCK_MONOTONIC, _)` on
+## the target system must work. This variable is recommended to be set to
+## `no` on Linux systems with kernel versions less than 2.6.
+#erl_xcomp_linux_clock_gettime_correction=
-## erl_xcomp_reliable_fpe - yes|no (defaults to `no')
-## If `yes', the target system must have reliable floating point exceptions.
-#erl_xcomp_reliable_fpe=
+## `erl_xcomp_linux_nptl` - `yes|no`. Defaults to `yes` on Linux; otherwise,
+## `no`. If `yes`, the target system must have NPTL (Native POSIX Thread
+## Library). Older Linux systems have LinuxThreads instead of NPTL (Linux
+## kernel versions typically less than 2.6).
+#erl_xcomp_linux_nptl=
-## erl_xcomp_getaddrinfo - yes|no (defaults to `no')
-## If `yes', the target system must have a working `getaddrinfo()'
-## implementation that can handle both IPv4 and IPv6.
-#erl_xcomp_getaddrinfo=
+## `erl_xcomp_linux_usable_sigaltstack` - `yes|no`. Defaults to `yes` on Linux;
+## otherwise, `no`. If `yes`, `sigaltstack()` must be usable on the target
+## system. `sigaltstack()` on Linux kernel versions less than 2.4 are
+## broken.
+#erl_xcomp_linux_usable_sigaltstack=
-## erl_xcomp_gethrvtime_procfs_ioctl - yes|no (defaults to `no')
-## If `yes', the target system must have a working `gethrvtime()'
-## implementation and is used with procfs `ioctl()'.
-#erl_xcomp_gethrvtime_procfs_ioctl=
+## `erl_xcomp_linux_usable_sigusrx` - `yes|no`. Defaults to `yes`. If `yes`,
+## the `SIGUSR1` and `SIGUSR2` signals must be usable by the ERTS. Old
+## LinuxThreads thread libraries (Linux kernel versions typically less than
+## 2.2) used these signals and made them unusable by the ERTS.
+#erl_xcomp_linux_usable_sigusrx=
-## erl_xcomp_clock_gettime_cpu_time - yes|no (defaults to `no')
-## If `yes', the target system must have a working `clock_gettime()'
-## implementation that can be used for retrieving process CPU time.
-#erl_xcomp_clock_gettime_cpu_time=
+## `erl_xcomp_poll` - `yes|no`. Defaults to `no` on Darwin/MacOSX; otherwise,
+## `yes`. If `yes`, the target system must have a working `poll()`
+## implementation that also can handle devices. If `no`, `select()` will be
+## used instead of `poll()`.
+#erl_xcomp_poll=
-## erl_xcomp_after_morecore_hook - yes|no (defaults to `no')
-## If `yes', the target system must have a working `__after_morecore_hook'
-## that can be used for tracking used `malloc()' implementations core memory
-## usage.
-#erl_xcomp_after_morecore_hook=
+## `erl_xcomp_putenv_copy` - `yes|no`. Defaults to `no`. If `yes`, the target
+## system must have a `putenv()` implementation that stores a copy of the
+## key/value pair.
+#erl_xcomp_putenv_copy=
-## erl_xcomp_dlsym_brk_wrappers - yes|no (defaults to `no')
-## If `yes', the target system must have a working `dlsym(RTLD_NEXT, <S>)'
-## implementation that can be used on `brk' and `sbrk' symbols used by the
-## `malloc()' implementation in use, and by this track the `malloc()'
-## implementations core memory usage.
-#erl_xcomp_dlsym_brk_wrappers=
+## `erl_xcomp_reliable_fpe` - `yes|no`. Defaults to `no`. If `yes`, the target
+## system must have reliable floating point exceptions.
+#erl_xcomp_reliable_fpe=
-#### --------------------------------------------------------------------------
+####
diff --git a/xcomp/erl-xcomp-x86_64-saf-linux-gnu.conf b/xcomp/erl-xcomp-x86_64-saf-linux-gnu.conf
index 1d57876172..a0dd7c9115 100644
--- a/xcomp/erl-xcomp-x86_64-saf-linux-gnu.conf
+++ b/xcomp/erl-xcomp-x86_64-saf-linux-gnu.conf
@@ -21,239 +21,238 @@
#### Author: Rickard Green
####
#### --------------------------------------------------------------------------
-#### When cross compiling Erlang/OTP using `otp_build', copy this file and set
+#### When cross compiling Erlang/OTP using `otp_build`, copy this file and set
#### the variables needed below. Then pass the path to the copy of this file as
-#### an argument to `otp_build' in the configure stage:
-#### `otp_build configure --xcomp-conf=<FILE>'
+#### an argument to `otp_build` in the configure stage:
+#### `otp_build configure --xcomp-conf=<FILE>`
#### --------------------------------------------------------------------------
### Note that you cannot define arbitrary variables in a cross compilation
### configuration file. Only the ones listed below will be guaranteed to be
-### visible throughout the whole execution of all `configure' scripts. Other
-### variables needs to be defined as arguments to `configure' or exported in
+### visible throughout the whole execution of all `configure` scripts. Other
+### variables needs to be defined as arguments to `configure` or exported in
### the environment.
-### ---- `otp_build' only variables -------------------------------------------
+### ### Variables for `otp_build` Only ###
### Variables in this section are only used, when configuring Erlang/OTP for
-### cross compilation using `$ERL_TOP/otp_build configure'.
-
-### NOTE! These variables currently have *no* effect if you configure using the
-### `configure' script directly.
-
-## erl_xcomp_build - Build system.
-## This value will be passed as `--build=$erl_xcomp_build' argument to the
-## `configure' script. It does not have to be a full CPU-VENDOR-OS triplet,
-## but can be. The full CPU-VENDOR-OS triplet will be created by:
-## `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_build'
-## If `erl_xcomp_build=guess', the build system will be guessed using:
-## `$ERL_TOP/erts/autoconf/config.guess'.
+### cross compilation using `$ERL_TOP/otp_build configure`.
+
+### *NOTE*! These variables currently have *no* effect if you configure using
+### the `configure` script directly.
+
+## `erl_xcomp_build` - The build system used. This value will be passed as
+## `--build=$erl_xcomp_build` argument to the `configure` script. It does
+## not have to be a full `CPU-VENDOR-OS` triplet, but can be. The full
+## `CPU-VENDOR-OS` triplet will be created by
+## `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_build`.
+## If set to `guess`, the build system will be guessed using
+## `$ERL_TOP/erts/autoconf/config.guess`.
erl_xcomp_build=guess
-## erl_xcomp_host - Cross host system.
-## This value will be passed as `--host=$erl_xcomp_host' argument to the
-## `configure' script. It does not have to be a full CPU-VENDOR-OS triplet,
-## but can be. The full CPU-VENDOR-OS triplet will be created by:
-## `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host'
+## `erl_xcomp_host` - Cross host/target system to build for. This value will
+## be passed as `--host=$erl_xcomp_host` argument to the `configure` script.
+## It does not have to be a full `CPU-VENDOR-OS` triplet, but can be. The
+## full `CPU-VENDOR-OS` triplet will be created by:
+## `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host`
erl_xcomp_host=x86_64-saf-linux-gnu
-## erl_xcomp_configure_flags - Extra configure flags.
-## Extra flags to pass to the `configure' script.
+## `erl_xcomp_configure_flags` - Extra configure flags to pass to the
+## `configure` script.
#erl_xcomp_configure_flags=
-### ---- Cross compiler and other tools to use --------------------------------
+### ### Cross Compiler and Other Tools ###
-### If the cross compilation tools are prefixed by `<HOST>-' you probably do
-### not need to set these variables (where `<HOST>' is what has been passed as
-### `--host=<HOST>' argument to `configure').
+### If the cross compilation tools are prefixed by `<HOST>-` you probably do
+### not need to set these variables (where `<HOST>` is what has been passed as
+### `--host=<HOST>` argument to `configure`).
-## CC - C compiler.
+### All variables in this section can also be used when native compiling.
+
+## `CC` - C compiler.
CC=x86_64-saf-gcc
-## CFLAGS - C compiler flags.
+## `CFLAGS` - C compiler flags.
#CFLAGS=
-## STATIC_CFLAGS - Static C compiler flags.
+## `STATIC_CFLAGS` - Static C compiler flags.
#STATIC_CFLAGS=
-## CFLAG_RUNTIME_LIBRARY_PATH - C compiler runtime library path flag.
-## This flag should set a specific runtime library path for the shared
-## library at link time. Note that this is actually a linker flag, but it
-## needs to be passed via the compiler.
+## `CFLAG_RUNTIME_LIBRARY_PATH` - This flag should set runtime library
+## search path for the shared libraries. Note that this actually is a
+## linker flag, but it needs to be passed via the compiler.
#CFLAG_RUNTIME_LIBRARY_PATH=
-## CPP - C pre-processor.
+## `CPP` - C pre-processor.
#CPP=
-## CPPFLAGS - C pre-processor flags.
+## `CPPFLAGS` - C pre-processor flags.
#CPPFLAGS=
-## CXX - C++ compiler.
+## `CXX` - C++ compiler.
CXX=x86_64-saf-g++
-## CXXFLAGS - C++ compiler flags.
+## `CXXFLAGS` - C++ compiler flags.
#CXXFLAGS=
-## LD - Linker.
+## `LD` - Linker.
LD=x86_64-saf-ld
-## LDFLAGS - Linker flags.
+## `LDFLAGS` - Linker flags.
#LDFLAGS=
-## LIBS - Libraries.
+## `LIBS` - Libraries.
#LIBS=
-### -- Dynamic Erlang Driver linker flags --
+### #### *D*ynamic *E*rlang *D*river Linking ####
-### NOTE! Either set all or non of the DED_LD* variables.
+### *NOTE*! Either set all or none of the `DED_LD*` variables.
-## DED_LD - Linker.
+## `DED_LD` - Linker for Dynamically loaded Erlang Drivers.
#DED_LD=
-## DED_LDFLAGS - Linker flags.
+## `DED_LDFLAGS` - Linker flags to use with `DED_LD`.
#DED_LDFLAGS=
-## DED_LD_FLAG_RUNTIME_LIBRARY_PATH - Linker runtime library path flag.
-## This flag should set a specific runtime library path for the shared
-## library at link time.
+## `DED_LD_FLAG_RUNTIME_LIBRARY_PATH` - This flag should set runtime library
+## search path for shared libraries when linking with `DED_LD`.
#DED_LD_FLAG_RUNTIME_LIBRARY_PATH=
-### -- Large file support --
+### #### Large File Support ####
-### NOTE! Either set all or non of the LFS_* variables.
+### *NOTE*! Either set all or none of the `LFS_*` variables.
-## LFS_CFLAGS - Large file support C compiler flags.
+## `LFS_CFLAGS` - Large file support C compiler flags.
#LFS_CFLAGS=
-## LFS_LDFLAGS - Large file support linker flags.
+## `LFS_LDFLAGS` - Large file support linker flags.
#LFS_LDFLAGS=
-## LFS_LIBS - Large file support libraries.
+## `LFS_LIBS` - Large file support libraries.
#LFS_LIBS=
-### -- Other tools --
+### #### Other Tools ####
-## RANLIB - `ranlib' archive index tool.
+## `RANLIB` - `ranlib` archive index tool.
RANLIB=x86_64-saf-ranlib
-## AR - `ar' archiving tool.
+## `AR` - `ar` archiving tool.
AR=x86_64-saf-ar
-## GETCONF - `getconf' system configuration inspection tool.
+## `GETCONF` - `getconf` system configuration inspection tool. `getconf` is
+## currently used for finding out large file support flags to use, and
+## on Linux systems for finding out if we have an NPTL thread library or
+## not.
#GETCONF=
-### ---- Cross System Root Locations ------------------------------------------
+### ### Cross System Root Locations ###
-## erl_xcomp_sysroot - Absolute cross system root path.
-## The absolute path to the system root of the cross compilation
-## environment. Currently, the `crypto', `odbc', `ssh' and `ssl'
-## applications need the system root. These applications will be skipped
-## if the system root has not been set. The system root might be needed
-## for other things too. If this is the case and the system root has not
-## been set, `configure' will fail and request you to set it.
+## `erl_xcomp_sysroot` - The absolute path to the system root of the cross
+## compilation environment. Currently, the `crypto`, `odbc`, `ssh` and
+## `ssl` applications need the system root. These applications will be
+## skipped if the system root has not been set. The system root might be
+## needed for other things too. If this is the case and the system root
+## has not been set, `configure` will fail and request you to set it.
erl_xcomp_sysroot="$SAF_SYSROOT_X86_64"
-## erl_xcomp_isysroot - Absolute cross include system root path.
-## The absolute path to the system root for includes of the cross
-## compilation environment. If not set, this value defaults to
-## `$erl_xcomp_sysroot', i.e., only set this value if the include system
+## `erl_xcomp_isysroot` - The absolute path to the system root for includes
+## of the cross compilation environment. If not set, this value defaults
+## to `$erl_xcomp_sysroot`, i.e., only set this value if the include system
## root path is not the same as the system root path.
#erl_xcomp_isysroot=
-### ---- Optional feature, or bug tests ---------------------------------------
+### ### Optional Feature, and Bug Tests ###
### These tests cannot (always) be done automatically when cross compiling. You
-### usually does not need to set these variables. Only set these if you really
+### usually do not need to set these variables. Only set these if you really
### know what you are doing.
### Note that some of these values will override results of tests performed
-### by `configure', and some will not be used until `configure' is sure that
+### by `configure`, and some will not be used until `configure` is sure that
### it cannot figure the result out.
-### The `configure' script will issue a warning when a default value is used.
+### The `configure` script will issue a warning when a default value is used.
### When a variable has been set, no warning will be issued.
-## erl_xcomp_bigendian - yes|no
-## If `yes', the target system must be big endian. If `no', little endian.
-## This can often be automatically detected, but not always. If not
-## automatically detected, `configure' will fail unless this variable is
-## set. No default value is used, i.e., `configure' will try to figure
-## this out automatically.
-#erl_xcomp_bigendian=
+## `erl_xcomp_after_morecore_hook` - `yes|no`. Defaults to `no`. If `yes`, the
+## target system must have a working `__after_morecore_hook` that can be
+## used for tracking used `malloc()` implementations core memory usage.
+## This is currently only used by unsupported features.
+erl_xcomp_after_morecore_hook=yes
-## erl_xcomp_linux_clock_gettime_correction - yes|no (defaults to `yes' on
-## Linux; otherwise, `no')
-## If `yes', `clock_gettime(CLOCK_MONOTONIC, _)' on the target system must
-## work. This variable is recommended to be set to `no' on Linux systems
-## with kernel versions less than 2.6.
-#erl_xcomp_linux_clock_gettime_correction=
+## `erl_xcomp_bigendian` - `yes|no`. No default. If `yes`, the target system
+## must be big endian. If `no`, little endian. This can often be
+## automatically detected, but not always. If not automatically detected,
+## `configure` will fail unless this variable is set. Since no default
+## value is used, `configure` will try to figure this out automatically.
+#erl_xcomp_bigendian=
-## erl_xcomp_linux_nptl - yes|no (defaults to `yes' on Linux; otherwise, `no')
-## If `yes', the target system must have NPTL (Native POSIX Thread Library).
-## Older Linux systems have LinuxThreads instead of NPTL (Linux kernel
-## versions typically less than 2.6).
-#erl_xcomp_linux_nptl=
+## `erl_xcomp_clock_gettime_cpu_time` - `yes|no`. Defaults to `no`. If `yes`,
+## the target system must have a working `clock_gettime()` implementation
+## that can be used for retrieving process CPU time.
+#erl_xcomp_clock_gettime_cpu_time=
-## erl_xcomp_linux_usable_sigusrx - yes|no (defaults to `yes')
-## If `yes', the `SIGUSR1' and `SIGUSR2' signals must be usable by the ERTS.
-## Old LinuxThreads thread libraries (Linux kernel versions less than 2.2)
-## used these signals and made them unusable by the ERTS.
-#erl_xcomp_linux_usable_sigusrx=
+## `erl_xcomp_getaddrinfo` - `yes|no`. Defaults to `no`. If `yes`, the target
+## system must have a working `getaddrinfo()` implementation that can
+## handle both IPv4 and IPv6.
+erl_xcomp_getaddrinfo=yes
-## erl_xcomp_linux_usable_sigaltstack - yes|no (defaults to `yes' on Linux;
-## otherwise, `no')
-## If `yes', `sigaltstack()' must be usable on the target system.
-## `sigaltstack()' on Linux kernel versions less than 2.4 are broken.
-#erl_xcomp_linux_usable_sigaltstack=
+## `erl_xcomp_gethrvtime_procfs_ioctl` - `yes|no`. Defaults to `no`. If `yes`,
+## the target system must have a working `gethrvtime()` implementation and
+## is used with procfs `ioctl()`.
+#erl_xcomp_gethrvtime_procfs_ioctl=
-## erl_xcomp_poll - yes|no (defaults to `no' on Darwin/MacOSX; otherwise, `yes')
-## If `yes', the target system must have a working `poll()' implementation
-## that also can handle devices. If `no', `select()' will be used instead of
-## `poll()'.
-#erl_xcomp_poll=
+## `erl_xcomp_dlsym_brk_wrappers` - `yes|no`. Defaults to `no`. If `yes`, the
+## target system must have a working `dlsym(RTLD_NEXT, <S>)` implementation
+## that can be used on `brk` and `sbrk` symbols used by the `malloc()`
+## implementation in use, and by this track the `malloc()` implementations
+## core memory usage. This is currently only used by unsupported features.
+#erl_xcomp_dlsym_brk_wrappers=
-## erl_xcomp_kqueue - yes|no (defaults to `no')
-## If `yes', the target system must have a working `kqueue()' implementation
-## that returns a file descriptor which can be used by `poll()' and/or
-## `select()'. If `no' and the target system has not got `epoll()' or
-## `/dev/poll', the kernel-poll feature will be disabled.
+## `erl_xcomp_kqueue` - `yes|no`. Defaults to `no`. If `yes`, the target system
+## must have a working `kqueue()` implementation that returns a file
+## descriptor which can be used by `poll()` and/or `select()`. If `no` and
+## the target system has not got `epoll()` or `/dev/poll`, the kernel-poll
+## feature will be disabled.
#erl_xcomp_kqueue=
-## erl_xcomp_putenv_copy - yes|no (defaults to `no')
-## If `yes', the target system must have a `putenv()' implementation that
-## stores a copy of the key/value pair.
-#erl_xcomp_putenv_copy=
+## `erl_xcomp_linux_clock_gettime_correction` - `yes|no`. Defaults to `yes` on
+## Linux; otherwise, `no`. If `yes`, `clock_gettime(CLOCK_MONOTONIC, _)` on
+## the target system must work. This variable is recommended to be set to
+## `no` on Linux systems with kernel versions less than 2.6.
+#erl_xcomp_linux_clock_gettime_correction=
-## erl_xcomp_reliable_fpe - yes|no (defaults to `no')
-## If `yes', the target system must have reliable floating point exceptions.
-#erl_xcomp_reliable_fpe=
+## `erl_xcomp_linux_nptl` - `yes|no`. Defaults to `yes` on Linux; otherwise,
+## `no`. If `yes`, the target system must have NPTL (Native POSIX Thread
+## Library). Older Linux systems have LinuxThreads instead of NPTL (Linux
+## kernel versions typically less than 2.6).
+#erl_xcomp_linux_nptl=
-## erl_xcomp_getaddrinfo - yes|no (defaults to `no')
-## If `yes', the target system must have a working `getaddrinfo()'
-## implementation that can handle both IPv4 and IPv6.
-erl_xcomp_getaddrinfo=yes
+## `erl_xcomp_linux_usable_sigaltstack` - `yes|no`. Defaults to `yes` on Linux;
+## otherwise, `no`. If `yes`, `sigaltstack()` must be usable on the target
+## system. `sigaltstack()` on Linux kernel versions less than 2.4 are
+## broken.
+#erl_xcomp_linux_usable_sigaltstack=
-## erl_xcomp_gethrvtime_procfs_ioctl - yes|no (defaults to `no')
-## If `yes', the target system must have a working `gethrvtime()'
-## implementation and is used with procfs `ioctl()'.
-#erl_xcomp_gethrvtime_procfs_ioctl=
+## `erl_xcomp_linux_usable_sigusrx` - `yes|no`. Defaults to `yes`. If `yes`,
+## the `SIGUSR1` and `SIGUSR2` signals must be usable by the ERTS. Old
+## LinuxThreads thread libraries (Linux kernel versions typically less than
+## 2.2) used these signals and made them unusable by the ERTS.
+#erl_xcomp_linux_usable_sigusrx=
-## erl_xcomp_clock_gettime_cpu_time - yes|no (defaults to `no')
-## If `yes', the target system must have a working `clock_gettime()'
-## implementation that can be used for retrieving process CPU time.
-#erl_xcomp_clock_gettime_cpu_time=
+## `erl_xcomp_poll` - `yes|no`. Defaults to `no` on Darwin/MacOSX; otherwise,
+## `yes`. If `yes`, the target system must have a working `poll()`
+## implementation that also can handle devices. If `no`, `select()` will be
+## used instead of `poll()`.
+#erl_xcomp_poll=
-## erl_xcomp_after_morecore_hook - yes|no (defaults to `no')
-## If `yes', the target system must have a working `__after_morecore_hook'
-## that can be used for tracking used `malloc()' implementations core memory
-## usage.
-erl_xcomp_after_morecore_hook=yes
+## `erl_xcomp_putenv_copy` - `yes|no`. Defaults to `no`. If `yes`, the target
+## system must have a `putenv()` implementation that stores a copy of the
+## key/value pair.
+#erl_xcomp_putenv_copy=
-## erl_xcomp_dlsym_brk_wrappers - yes|no (defaults to `no')
-## If `yes', the target system must have a working `dlsym(RTLD_NEXT, <S>)'
-## implementation that can be used on `brk' and `sbrk' symbols used by the
-## `malloc()' implementation in use, and by this track the `malloc()'
-## implementations core memory usage.
-#erl_xcomp_dlsym_brk_wrappers=
+## `erl_xcomp_reliable_fpe` - `yes|no`. Defaults to `no`. If `yes`, the target
+## system must have reliable floating point exceptions.
+#erl_xcomp_reliable_fpe=
-#### --------------------------------------------------------------------------
+####
diff --git a/xcomp/erl-xcomp.conf.template b/xcomp/erl-xcomp.conf.template
index afbef66af1..090f92c15f 100644
--- a/xcomp/erl-xcomp.conf.template
+++ b/xcomp/erl-xcomp.conf.template
@@ -21,239 +21,238 @@
#### Author: Rickard Green
####
#### --------------------------------------------------------------------------
-#### When cross compiling Erlang/OTP using `otp_build', copy this file and set
+#### When cross compiling Erlang/OTP using `otp_build`, copy this file and set
#### the variables needed below. Then pass the path to the copy of this file as
-#### an argument to `otp_build' in the configure stage:
-#### `otp_build configure --xcomp-conf=<FILE>'
+#### an argument to `otp_build` in the configure stage:
+#### `otp_build configure --xcomp-conf=<FILE>`
#### --------------------------------------------------------------------------
### Note that you cannot define arbitrary variables in a cross compilation
### configuration file. Only the ones listed below will be guaranteed to be
-### visible throughout the whole execution of all `configure' scripts. Other
-### variables needs to be defined as arguments to `configure' or exported in
+### visible throughout the whole execution of all `configure` scripts. Other
+### variables needs to be defined as arguments to `configure` or exported in
### the environment.
-### ---- `otp_build' only variables -------------------------------------------
+### ### Variables for `otp_build` Only ###
### Variables in this section are only used, when configuring Erlang/OTP for
-### cross compilation using `$ERL_TOP/otp_build configure'.
-
-### NOTE! These variables currently have *no* effect if you configure using the
-### `configure' script directly.
-
-## erl_xcomp_build - Build system.
-## This value will be passed as `--build=$erl_xcomp_build' argument to the
-## `configure' script. It does not have to be a full CPU-VENDOR-OS triplet,
-## but can be. The full CPU-VENDOR-OS triplet will be created by:
-## `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_build'
-## If `erl_xcomp_build=guess', the build system will be guessed using:
-## `$ERL_TOP/erts/autoconf/config.guess'.
+### cross compilation using `$ERL_TOP/otp_build configure`.
+
+### *NOTE*! These variables currently have *no* effect if you configure using
+### the `configure` script directly.
+
+## `erl_xcomp_build` - The build system used. This value will be passed as
+## `--build=$erl_xcomp_build` argument to the `configure` script. It does
+## not have to be a full `CPU-VENDOR-OS` triplet, but can be. The full
+## `CPU-VENDOR-OS` triplet will be created by
+## `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_build`.
+## If set to `guess`, the build system will be guessed using
+## `$ERL_TOP/erts/autoconf/config.guess`.
#erl_xcomp_build=
-## erl_xcomp_host - Cross host system.
-## This value will be passed as `--host=$erl_xcomp_host' argument to the
-## `configure' script. It does not have to be a full CPU-VENDOR-OS triplet,
-## but can be. The full CPU-VENDOR-OS triplet will be created by:
-## `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host'
+## `erl_xcomp_host` - Cross host/target system to build for. This value will
+## be passed as `--host=$erl_xcomp_host` argument to the `configure` script.
+## It does not have to be a full `CPU-VENDOR-OS` triplet, but can be. The
+## full `CPU-VENDOR-OS` triplet will be created by:
+## `$ERL_TOP/erts/autoconf/config.sub $erl_xcomp_host`
#erl_xcomp_host=
-## erl_xcomp_configure_flags - Extra configure flags.
-## Extra flags to pass to the `configure' script.
+## `erl_xcomp_configure_flags` - Extra configure flags to pass to the
+## `configure` script.
#erl_xcomp_configure_flags=
-### ---- Cross compiler and other tools to use --------------------------------
+### ### Cross Compiler and Other Tools ###
-### If the cross compilation tools are prefixed by `<HOST>-' you probably do
-### not need to set these variables (where `<HOST>' is what has been passed as
-### `--host=<HOST>' argument to `configure').
+### If the cross compilation tools are prefixed by `<HOST>-` you probably do
+### not need to set these variables (where `<HOST>` is what has been passed as
+### `--host=<HOST>` argument to `configure`).
-## CC - C compiler.
+### All variables in this section can also be used when native compiling.
+
+## `CC` - C compiler.
#CC=
-## CFLAGS - C compiler flags.
+## `CFLAGS` - C compiler flags.
#CFLAGS=
-## STATIC_CFLAGS - Static C compiler flags.
+## `STATIC_CFLAGS` - Static C compiler flags.
#STATIC_CFLAGS=
-## CFLAG_RUNTIME_LIBRARY_PATH - C compiler runtime library path flag.
-## This flag should set a specific runtime library path for the shared
-## library at link time. Note that this is actually a linker flag, but it
-## needs to be passed via the compiler.
+## `CFLAG_RUNTIME_LIBRARY_PATH` - This flag should set runtime library
+## search path for the shared libraries. Note that this actually is a
+## linker flag, but it needs to be passed via the compiler.
#CFLAG_RUNTIME_LIBRARY_PATH=
-## CPP - C pre-processor.
+## `CPP` - C pre-processor.
#CPP=
-## CPPFLAGS - C pre-processor flags.
+## `CPPFLAGS` - C pre-processor flags.
#CPPFLAGS=
-## CXX - C++ compiler.
+## `CXX` - C++ compiler.
#CXX=
-## CXXFLAGS - C++ compiler flags.
+## `CXXFLAGS` - C++ compiler flags.
#CXXFLAGS=
-## LD - Linker.
+## `LD` - Linker.
#LD=
-## LDFLAGS - Linker flags.
+## `LDFLAGS` - Linker flags.
#LDFLAGS=
-## LIBS - Libraries.
+## `LIBS` - Libraries.
#LIBS=
-### -- Dynamic Erlang Driver linker flags --
+### #### *D*ynamic *E*rlang *D*river Linking ####
-### NOTE! Either set all or non of the DED_LD* variables.
+### *NOTE*! Either set all or none of the `DED_LD*` variables.
-## DED_LD - Linker.
+## `DED_LD` - Linker for Dynamically loaded Erlang Drivers.
#DED_LD=
-## DED_LDFLAGS - Linker flags.
+## `DED_LDFLAGS` - Linker flags to use with `DED_LD`.
#DED_LDFLAGS=
-## DED_LD_FLAG_RUNTIME_LIBRARY_PATH - Linker runtime library path flag.
-## This flag should set a specific runtime library path for the shared
-## library at link time.
+## `DED_LD_FLAG_RUNTIME_LIBRARY_PATH` - This flag should set runtime library
+## search path for shared libraries when linking with `DED_LD`.
#DED_LD_FLAG_RUNTIME_LIBRARY_PATH=
-### -- Large file support --
+### #### Large File Support ####
-### NOTE! Either set all or non of the LFS_* variables.
+### *NOTE*! Either set all or none of the `LFS_*` variables.
-## LFS_CFLAGS - Large file support C compiler flags.
+## `LFS_CFLAGS` - Large file support C compiler flags.
#LFS_CFLAGS=
-## LFS_LDFLAGS - Large file support linker flags.
+## `LFS_LDFLAGS` - Large file support linker flags.
#LFS_LDFLAGS=
-## LFS_LIBS - Large file support libraries.
+## `LFS_LIBS` - Large file support libraries.
#LFS_LIBS=
-### -- Other tools --
+### #### Other Tools ####
-## RANLIB - `ranlib' archive index tool.
+## `RANLIB` - `ranlib` archive index tool.
#RANLIB=
-## AR - `ar' archiving tool.
+## `AR` - `ar` archiving tool.
#AR=
-## GETCONF - `getconf' system configuration inspection tool.
+## `GETCONF` - `getconf` system configuration inspection tool. `getconf` is
+## currently used for finding out large file support flags to use, and
+## on Linux systems for finding out if we have an NPTL thread library or
+## not.
#GETCONF=
-### ---- Cross System Root Locations ------------------------------------------
+### ### Cross System Root Locations ###
-## erl_xcomp_sysroot - Absolute cross system root path.
-## The absolute path to the system root of the cross compilation
-## environment. Currently, the `crypto', `odbc', `ssh' and `ssl'
-## applications need the system root. These applications will be skipped
-## if the system root has not been set. The system root might be needed
-## for other things too. If this is the case and the system root has not
-## been set, `configure' will fail and request you to set it.
+## `erl_xcomp_sysroot` - The absolute path to the system root of the cross
+## compilation environment. Currently, the `crypto`, `odbc`, `ssh` and
+## `ssl` applications need the system root. These applications will be
+## skipped if the system root has not been set. The system root might be
+## needed for other things too. If this is the case and the system root
+## has not been set, `configure` will fail and request you to set it.
#erl_xcomp_sysroot=
-## erl_xcomp_isysroot - Absolute cross include system root path.
-## The absolute path to the system root for includes of the cross
-## compilation environment. If not set, this value defaults to
-## `$erl_xcomp_sysroot', i.e., only set this value if the include system
+## `erl_xcomp_isysroot` - The absolute path to the system root for includes
+## of the cross compilation environment. If not set, this value defaults
+## to `$erl_xcomp_sysroot`, i.e., only set this value if the include system
## root path is not the same as the system root path.
#erl_xcomp_isysroot=
-### ---- Optional feature, or bug tests ---------------------------------------
+### ### Optional Feature, and Bug Tests ###
### These tests cannot (always) be done automatically when cross compiling. You
-### usually does not need to set these variables. Only set these if you really
+### usually do not need to set these variables. Only set these if you really
### know what you are doing.
### Note that some of these values will override results of tests performed
-### by `configure', and some will not be used until `configure' is sure that
+### by `configure`, and some will not be used until `configure` is sure that
### it cannot figure the result out.
-### The `configure' script will issue a warning when a default value is used.
+### The `configure` script will issue a warning when a default value is used.
### When a variable has been set, no warning will be issued.
-## erl_xcomp_bigendian - yes|no
-## If `yes', the target system must be big endian. If `no', little endian.
-## This can often be automatically detected, but not always. If not
-## automatically detected, `configure' will fail unless this variable is
-## set. No default value is used, i.e., `configure' will try to figure
-## this out automatically.
-#erl_xcomp_bigendian=
+## `erl_xcomp_after_morecore_hook` - `yes|no`. Defaults to `no`. If `yes`, the
+## target system must have a working `__after_morecore_hook` that can be
+## used for tracking used `malloc()` implementations core memory usage.
+## This is currently only used by unsupported features.
+#erl_xcomp_after_morecore_hook=
-## erl_xcomp_linux_clock_gettime_correction - yes|no (defaults to `yes' on
-## Linux; otherwise, `no')
-## If `yes', `clock_gettime(CLOCK_MONOTONIC, _)' on the target system must
-## work. This variable is recommended to be set to `no' on Linux systems
-## with kernel versions less than 2.6.
-#erl_xcomp_linux_clock_gettime_correction=
+## `erl_xcomp_bigendian` - `yes|no`. No default. If `yes`, the target system
+## must be big endian. If `no`, little endian. This can often be
+## automatically detected, but not always. If not automatically detected,
+## `configure` will fail unless this variable is set. Since no default
+## value is used, `configure` will try to figure this out automatically.
+#erl_xcomp_bigendian=
-## erl_xcomp_linux_nptl - yes|no (defaults to `yes' on Linux; otherwise, `no')
-## If `yes', the target system must have NPTL (Native POSIX Thread Library).
-## Older Linux systems have LinuxThreads instead of NPTL (Linux kernel
-## versions typically less than 2.6).
-#erl_xcomp_linux_nptl=
+## `erl_xcomp_clock_gettime_cpu_time` - `yes|no`. Defaults to `no`. If `yes`,
+## the target system must have a working `clock_gettime()` implementation
+## that can be used for retrieving process CPU time.
+#erl_xcomp_clock_gettime_cpu_time=
-## erl_xcomp_linux_usable_sigusrx - yes|no (defaults to `yes')
-## If `yes', the `SIGUSR1' and `SIGUSR2' signals must be usable by the ERTS.
-## Old LinuxThreads thread libraries (Linux kernel versions less than 2.2)
-## used these signals and made them unusable by the ERTS.
-#erl_xcomp_linux_usable_sigusrx=
+## `erl_xcomp_getaddrinfo` - `yes|no`. Defaults to `no`. If `yes`, the target
+## system must have a working `getaddrinfo()` implementation that can
+## handle both IPv4 and IPv6.
+#erl_xcomp_getaddrinfo=
-## erl_xcomp_linux_usable_sigaltstack - yes|no (defaults to `yes' on Linux;
-## otherwise, `no')
-## If `yes', `sigaltstack()' must be usable on the target system.
-## `sigaltstack()' on Linux kernel versions less than 2.4 are broken.
-#erl_xcomp_linux_usable_sigaltstack=
+## `erl_xcomp_gethrvtime_procfs_ioctl` - `yes|no`. Defaults to `no`. If `yes`,
+## the target system must have a working `gethrvtime()` implementation and
+## is used with procfs `ioctl()`.
+#erl_xcomp_gethrvtime_procfs_ioctl=
-## erl_xcomp_poll - yes|no (defaults to `no' on Darwin/MacOSX; otherwise, `yes')
-## If `yes', the target system must have a working `poll()' implementation
-## that also can handle devices. If `no', `select()' will be used instead of
-## `poll()'.
-#erl_xcomp_poll=
+## `erl_xcomp_dlsym_brk_wrappers` - `yes|no`. Defaults to `no`. If `yes`, the
+## target system must have a working `dlsym(RTLD_NEXT, <S>)` implementation
+## that can be used on `brk` and `sbrk` symbols used by the `malloc()`
+## implementation in use, and by this track the `malloc()` implementations
+## core memory usage. This is currently only used by unsupported features.
+#erl_xcomp_dlsym_brk_wrappers=
-## erl_xcomp_kqueue - yes|no (defaults to `no')
-## If `yes', the target system must have a working `kqueue()' implementation
-## that returns a file descriptor which can be used by `poll()' and/or
-## `select()'. If `no' and the target system has not got `epoll()' or
-## `/dev/poll', the kernel-poll feature will be disabled.
+## `erl_xcomp_kqueue` - `yes|no`. Defaults to `no`. If `yes`, the target system
+## must have a working `kqueue()` implementation that returns a file
+## descriptor which can be used by `poll()` and/or `select()`. If `no` and
+## the target system has not got `epoll()` or `/dev/poll`, the kernel-poll
+## feature will be disabled.
#erl_xcomp_kqueue=
-## erl_xcomp_putenv_copy - yes|no (defaults to `no')
-## If `yes', the target system must have a `putenv()' implementation that
-## stores a copy of the key/value pair.
-#erl_xcomp_putenv_copy=
+## `erl_xcomp_linux_clock_gettime_correction` - `yes|no`. Defaults to `yes` on
+## Linux; otherwise, `no`. If `yes`, `clock_gettime(CLOCK_MONOTONIC, _)` on
+## the target system must work. This variable is recommended to be set to
+## `no` on Linux systems with kernel versions less than 2.6.
+#erl_xcomp_linux_clock_gettime_correction=
-## erl_xcomp_reliable_fpe - yes|no (defaults to `no')
-## If `yes', the target system must have reliable floating point exceptions.
-#erl_xcomp_reliable_fpe=
+## `erl_xcomp_linux_nptl` - `yes|no`. Defaults to `yes` on Linux; otherwise,
+## `no`. If `yes`, the target system must have NPTL (Native POSIX Thread
+## Library). Older Linux systems have LinuxThreads instead of NPTL (Linux
+## kernel versions typically less than 2.6).
+#erl_xcomp_linux_nptl=
-## erl_xcomp_getaddrinfo - yes|no (defaults to `no')
-## If `yes', the target system must have a working `getaddrinfo()'
-## implementation that can handle both IPv4 and IPv6.
-#erl_xcomp_getaddrinfo=
+## `erl_xcomp_linux_usable_sigaltstack` - `yes|no`. Defaults to `yes` on Linux;
+## otherwise, `no`. If `yes`, `sigaltstack()` must be usable on the target
+## system. `sigaltstack()` on Linux kernel versions less than 2.4 are
+## broken.
+#erl_xcomp_linux_usable_sigaltstack=
-## erl_xcomp_gethrvtime_procfs_ioctl - yes|no (defaults to `no')
-## If `yes', the target system must have a working `gethrvtime()'
-## implementation and is used with procfs `ioctl()'.
-#erl_xcomp_gethrvtime_procfs_ioctl=
+## `erl_xcomp_linux_usable_sigusrx` - `yes|no`. Defaults to `yes`. If `yes`,
+## the `SIGUSR1` and `SIGUSR2` signals must be usable by the ERTS. Old
+## LinuxThreads thread libraries (Linux kernel versions typically less than
+## 2.2) used these signals and made them unusable by the ERTS.
+#erl_xcomp_linux_usable_sigusrx=
-## erl_xcomp_clock_gettime_cpu_time - yes|no (defaults to `no')
-## If `yes', the target system must have a working `clock_gettime()'
-## implementation that can be used for retrieving process CPU time.
-#erl_xcomp_clock_gettime_cpu_time=
+## `erl_xcomp_poll` - `yes|no`. Defaults to `no` on Darwin/MacOSX; otherwise,
+## `yes`. If `yes`, the target system must have a working `poll()`
+## implementation that also can handle devices. If `no`, `select()` will be
+## used instead of `poll()`.
+#erl_xcomp_poll=
-## erl_xcomp_after_morecore_hook - yes|no (defaults to `no')
-## If `yes', the target system must have a working `__after_morecore_hook'
-## that can be used for tracking used `malloc()' implementations core memory
-## usage.
-#erl_xcomp_after_morecore_hook=
+## `erl_xcomp_putenv_copy` - `yes|no`. Defaults to `no`. If `yes`, the target
+## system must have a `putenv()` implementation that stores a copy of the
+## key/value pair.
+#erl_xcomp_putenv_copy=
-## erl_xcomp_dlsym_brk_wrappers - yes|no (defaults to `no')
-## If `yes', the target system must have a working `dlsym(RTLD_NEXT, <S>)'
-## implementation that can be used on `brk' and `sbrk' symbols used by the
-## `malloc()' implementation in use, and by this track the `malloc()'
-## implementations core memory usage.
-#erl_xcomp_dlsym_brk_wrappers=
+## `erl_xcomp_reliable_fpe` - `yes|no`. Defaults to `no`. If `yes`, the target
+## system must have reliable floating point exceptions.
+#erl_xcomp_reliable_fpe=
-#### --------------------------------------------------------------------------
+####