- if ( host != NULL && ( address = inet_addr( host )) == -1UL ) {
- if ( (hp = gethostbyname( host )) == NULL ) {
+ if ( host != NULL ) {
+ address = inet_addr( host );
+ /* This was just a test for -1 until OSF1 let inet_addr return
+ unsigned int, which is narrower than 'unsigned long address' */
+ if ( address == 0xffffffff || address == (unsigned long) -1 ) {
+ if ( ( ldap_pvt_gethostbyname_a( host, &he_buf, &ha_buf,
+ &hp, &local_h_errno) < 0) || (hp==NULL))
+ {