Commit 7018dd1e authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

HTONL -> AC_HTONL

parent 14a817f2
......@@ -112,7 +112,7 @@ ber_skip_tag( BerElement *ber, unsigned long *len )
if ( ber_read( ber, (char *) &netlen + diff, noctets )
!= noctets )
return( LBER_DEFAULT );
*len = NTOHL( netlen );
*len = AC_NTOHL( netlen );
} else {
*len = lc;
}
......@@ -164,7 +164,7 @@ ber_getnint( BerElement *ber, long *num, int len )
*(p+i) = (char) 0xff;
}
}
*num = NTOHL( netnum );
*num = AC_NTOHL( netnum );
return( len );
}
......
......@@ -65,7 +65,7 @@ ber_put_tag( BerElement *ber, unsigned long tag, int nosos )
taglen = ber_calc_taglen( tag );
ntag = HTONL( tag );
ntag = AC_HTONL( tag );
return( ber_write( ber, ((char *) &ntag) + sizeof(long) - taglen,
taglen, nosos ) );
......@@ -111,7 +111,7 @@ ber_put_len( BerElement *ber, unsigned long len, int nosos )
*/
if ( len <= 127 ) {
netlen = HTONL( len );
netlen = AC_HTONL( len );
return( ber_write( ber, (char *) &netlen + sizeof(long) - 1,
1, nosos ) );
}
......@@ -138,7 +138,7 @@ ber_put_len( BerElement *ber, unsigned long len, int nosos )
return( -1 );
/* write the length itself */
netlen = HTONL( len );
netlen = AC_HTONL( len );
if ( ber_write( ber, (char *) &netlen + (sizeof(long) - i), i, nosos )
!= i )
return( -1 );
......@@ -189,7 +189,7 @@ ber_put_int_or_enum( BerElement *ber, long num, unsigned long tag )
if ( (lenlen = ber_put_len( ber, len, 0 )) == -1 )
return( -1 );
i++;
netnum = HTONL( num );
netnum = AC_HTONL( num );
if ( ber_write( ber, (char *) &netnum + (sizeof(long) - i), i, 0 )
!= i )
return( -1 );
......@@ -397,7 +397,7 @@ ber_put_seqorset( BerElement *ber )
*/
len = (*sos)->sos_clen;
netlen = HTONL( len );
netlen = AC_HTONL( len );
if ( sizeof(long) > 4 && len > 0xFFFFFFFFL )
return( -1 );
......@@ -446,7 +446,7 @@ ber_put_seqorset( BerElement *ber )
/* the tag */
taglen = ber_calc_taglen( (*sos)->sos_tag );
ntag = HTONL( (*sos)->sos_tag );
ntag = AC_HTONL( (*sos)->sos_tag );
SAFEMEMCPY( (*sos)->sos_first, (char *) &ntag +
sizeof(long) - taglen, taglen );
......
......@@ -524,7 +524,7 @@ ber_get_next( Sockbuf *sb, unsigned long *len, BerElement *ber )
noctets ) {
return( LBER_DEFAULT );
}
*len = NTOHL( netlen );
*len = AC_NTOHL( netlen );
} else {
*len = lc;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment