Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@@ -0,0 +1,99 @@
2010-03-02 Jonathan Pryor <jpryor@novell.com>
* Makefile, mono-shlib-cop.cs: Remove Mono.GetOptions dependency.
2008-10-16 Jonathan Pryor <jpryor@novell.com>
* mono-shlib-cop.cs: Migrate from Mono.GetOptions to Mono.Options.
* mono-shlib-cop.exe.sources: Include Mono.Options source.
2007-05-14 Wade Berrier <wberrier@novell.com>
* mono-shlib-cop.exe.config: Remove "does-not-exist" dllmap
(Was complicating packaging on ia64: There is no libc.so.6 on
ia64, only libc.so.6.1)
2007-04-09 Raja R Harinath <rharinath@novell.com>
* Makefile (cleanup): Use '-f' to silence 'rm'.
2006-09-20 Zoltan Varga <vargaz@gmail.com>
* Makefile (EXTRA_DISTFILES): Add test.cs to fix test-profiles.
2006-09-14 Jonathan Pryor <jonpryor@vt.edu>
* Makefile: Modify test to build `test.dll' and use that as an input
assembly to mono-shlib-cop.exe, and not mono-shlib-cop.exe itself. This
permits mono-shlib-cop.exe to be "clean", as it doesn't need to have
deliberate errors inserted into it for use by the unit test.
* mono-shlib-cop.cs: Remove methods used for unit test.
* mono-shlib-cop.exe.config: Add <dllmap/> entry for libglib-2.0, so that
`mono-shlib-cop mono-shlib-cop.exe` doesn't return any errors/warnings.
This is requested by meebey@#mono, so that mono-shlib-cop doesn't itself
require development libraries to execute (complicating the packaging
process on debian).
* mono-shlib-cop.exe.out: Removed; not used anymore.
* test.cs: Added; test input file for mono-shlib-cop.
* test.dll.out: Added; expected output for `mono-shlib-cop test.dll`.
2005-09-07 Jonathan Pryor <jonpryor@vt.edu>
* mono-shlib-cop.cs: Use Assembly.LoadWithPartialName instead of
Assembly.Load(AssemblyName) for loading -r: assemblies, since this
actually works (though it's also deprecated in .NET 2.0, with no
replacement). If the first LoadWithPartialName fails, try again after
removing any .dll extension (since the .dll isn't part of the assembly
name, but I often specify it anyway).
2005-09-07 Jonathan Pryor <jonpryor@vt.edu>
* mono-shlib-cop.cs: Patch from John Luke to fix use of Path.Combine (don't
want to use an `/'-prefixed path as the 2nd parameter) and improve XML
node selection.
2005-07-18 Jonathan Pryor <jonpryor@vt.edu>
* mono-shlib-cop.exe.config: .config file to help with testing.
* mono-shlib-cop.exe.out: Output generated from
`mono mono-shlib-cop.exe mono-shlib-cop.exe`
* Makefile: Add support for regression tests.
2005-07-14 Jonathan Pryor <jonpryor@vt.edu>
* mono-shlib-cop.cs: Use RuntimeEnvironment.SystemConfigurationFile to find
$sysconfigdir/etc/mono/config, since $sysconfigdir might not be under
$prefix (the case for RPMs: $sysconfigdir=/etc, $prefix=/usr).
Fixes 75287.
2005-06-06 Jonathan Pryor <jonpryor@vt.edu>
* mono-shlib-cop.cs: Use better default prefix handling (don't always assume
`/' is the prefix, instead base the choice off runtime information).
2005-06-06 Jonathan Pryor <jonpryor@vt.edu>
* mono-shlib-cop.cs: Rename Report to AssemblyCheckInfo. Add -p
command-line option to specify mono prefixes to search for.
Store $prefix/etc/mono/config and ASSEMBLY.config XmlDocuments in
AssemblyCheckInfo, and use AssemblyCheckInfo to search for <dllmap>
entries. This allows us to cache XmlDocuments across AppDomains (since
AssemblyCheckInfo is a MarshalByRefObject), and should cut down on file
I/O (since we don't re-read the .config for every member of every type).
2005-06-03 Jonathan Pryor <jonpryor@vt.edu>
* mono-shlib-cop.cs: Add MessageInfo, MessageCollection, & Report classes to
support message merging. Remove AssemblyCheckResults; AssemblyChecker
uses Report directly to add messages. Add .config file parsing support.
* README: flush.
2005-05-31 Jonathan Pryor <jonpryor@vt.edu>
* Makefile: Added
* README: Added
* ChangeLog: Added
* mono-shlib-cop.exe.sources: Added
* mono-shlib-cop.cs: Added
# vim: noexpandtab

View File

@@ -0,0 +1,26 @@
thisdir = tools/mono-shlib-cop
SUBDIRS =
include ../../build/rules.make
LOCAL_MCS_FLAGS = -r:Mono.Posix.dll
PROGRAM = mono-shlib-cop.exe
TEST_INPUT = test.dll
EXTRA_DISTFILES = test.cs
include ../../build/executable.make
clean-local: cleanup
cleanup:
-rm -f $(TEST_INPUT)
run-test-local: run-mono-shlib-cop-test
run-mono-shlib-cop-test: $(the_lib) $(TEST_INPUT)
$(RUNTIME) $(the_lib) $(TEST_INPUT) | diff - test.dll.out
$(TEST_INPUT) : test.cs
$(CSCOMPILE) -target:library $< -out:$@

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
<configuration>
<dllmap dll="libgmodule-2.0.so" target="libgmodule-2.0.so.0"/>
<dllmap dll="libglib-2.0.so" target="libglib-2.0.so.0"/>
</configuration>

View File

@@ -0,0 +1,2 @@
../../class/Mono.Options/Mono.Options/Options.cs
mono-shlib-cop.cs

View File

@@ -0,0 +1,70 @@
//
// test.cs: Unit test for mono-shlib-cop.exe
//
// Compile as:
// mcs -target:library test.cs -out:test.dll
//
// Authors:
// Jonathan Pryor (jonpryor@vt.edu)
//
// (C) 2005 Jonathan Pryor
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Runtime.InteropServices;
namespace Mono.Unmanaged.Check {
class Test {
// OK
[DllImport ("libgmodule-2.0.so")]
private static extern int g_module_close (IntPtr handle);
// Warning
[DllImport ("libglib-2.0.so")]
private static extern void g_free (IntPtr mem);
// Error: no such library
[DllImport ("does-not-exist")]
private static extern void Foo ();
// Error: no such method (library name remapped in .dll.config)
[DllImport ("renamed-lib")]
private static extern void RenameMe ();
// Error: no such method
[DllImport ("libc")]
private static extern void DoesNotExist ();
Test ()
{
g_module_close (IntPtr.Zero);
g_free (IntPtr.Zero);
Foo ();
RenameMe ();
DoesNotExist ();
}
}
}