Initial revision

This commit is contained in:
Doug MacEachern committed 2004-06-21 22:37:04 +00:00
1 parent 1a7957fb1e
commit dffe0da855
207 files changed
+34390

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
package Sigar::ArchName;
use strict;
use Config;
sub get_name {
my $os = lc $^O;
my $vers = $Config{osvers};
my $arch = $Config{archname};
if ($os =~ /win32/) {
return 'x86-winnt';
}
elsif ($os =~ /linux/) {
return 'x86-linux';
}
elsif ($os =~ /hpux/) {
if ($vers =~ /11\./) {
return 'hppa2.0-hp-hpux-11.x';
}
}
elsif ($os =~ /aix/) {
return 'powerpc-ibm-aix-4.3.x';
}
elsif ($os =~ /solaris/) {
if ($arch =~ /sun4/) {
return 'sparc-sun-solaris-2.x';
}
elsif ($arch =~ /.86/) {
return 'x86-sun-solaris-2.x';
}
}
elsif ($os =~ /darwin/) {
return 'powerpc-apple-darwin';
}
die "Unsupported platform";
}
1;
__END__