Needed to change org.jruby.ext.POSIXFunctionMapper.java to pass unit tests and use gem

Hi,

my msvcrt.dll does not contain a symbol “chmod”, but rather “_chmod”. I
had to adjust the POSIXFunctionMapper class in the following way:

public String getFunctionName(NativeLibrary library, Method method)

{
String name = method.getName();
if (library.getName().equals(“msvcrt”)) {
if (name.equals(“getpid”) || name.equals(“chmod”)) {
name = “_” + name;
}
}
return name;
}

Is this just something odd with my system (Windows XP SP2) or is this
something that needs to be globally considered?

Thanks,
Tobias.

Does anyone know whether windows perhaps changed from chmod to _chmod
at some point. Perhaps around XP time?

We will commit something today for this.

-Tom

On 10/15/07, Wolff, Tobias [email protected] wrote:

        if (name.equals("getpid") || name.equals("chmod")) {

Tobias.


Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: [email protected] , [email protected]


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Thanks, Thomas.

-----Ursprüngliche Nachricht-----
Von: Thomas E Enebo [mailto:[email protected]]
Gesendet: Montag, 15. Oktober 2007 17:19
An: [email protected]
Betreff: Re: [jruby-user] Needed to change
org.jruby.ext.POSIXFunctionMapper.java to pass unit tests and use gem

Does anyone know whether windows perhaps changed from chmod to _chmod at
some point. Perhaps around XP time?

We will commit something today for this.

-Tom

On 10/15/07, Wolff, Tobias [email protected] wrote:

        if (name.equals("getpid") || name.equals("chmod")) {

Tobias.


Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: [email protected] , [email protected]


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Wolff, Tobias wrote:

We will commit something today for this.
This was discussed on IRC a bit…there seems to be a pattern that all
POSIX functions in MS C runtime prepend an underscore. I think we do
need to tweak the mapper to load them appropriately on XP.

I pray there are no other platform function-naming weirdities.

  • Charlie

To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Yeah, I was wondering if _ was something we could globally try for
mscrvt…

-Tom

On 10/15/07, Charles Oliver N. [email protected] wrote:


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email


Blog: http://www.bloglines.com/blog/ThomasEEnebo
Email: [email protected] , [email protected]


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email