erts: Don't redefine '_XOPEN_SOURCE'
erts: Fix tentative-definition-incomplete-type
ic: Suppress unused-value warning
odbc: Suppress signedness warnings for 'char *'

Three different pointer types are used for strings.

SQLCHAR pointer - used against ODBC driver
char pointer - used against erl_interface
byte pointer - used internally

SQLCHAR is 'unsigned char' while erl_interface is 'signed char'

byte pointer should probably not be used at all.
BER: Test decoding of indefinite lengths

The BER encoder always encodes length as definite lengths. Therefore
indefinite lengths are not well-tested. Add code to the roundtrip
functions in asn1_test_list to automatically rewrite definite
lengths to indefinite length and call the decoder again.
BER decoding: Improve error checking for indefinite length

When an indefinite length was given, the decoder could look beyond
the end of the buffer for the 0,0 that signals the end of the value.
stdlib: Document maps:with/2
stdlib: Test maps:with/2
Clarify error for slow `cpu_sup` port init

I noticed that running an R16B03-1 node on an overloaded host produced
log entries like the following ones:

```
2014-08-22 21:52:31 =ERROR REPORT====
Error in process <0.24112.3> on node '...@127.0.0.1' with exit value: {{case_clause,{data,4711}},[{cpu_sup,get_uint32_measurement,2,[{file,"cpu_sup.erl"},{line,227}]},{cpu_sup,measurement_server_loop,1,[{file,"cpu_sup.erl"},{line,585}]}]}
```

```
===== ALIVE Fri Aug 22 21:50:14 CEST 2014
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed
[os_mon] cpu supervisor port (cpu_sup): Erlang has closed

===== ALIVE Fri Aug 22 22:07:46 CEST 2014
```

I performed a code inspection on the `cpu_sup` module and I concluded
that the `case_clause` error shows a small issue in the `cpu_sup`
module, that happens when the port used in `cpu_sup` is slow to start
- as it may happen on an overloaded node.

The `cpu_sup` `gen_server` process keeps in its state the pid of an
unlinked process (called "measurement server" - see `cpu_sup:init/1`),
in order to do dirty stuff (e.g. reading the filesystem, running OS
commands) and start_link-ing & managing the connected process to a
port (called "port server" - see `measurement_server_init/0`). So the
process organization looks like this:

```
cpu_sup - measurement server - port server - port
```

When the measurement server start_links the port server (see
`port_server_start/0`) it sends a `{self(), ?ping}` message to it and
expects an answer within 6s, otherwise it returns `{error, timeout}`
rather than the pid. This has two issues:

* The measurement server keeps `{error, ...}` in its state as if it
  were a pid - that makes no sense;

* A late `{Pid, {data,4711}}` response may arrive in the mailbox of
  the measurement server, that will believe it to be a request to be
  processed, causing a `case_clause` error.

This commit teaches the measurement server to check the success of the
initialization of the port server by matching on the return value of
`port_server_start/0` (renamed to `port_server_start_link/0` for the
sake of clarity) in order to fail earlier and with an error clearer
than `{case_clause,{data,4711}}`. In such case I expect the
measurement server to be restarted by the `cpu_sup` `gen_server` (see
`handle_call/3`) - as before.

BTW It is not clear to me when the `handle_info({'EXIT', _Port,
Reason}, State)` may be called (the `cpu_sup` `gen_server` does not
link to the measurement server) but I am leaving it.
Teach the ASN.1 compiler the parse option
Teach the ASN.1 compiler to understand "EXPORTS ALL"

EXPORTS ALL is the same as leaving out the EXPORTS statement.
Teach the ASN.1 compiler to handle objects in field names
Rewrite get_referenced_type/2

Make sure that we continue to follow external references until
we find a real type.
Fix problem with object identifiers in external modules

When parsing ASN.1, certain constructs can only be understood in
the full context of the entire ASN.1 module.

For instance, the value following ID in this simplified excerpt
from MTSAbstractService88:

administration-88 PORT ::= {
  ID {id-pt-administration 88}
}

the value following "ID" can be interpreted either as value
for:

  SEQUENCE {
    id-pt-administration INTEGER
  }

or as an OBJECT IDENTIFIER.

Our ASN.1 parser assumes that a SEQUENCE is meant, and if that
later turns out to be wrong, the SEQUENCE value is rewritten to
an OBJECT IDENTIFIER. The problem is that at the time of the
rewrite, we no longer know in which ASN.1 module id-pt-administration
was defined in, and we have to use the module name in the state{}
record. Unfortunately, the module name in the state{} record may
not always be correct.

While there are attempts in the code to keep the module name
up-to-date when checking imported types, it is not done consistently,
and it seems to be a difficult and error-prone task to attempt
to make it consistent.

A safer and less error-prone approach is to make sure that we
don't lose the module name while parsing. To make it clear what
we are doing, we will introduce a new #seqtag{} record that
are used for tags in SEQUENCE values. The name is based on its
primary use. The record also contains the module in case it happens
to be an OBJECT IDENTIFIER.
Eliminate the use of #identifier{} outside the tokeniser and parser

The only remaining use of #identifier{} in asn1ct_check was in a
temporary packaging of a value that would be ultimately be put
into #valuedef{}.

Therefore we can eliminate that last usage but putting the value
directly into a #valuedef{} and we can move the record definition
into asn1ct_parser2.
Add the module name to the #classdef{} record

If we want construct an #'Externaltypereference'{} from
a #classdef{} record, we will need the module name.
Correct expansion of parameterized types

Attempting to compile:

SomeType{SOME-CLASS-NAME, SOME-CLASS-NAME:SomeSet} ::= ...
        SEQUENCE {
            something   SOME-CLASS-NAME.&id({SomeSet})
        }

would crash the compiler, because the actual parameter for
SOME-CLASS-NAME was not substituted into the governor for
the SomeSet parameter.

While we are at it, combine the functionality of is_class/2
and get_class_def/2 (eliminating is_class/2). Most callers
call both function.
Remove unused code for ABSTRACT-SYNTAX and TYPE-IDENTIFIER

Before classes were fully implemented, there was support for
ABSTRACT-SYNTAX and TYPE-IDENTIFIER. Some of that code is still
there and is no longer used. Get rid of it and correct comments.
Report errors also for unused parameterized types

Definitions for parameterized types are verified once very early,
and one more time when they are instantiated.

Errors found during the first check were ignored, so errors for
unused parameterized types were not reported.
Check the formal parameter for parameterized type definitions

Check the formal parameters for a parameterized type definition.
If the governor for a formal parameter is absent, the formal parameter
must be in upper case.