Re: [Mono-dev] [PATCH] Adding to the PInvoke search path.

2009-06-03 Thread Kornél Pál
Hi,

What about searching prefix/lib as well automatically that would
eliminate the need for LD_LIBRARY_PATH when using prefix not searched
by ld?

Kornél

2009/6/1 Bill Holmes billholme...@gmail.com:
 Hi,

 The attached patch was discussed on IRC last week.  We found that
 MS.Net uses the directory of the declaring assembly when searching for
 shared libraries to invoke unmanaged code.

 The outcome of the conversation was that we did not want the behavior
 by default in Mono.  However an environment variable could control
 this behavior.

 Whit this patch setting MONO_PINVOKE_SEARCH to USE_ASSEMBLY_PATH will
 enable this.

 -bill

 2009-06-01  Bill Holmes  billholme...@gmail.com

        * loader.c (mono_loader_init): Check for and process
          the MONO_PINVOKE_SEARCH environment variable.

        * loader.c (mono_lookup_pinvoke_call): If MONO_PINVOKE_SEARCH
          is set to USE_ASSEMBLY_PATH, add the declaring assembly
          directory to resolve shared libraries.

        Code is contributed under MIT/X11 license.

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list


___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] [PATCH] Adding to the PInvoke search path.

2009-06-03 Thread Bill Holmes
After more discussion on IRC this it was decided to do this using the
dllmap and not an environment variable.

If the target is set to . the declaring assembly directory will be
used when attempting to locate the un-manged library.

-bill

2009-06-03  Bill Holmes  billholme...@gmail.com

* loader.c (mono_lookup_pinvoke_call): If the dllmap target is equal
  to . the declaring assembly path will be used to find the shared
  library first.

Code is contributed under MIT/X11 license.

On Mon, Jun 1, 2009 at 12:41 PM, Bill Holmes billholme...@gmail.com wrote:
 Hi,

 The attached patch was discussed on IRC last week.  We found that
 MS.Net uses the directory of the declaring assembly when searching for
 shared libraries to invoke unmanaged code.

 The outcome of the conversation was that we did not want the behavior
 by default in Mono.  However an environment variable could control
 this behavior.

 Whit this patch setting MONO_PINVOKE_SEARCH to USE_ASSEMBLY_PATH will
 enable this.

 -bill

 2009-06-01  Bill Holmes  billholme...@gmail.com

        * loader.c (mono_loader_init): Check for and process
          the MONO_PINVOKE_SEARCH environment variable.

        * loader.c (mono_lookup_pinvoke_call): If MONO_PINVOKE_SEARCH
          is set to USE_ASSEMBLY_PATH, add the declaring assembly
          directory to resolve shared libraries.

        Code is contributed under MIT/X11 license.



mono_pinvoke_search.patch
Description: Binary data
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] [PATCH] Adding to the PInvoke search path.

2009-06-01 Thread Bill Holmes
Hi,

The attached patch was discussed on IRC last week.  We found that
MS.Net uses the directory of the declaring assembly when searching for
shared libraries to invoke unmanaged code.

The outcome of the conversation was that we did not want the behavior
by default in Mono.  However an environment variable could control
this behavior.

Whit this patch setting MONO_PINVOKE_SEARCH to USE_ASSEMBLY_PATH will
enable this.

-bill

2009-06-01  Bill Holmes  billholme...@gmail.com

* loader.c (mono_loader_init): Check for and process
  the MONO_PINVOKE_SEARCH environment variable.

* loader.c (mono_lookup_pinvoke_call): If MONO_PINVOKE_SEARCH
  is set to USE_ASSEMBLY_PATH, add the declaring assembly
  directory to resolve shared libraries.

Code is contributed under MIT/X11 license.


mono_pinvoke_search.patch
Description: Binary data
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list