rename INET6_ADDRSTRLEN -> SIGAR_INET6_ADDRSTRLEN

This commit is contained in:
Doug MacEachern 2006-10-19 20:10:13 +00:00
parent 05eb2f8877
commit f5d84d4f67
3 changed files with 7 additions and 9 deletions

View File

@ -319,7 +319,7 @@ JNIEXPORT void SIGAR_JNIx(kill)
SetObjectField(env, obj, fieldID, JENV->NewStringUTF(env, val))
static jstring jnet_address_to_string(JNIEnv *env, sigar_t *sigar, sigar_net_address_t *val) {
char addr_str[INET6_ADDRSTRLEN];
char addr_str[SIGAR_INET6_ADDRSTRLEN];
sigar_net_address_to_string(sigar, val, addr_str);
return JENV->NewStringUTF(env, addr_str);
}

View File

@ -429,19 +429,17 @@ SIGAR_DECLARE(int) sigar_net_address_to_string(sigar_t *sigar,
SIGAR_DECLARE(sigar_uint32_t) sigar_net_address_hash(sigar_net_address_t *address);
#ifndef INET6_ADDRSTRLEN
# define INET6_ADDRSTRLEN 46
#endif
#define SIGAR_INET6_ADDRSTRLEN 46
#define SIGAR_MAXDOMAINNAMELEN 256
#define SIGAR_MAXHOSTNAMELEN 256
typedef struct {
char default_gateway[INET6_ADDRSTRLEN];
char default_gateway[SIGAR_INET6_ADDRSTRLEN];
char host_name[SIGAR_MAXHOSTNAMELEN];
char domain_name[SIGAR_MAXDOMAINNAMELEN];
char primary_dns[INET6_ADDRSTRLEN];
char secondary_dns[INET6_ADDRSTRLEN];
char primary_dns[SIGAR_INET6_ADDRSTRLEN];
char secondary_dns[SIGAR_INET6_ADDRSTRLEN];
} sigar_net_info_t;
SIGAR_DECLARE(int)

View File

@ -1776,7 +1776,7 @@ SIGAR_DECLARE(int) sigar_net_address_to_string(sigar_t *sigar,
case SIGAR_AF_INET6:
#if defined(__linux__) /*XXX*/
if (inet_ntop(AF_INET6, (const void *)&address->addr.in6,
addr_str, INET6_ADDRSTRLEN))
addr_str, SIGAR_INET6_ADDRSTRLEN))
{
return SIGAR_OK;
}
@ -2019,7 +2019,7 @@ SIGAR_DECLARE(int) sigar_fqdn_get(sigar_t *sigar, char *name, int namelen)
int i,j;
for (i=0; p->h_addr_list[i]; i++) {
char addr[INET6_ADDRSTRLEN];
char addr[SIGAR_INET6_ADDRSTRLEN];
struct in_addr *in =
(struct in_addr *)p->h_addr_list[i];