Merge pull request #99 from Unity-Technologies/unity-staging

Weekly Mono Fixes
Merge unity-staging (75ce710) into unity-trunk

Commits:
75ce710 Add required overload for adding entries to zip with metadata (otherwise file attributes will be incorrect)
af3b743 Fix bad cherry-pick of liveness change.
d257a76 added api to unity liveness for multithreading
a351aad Fix several 64bit pointers being truncated to 32bit integers.
8c1b80d Fix GC losing objects on OSX64 due to registers not getting pushed as roots.
228d7f0 Nunit and Mono.Cairo are no longer in the 1.0 dirs
d61e7eb Nunit build fixes for the 1.0-less world
34fa8c7 Fix copying of files, rsync is more reliable (and preserves attributes)
09ec363 Fix cecil installation
328bb2e Only build the bare essentials on the 1.1 profile, and make all tools based on 2.0 assemblies
ff8c6ac Remove dupe source file from sources list
cb3ea9a Don't try to use a potentially null assembly name, the assembly might not have been found.
59a2e0c Kill really really old ziplib code
437f1d9 Update SharpZipLib to latest upstream v0.86.0.518
Merge pull request #106 from Unity-Technologies/unity-staging

Recent Mono fixes
Altered invocation IL generation to use constrained virtual calls instead of boxing for value types, if possible.
[osx] Add fork fallback for not-x86.
Fix random crash on Mavericks 64-bit. Backport slightly modified version of https://github.com/mono/mono/commit/978e4ebbd66b231fa6e4f8b32451b87d447bfcf2 and https://github.com/mono/mono/commit/7c85c560ea935b28c5e8492b1a0f6d5e6fe3c14e
Fix reexport of MonoBundleBinary on newer clang.
Fix process lookup on osx64.
Case 593918.
[System] Fix MacOsNetworkInterface.ImplGetAllNetworkInterfaces()

On my (cursed?) MacBook Pro, calling
System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()
results in an exception:

	System.ArgumentException: length
		at System.Array.Copy (System.Array sourceArray, Int32 sourceIndex, System.Array destinationArray, Int32 destinationIndex, Int32 length) [0x00000] in <filename unknown>:0
		at System.Net.NetworkInformation.MacOsNetworkInterface.ImplGetAllNetworkInterfaces () [0x00000] in <filename unknown>:0
		at System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces () [0x00000] in <filename unknown>:0

Some printfs later, and we see why:

	Array.Copy(array.Length=12, 3, array.Length=0, 0, 0)
	Array.Copy(array.Length=12, 4, array.Length=0, 0, 0)
	Array.Copy(array.Length=12, 4, array.Length=0, 0, 0)
	Array.Copy(array.Length=12, 3, array.Length=6, 0, 6)
	Array.Copy(array.Length=12, 3, array.Length=6, 0, 6)
	Array.Copy(array.Length=12, 3, array.Length=8, 0, 4)
	Array.Copy(array.Length=12, 4, array.Length=6, 0, 6)
	Array.Copy(array.Length=12, 8, array.Length=6, 0, 6)
	# BOOM!

(Apparently I have 8 interfaces: lo0, gif0, stf0, en0, en1, fw0, p2p0,
and vboxnet0.)

The problem is readily obvious: we're trying to read 6 bytes of data
when only 4 are available, and Array.Copy() complains appropriately.

The fix -- which looks to almost contradict a02076ba -- is to use
`sockaddrdl.sdl_data.Length - sockaddrdl.sdl_nlen` instead of
`sockaddrdl.sdl_data.Length - macAddress.Length` (or sdl_alen).
sdl_nlen is the offset into the source sockaddrdl.sdl_data array, and
in this case sockaddrdl.sdl_alen (the length of the destination
macAddress) isn't the same as sockaddrdl.sdl_nlen, hence the breakage.

Conflicts:
	mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs
[stv] Modify STV build scripts to build with latest toolchains.
Merge pull request #109 from richard-fine/foreach-alloc-fix

Use constrained virtual method call for value-typed instances instead of boxing
add support for storing custom data on a MonoClass, so Unity can store classID and sealedness in there, for faster lookups
Windows Registry: fixed the issue when Microsoft.Win32.Registry.GetValue() required write permissions
Merge pull request #118 from Unity-Technologies/windows-registry-fix

Windows Registry: fixed a security issue
fixed mono_assembly_foreach, it should use 'copy' variable
Merge pull request #119 from AvalonWot/mono_assembly_foreach_fix

fixed mono_assembly_foreach, it should use 'copy' variable
compare declaring generic methods when setting breaking points (fix case #595912)

(this is not the ideal solution still; call stacks for generic classes with reference type arguments will be reported incorrectly as Object)
added bit field on MonoClass to indicate if the class has an IntPtr pointing to a native class that needs AssetGarbageCollection scanning
Merge pull request #122 from Unity-Technologies/liveness

Liveness
Merge pull request #117 from Unity-Technologies/monoclass-userdata

add support for storing custom data on a MonoClass, so Unity can store c...