From 7018dd1eb5e8dbdc57dfb881ea618807be630938 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 20 Oct 1998 04:41:28 +0000 Subject: [PATCH] HTONL -> AC_HTONL --- libraries/liblber/decode.c | 4 ++-- libraries/liblber/encode.c | 12 ++++++------ libraries/liblber/io.c | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libraries/liblber/decode.c b/libraries/liblber/decode.c index 26bf40c54b..03a5c74d85 100644 --- a/libraries/liblber/decode.c +++ b/libraries/liblber/decode.c @@ -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 ); } diff --git a/libraries/liblber/encode.c b/libraries/liblber/encode.c index 4933b2ff62..561e0f162d 100644 --- a/libraries/liblber/encode.c +++ b/libraries/liblber/encode.c @@ -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 ); diff --git a/libraries/liblber/io.c b/libraries/liblber/io.c index 282d25fb45..6c4d8dbc1e 100644 --- a/libraries/liblber/io.c +++ b/libraries/liblber/io.c @@ -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; } -- 2.39.5