stdlib: Tweak ets_SUITE:heir to not exhaust memory

while trying to spawn a process with a specific pid
Support ANSI in the console
Teach erl_interface configure more pthread support

- Teach lib/erl_interface/configure.in to look for
  pthreads support in libc (where it can be found on QNX)

- A minor tweak such that this configure *fails* if you pass --enable-threads and
  no pthreads support can be found.
add code:get_mode() to detect how the code server behaves

Some applications (like IDEs) have code to be loaded dynamically on a
node. It may be slow to load everything upfront every time, so if the
node is in interactive mode, we would like to just append to the load
path. This provides a way to detect if the node is running
in embedded mode or not.
Removed ip options to gen_tcp from ssh.erl
is_boolean/1 is called instead of checking
EEP 37: Funs with names

This adds optional names to fun expressions. A named fun expression
is parsed as a tuple `{named_fun,Loc,Name,Clauses}` in erl_parse.

If a fun expression has a name, it must be present and be the same in
every of its clauses. The function name shadows the environment of the
expression shadowing the environment and it is shadowed by the
environment of the clauses' arguments. An unused function name triggers
a warning unless it is prefixed by _, just as every variable.
Variable _ is allowed as a function name.

It is not an error to put a named function in a record field default
value.

When transforming to Core Erlang, the named fun Fun is changed into
the following expression:

    letrec 'Fun'/Arity =
               fun (Args) ->
                       let <Fun> = 'Fun'/Arity
                       in Case
    in 'Fun'/Arity

where Args is the list of arguments of 'Fun'/Arity and Case the
Core Erlang expression corresponding to the clauses of Fun.

This transformation allows us to entirely skip any k_var to k_local
transformation in the fun's clauses bodies.

# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
# Not currently on any branch.
# You are currently editing a commit during a rebase.
#
# Changes to be committed:
#   (use "git reset HEAD^1 <file>..." to unstage)
#
#	modified:   lib/compiler/src/sys_expand_pmod.erl
#	modified:   lib/compiler/src/sys_pre_expand.erl
#	modified:   lib/compiler/src/v3_core.erl
#	modified:   lib/stdlib/examples/erl_id_trans.erl
#	modified:   lib/stdlib/src/epp.erl
#	modified:   lib/stdlib/src/erl_expand_records.erl
#	modified:   lib/stdlib/src/erl_lint.erl
#	modified:   lib/stdlib/src/erl_parse.yrl
#	modified:   lib/stdlib/src/erl_pp.erl
#	modified:   lib/stdlib/src/ms_transform.erl
#	modified:   lib/stdlib/src/qlc_pt.erl
#	modified:   lib/syntax_tools/src/erl_syntax.erl
#	modified:   lib/tools/src/cover.erl
#	modified:   lib/tools/src/xref_reader.erl
#
# Untracked files:
#   (use "git add <file>..." to include in what will be committed)
#
#	.otp.plt
#	bench_map.E
#	bench_map.P
#	bench_map.S
#	bench_map.abstr
#	bench_map.erl
#	bench_map.kernel
#	bench_map.pp
#	blah.erl
#	fact.S
#	fact.dis
#	fact.erl
#	fact.kernel
#	fact.life
#	foo.erl
#	lib/appmon/otp-eep37/
#	lib/asn1/otp-eep37/
#	lib/common_test/otp-eep37/
#	lib/compiler/otp-eep37/
#	lib/compiler/test/inline_SUITE.S
#	lib/compiler/test/inline_SUITE.core
#	lib/debugger/otp-eep37/
#	lib/erl_interface/otp-eep37/
#	lib/gs/contribs/otp-eep37/
#	lib/gs/otp-eep37/
#	lib/ic/examples/otp-eep37/
#	lib/ic/java_src/com/ericsson/otp/otp-eep37/
#	lib/ic/otp-eep37/
#	lib/inets/examples/otp-eep37/
#	lib/inets/otp-eep37/
#	lib/inets/src/otp-eep37/
#	lib/jinterface/java_src/com/ericsson/otp/otp-eep37/
#	lib/kernel/otp-eep37/
#	lib/mnesia/otp-eep37/
#	lib/otp_mibs/otp-eep37/
#	lib/reltool/otp-eep37/
#	lib/runtime_tools/otp-eep37/
#	lib/sasl/otp-eep37/
#	lib/snmp/examples/otp-eep37/
#	lib/snmp/otp-eep37/
#	lib/snmp/priv/conf/otp-eep37/
#	lib/snmp/src/otp-eep37/
#	lib/stdlib/doc/src/erl_parse.erl
#	lib/stdlib/otp-eep37/
#	lib/stdlib/test/erl_lint_SUITE_priv/
#	lib/stdlib/test/erl_pp_test.E
#	lib/stdlib/test/erl_pp_test.erl
#	lib/test_server/otp-eep37/
#	lib/tools/otp-eep37/
#	lib/wx/examples/otp-eep37/
#	lib/wx/otp-eep37/
#	rcomp.S
#	rcomp.erl
Update primary bootstrap for named funs
Support named funs in the shell
Update primary bootstrap for named funs in the shell
Support named funs in the debugger interpreter
Test named funs
Document named fun expressions
Merge branch 'ph/erl_interface/check-thread-support/OTP-10581' into maint

* ph/erl_interface/check-thread-support/OTP-10581:
  Teach erl_interface configure more pthread support
Merge branch 'maint'
Make public_key doc compile again
Merge branch 'ia/pan/fix-public-key-doc' into maint

* ia/pan/fix-public-key-doc:
  Make public_key doc compile again
Merge remote branch 'upstream/maint'
Merge branch 'sverk/ets_SUITE-heir-core'

* sverk/ets_SUITE-heir-core:
  stdlib: Tweak ets_SUITE:heir to not exhaust memory
Fix deep list argument error under Windows in os:cmd/1

Because of leeway in implementing os:cmd/1 under different OS there is
a difference in results when calling it with deep list
argument. os:cmd/1 specifies io_lib:chars() type for its argument and
io_lib functions can produce deep lists inspite of io_lib:chars()
result type specification. This commit flattens the argument for
erlang:open_port/2 (which is used under Windows) and expands the
os_SUITE to regress the bug.