various updates to compile again

This commit is contained in:
Doug MacEachern 2006-07-04 19:49:18 +00:00
parent aedc5d075e
commit 326065138e
3 changed files with 13 additions and 10 deletions

View File

@ -6,7 +6,7 @@
#include "sigar_fileinfo.h"
typedef sigar_t * Sigar;
typedef sigar_uint64_t Sigar__NetAddr;
typedef sigar_net_address_t Sigar__NetAddress;
/* generated list */
typedef sigar_uptime_t * Sigar__Uptime;
@ -34,6 +34,7 @@ typedef sigar_who_t * Sigar__Who;
typedef sigar_thread_cpu_t * Sigar__ThreadCpu;
typedef sigar_resource_limit_t * Sigar__ResourceLimit;
typedef sigar_net_info_t * Sigar__NetInfo;
typedef sigar_dir_usage_t * Sigar__DirUsage;
/* Perl < 5.6 */
#ifndef aTHX_
@ -316,11 +317,12 @@ proc_env(sigar, pid, key=NULL)
procenv.data = hv = newHV();
}
else {
STRLEN len = get.klen;
procenv.type = SIGAR_PROC_ENV_KEY;
procenv.env_getter = proc_env_getvalue;
procenv.data = &get;
get.val = &PL_sv_undef;
get.key = SvPV(key, get.klen);
get.key = SvPV(key, len);
procenv.key = get.key;
procenv.klen = get.klen;
}

View File

@ -16,22 +16,22 @@ sub get_name {
}
elsif ($os =~ /hpux/) {
if ($vers =~ /11\./) {
return 'hppa2.0-hp-hpux-11.x';
return 'pa-hpux-11';
}
}
elsif ($os =~ /aix/) {
return 'powerpc-ibm-aix-4.3.x';
return 'ppc-aix-5';
}
elsif ($os =~ /solaris/) {
if ($arch =~ /sun4/) {
return 'sparc-sun-solaris-2.x';
return 'sparc-solaris';
}
elsif ($arch =~ /.86/) {
return 'x86-sun-solaris-2.x';
return 'x86-solaris';
}
}
elsif ($os =~ /darwin/) {
return 'powerpc-apple-darwin';
return 'universal-macosx';
}
die "Unsupported platform";

View File

@ -2,7 +2,7 @@ Sigar T_PTROBJ
sigar_pid_t T_UV
sigar_uint64_t T_UV
const char * T_PV
Sigar::NetAddr T_NETADDR
Sigar::NetAddress T_NETADDR
#generated list
Sigar::Uptime T_PTROBJ
@ -30,11 +30,12 @@ Sigar::Who T_PTROBJ
Sigar::ThreadCpu T_PTROBJ
Sigar::ResourceLimit T_PTROBJ
Sigar::NetInfo T_PTROBJ
Sigar::DirUsage T_PTROBJ
OUTPUT
T_NETADDR
{
char addr_str[SIGAR_INET_ADDR_LEN];
sigar_inet_ntoa(NULL, $var, addr_str);
char addr_str[INET6_ADDRSTRLEN];
sigar_net_address_to_string(NULL, &$var, addr_str);
sv_setpv($arg, addr_str);
}