version 1.15, 2004/04/29 13:41:05
|
version 1.16, 2004/04/30 06:08:42
|
|
|
if (!hostname) return 0xFFFFFFFF; | if (!hostname) return 0xFFFFFFFF; |
| |
#ifdef PEGASUS_OS_OS400 | #ifdef PEGASUS_OS_OS400 |
char ebcdicHost[256]; |
char ebcdicHost[PEGASUS_MAXHOSTNAMELEN]; |
if (strlen(hostname) < 256) |
if (strlen(hostname) < PEGASUS_MAXHOSTNAMELEN) |
strcpy(ebcdicHost, hostname); | strcpy(ebcdicHost, hostname); |
else | else |
return 0xFFFFFFFF; | return 0xFFFFFFFF; |
|
|
#elif defined(PEGASUS_OS_OS400) | #elif defined(PEGASUS_OS_OS400) |
entry = gethostbyname(ebcdicHost); | entry = gethostbyname(ebcdicHost); |
#elif defined(PEGASUS_OS_ZOS) | #elif defined(PEGASUS_OS_ZOS) |
char hostName[ MAXHOSTNAMELEN + 1 ]; |
char hostName[ PEGASUS_MAXHOSTNAMELEN ]; |
if (String::equalNoCase("localhost",String(hostname))) | if (String::equalNoCase("localhost",String(hostname))) |
{ | { |
gethostname( hostName, sizeof( hostName ) ); |
gethostname( hostName, PEGASUS_MAXHOSTNAMELEN ); |
entry = gethostbyname(hostName); | entry = gethostbyname(hostName); |
} else | } else |
{ | { |