adjust .def generator

This commit is contained in:
Doug MacEachern 2006-07-05 19:08:44 +00:00
parent f410dfa739
commit c13e03716e
1 changed files with 7 additions and 2 deletions

View File

@ -1529,10 +1529,15 @@ EOF
} }
my $jsigar = "../../src/jni/javasigar.c"; my $jsigar = "../../src/jni/javasigar.c";
my(%alias) = (x => 'Sigar');
open JSIGAR, $jsigar or die "open $jsigar: $!"; open JSIGAR, $jsigar or die "open $jsigar: $!";
while (<JSIGAR>) { while (<JSIGAR>) {
next unless /SIGAR_JNI\(([A-Za-z_]+)\)/; next unless /SIGAR_JNI([a-z]?)\(([A-Za-z_]+)\)/;
print DFH "Java_org_hyperic_sigar_$1\n"; my $class = "";
if ($1) {
$class = $alias{$1} . "_";
}
print DFH "Java_org_hyperic_sigar_$class$2\n";
} }
close CFH; close CFH;