asn1rt_check: Fix transform_to_EXTERNAL1990 for binary input

If ber_bin is used, decoded EXTERNAL types will include a binary
Data_value in the {'EXTERNAL', ...} tuple.  When handing such a tuple to
the encoder again, we should properly encode it.

To do so, we treat a binary data part just like a list data part.
andor_SUITE: Don't native-compile

Temporary commit to avoid the failures in t_andalso/1 and
t_orelse/1 test cases.
Disable native code if on_load is used

The on_load functionality does not work yet (will cause a crash)
if a module has been native-compiled. Fix it by disabling
native-code compilation if a module has an on_load attribute.
seq_trace_SUITE: Don't native-compile

Sequential tracing does not work on native-compiled modules.

(Other kind of tracing also don't work, but those test case
are already skipped.)
Inline less aggressively for native-code compilation

The native code compiler will get very slow if we do aggressive
inlining with the old inliner (i.e. without subsequent optimizations),
and the test case self_compile_old_inliner/1 may fail due to
a time-trap timeout.

Fix this by inlining less aggressively if we are compiling natively.
Avoid crash by skipping compilation_SUITE:on_load/1

compilation_SUITE:on_load/1 crashes if the compilation_SUITE module is
natively compiled. I don't know the exact reason for that, but it
seems to be that the module 'on_load' (which is not native-compiled)
is loaded and unloaded multiple times, and that it does not contain
exactly the same functions each time (inlining cause a function and a
function call to be removed).
Make erlang-mode more compatible with package.el

Package.el  and Emacs  package  repositories (like  ELPA or  Marmalade
place some requirements onto packages which are uploaded to them. This
commit does  minor cosmetic  changes which makes  it easier  to create
appropriate package file for those repositories.
fix reading compressed binary terms from Java

Larger compressed binary could not be decoded inside JInterface.

- applied a patch posted on erlang-questins in September 2009
  http://erlang.org/pipermail/erlang-patches/2009-September/000478.html
-> extended this patch as it alone was not enough to fix the bug

Problem was that when reading from an InputStream, you can only specify a maximum number of bytes to read. Java doesn't quarantee that it actually reads this many bytes - it could be less!
This patch now reads up until the expected size bytes. If there are more than expected, the actual number of available bytes is not printed (we probably shouldn't read the additional bytes, security-wise - the erlang external byte representation is broken in this case though).
add (de)compress roundtrip tests with larger values
release_handler:find_script/4 to use 're' matching in .appup scripts

The function release_handler:find_script/4 locates an .appup script
for a given application, and searches it for the matching up- or
downgrade script (given OldVsn). The original implementation of this
function used lists:keysearch/3 to find the matching script, but since
the .appup files nowadays may contain regexps instead of distinct versions,
that approach no longer works.

This patch uses re:run/2 to find a matching script instead.

Example:

Stock R15B:

Erlang R15B (erts-5.9) [source] [...]

Eshell V5.9  (abort with ^G)
1> release_handler:upgrade_script(stdlib,code:lib_dir(stdlib)).
** exception throw: {version_not_in_appup,"1.18"}
     in function  release_handler:find_script/4 (release_handler.erl, line 501)
     in call from release_handler:upgrade_script/2 (release_handler.erl, line 439)

Current patch:
Erlang R16B (erts-5.10) [source] [...]

Eshell V5.10  (abort with ^G)
1> release_handler:upgrade_script(stdlib,code:lib_dir(stdlib)).
{ok,"1.19",[restart_new_emulator,point_of_no_return]}
Fix various code typos for R15B02
Fix various doc typos for R15B02
ignore calls to gs* modules if it is not built
Test supervisor pass through error
Have supervisor send errors up the chain

If a child fails to start, supervisor relies upon error_logger which does not
work when IO is inhibited. Instead pass the error up the chain and let someone
else use a proper Reason for any possible printouts.
Improve interoperability with SSH clients

This patch fixes a few problems of the SSH shell server that affect the
interoperability with SSH clients in widespread use.

First problem is that, whenever a channel_request message is
received with want_reply=true, the reply ends up being sent to the
servers channel id, not the clients channel id. This causes the client
to terminate the connection. The easiest solution to the problem appears
to be a new function in ssh_connection_manager.erl that translates the
servers channel id before sending the reply (in the same manner as
other functions do it).

Second problem is in ssh_cli.erl. When an SSH client sends a
window_change request between PTY allocation and starting the shell
(which appears to happen with some clients), ssh_cli.erl crashes
because #state.buf is yet 'undefined'. Allocating an empty buffer at PTY
allocation time solves the problem.

Affected SSH clients:
 - all clients based on SSH-2.0-TrileadSSH2Java_213 (problem #1)
 - SSH Term Pro (problem #2)
Errors in vacmAccessTable RowStatus handling

There are problems with the handling of vacmAccessTableStatus that cause
some SNMP test suites to report errors.

Most notably, errorneous set operations frequently cause "genErr" errors
to be returned which usually is a sign for bad coding. These "genErr"
errors are usually caused by badmatch exceptions coming from
  {ok, Row} = snmpa_vacm:get_row(RowIndex)
if the row does not exist.

This patch fixes the badmatch errors and adjusts the semantic of the
RowStatus handling in that table to be compliant with the RowStatus
textual description of SNPMv2-TC MIB.
semantic fixes to SNMP-USER-BASED-SM_MIB

The semantics allow the usmUserAuthKeyChange and usmUserPrivKeyChange
objects to be written to in the same set requests that also creates and
clones the user. This was not possible beforehand, causing test tools
checking semantic SNMPv3 behaviour to fail on a lot of test cases.

Furthermore, once the user has been cloned by writing to an instance of
usmUserCloneFrom, further set-operations to the same object will not
return an error, but be no-ops. Especially, it must be avoided to copy
security parameters again (possibly even from a different user).
fix walk over vacmAccessTable

The get_next implementation of vacmAccessTable did not return all
available table data. Instead, it only returned the first column for
each row, and all columns for the last row available.

Fix the get_next implementation of vacmAccessTable to return all table
entries.
verify table row index constraints in SNMP set requests

When a set-request is received for table columns, check that the varbind
OIDs are syntactically correct. This includes checking that Table Entry
OID as well as the Column OID are present, and that the row index
contains an acceptable number of subidentifiers.

This check was not done carefully enough before, giving the following
test result from an erlang-snmp agent:

 Response: Version = SNMPv3, MsgId = 173, MaxSize = 2048
 Flags = Auth/Priv, SecurityModel = USM
 EngineId = [...], EngineBoots = 16, EngineTime = 81244, UserName = ...
 ContextEngineId = [...], ContextName = [...]
 Request Id = 173, Error Status = No Error , Error Index = 0
 Oid1 = snmpTargetAddrRowStatus , Type = Integer, Value = 4
 Oid2 = snmpTargetAddrTAddress , Type = OctetString, Value = ...
 Oid3 = snmpTargetAddrTimeout , Type = Integer, Value = 100
 Oid4 = snmpTargetAddrRetryCount , Type = Integer, Value = 3
 Oid5 = snmpTargetAddrTagList , Type = OctetString, Value = abc
 Oid6 = snmpTargetAddrParams , Type = OctetString, Value = abc
 Oid7 = snmpTargetAddrStorageType , Type = Integer, Value = 2
 Oid8 = snmpTargetAddrTDomain , Type = ObjectID, Value = 1.3.6.1.6.1.1

Please observe that a table row in snmptargetAddrParams is created
without errors, although an empty RowIndex was specified for all
columnar objects in the request. The index to that table is defined as
IMPLIED SnmpAdminString(1..32).