
jnr.posix.POSIXFunctionMapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jnr-unixsocket-nodep Show documentation
Show all versions of jnr-unixsocket-nodep Show documentation
com.github.jnr:jnr-unixsocket with orh.objectweb.asm shaded
package jnr.posix;
import jnr.ffi.mapper.FunctionMapper;
final class POSIXFunctionMapper implements FunctionMapper {
public static final FunctionMapper INSTANCE = new POSIXFunctionMapper();
private POSIXFunctionMapper() {}
public String mapFunctionName(String name, Context ctx) {
if (ctx.getLibrary().getName().equals("msvcrt")) {
// FIXME: We should either always _ name for msvcrt or get good list of _ methods
if (name.equals("getpid") || name.equals("chmod")) {
name = "_" + name;
}
}
return name;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy