diff -burN bw_mod-0.6.orig/bw_mod-0.6.c bw_mod-0.6/bw_mod-0.6.c --- bw_mod-0.6.orig/bw_mod-0.6.c 2005-03-12 14:28:51.665241352 +0100 +++ bw_mod-0.6/bw_mod-0.6.c 2005-03-12 14:32:46.305570600 +0100 @@ -510,7 +510,7 @@ nowtime = apr_time_now(); if ( bwstat->time < (nowtime - 1000000) ) { /* And if we got lock */ - if ( apr_atomic_cas( &bwstat->lock, 1, 0 ) == 0 ) { + if ( apr_atomic_cas32( &bwstat->lock, 1, 0 ) == 0 ) { /* Calculate bw used in the last timeinterval */ bwstat->bandwidth = ( bwstat->bytes_count / (double)(nowtime - bwstat->time)) * 1000000 ; @@ -522,7 +522,7 @@ bwstat->time = apr_time_now(); /* Release lock */ - apr_atomic_set( &bwstat->lock, 0 ); + apr_atomic_set32( &bwstat->lock, 0 ); } } } @@ -653,7 +653,7 @@ else bwmaxconn = bwstat; /* Add 1 active connection to the record */ - apr_atomic_inc( &bwmaxconn->connection_count ); + apr_atomic_inc32( &bwmaxconn->connection_count ); /* Verbose Output */ if (sconf->debug == BANDWIDTH_ENABLED) { @@ -682,7 +682,7 @@ ap_pass_brigade(f->next, ctx->bb); /* Delete 1 active connection */ - apr_atomic_dec( &bwmaxconn->connection_count ); + apr_atomic_dec32( &bwmaxconn->connection_count ); return APR_SUCCESS; } @@ -750,14 +750,14 @@ b = APR_BRIGADE_FIRST(bb); /* Add the number of bytes transferred, so we can get an estimated bw usage */ - apr_atomic_add( &bwstat->bytes_count, packet); + apr_atomic_add32( &bwstat->bytes_count, packet); /* If the connection goes to hell... go with it ! */ if (r->connection->aborted) { /* Verbose. Tells when the connection was ended */ if (sconf->debug == BANDWIDTH_ENABLED) ap_log_error(APLOG_MARK, APLOG_NOTICE|APLOG_NOERRNO, 0,NULL,"[W] Connection to hell"); - apr_atomic_dec( &bwmaxconn->connection_count ); + apr_atomic_dec32( &bwmaxconn->connection_count ); return APR_SUCCESS; } @@ -774,14 +774,14 @@ b = APR_BRIGADE_FIRST(bb); /* Add the number of bytes to the counter */ - apr_atomic_add( &bwstat->bytes_count, bytes); + apr_atomic_add32( &bwstat->bytes_count, bytes); /* Pass the final brigade */ ap_pass_brigade(f->next, ctx->bb); } /* Delete 1 active connection to the record */ - apr_atomic_dec( &bwmaxconn->connection_count ); + apr_atomic_dec32( &bwmaxconn->connection_count ); /* Verbose, tells when we ended the Filter */ if (sconf->debug == BANDWIDTH_ENABLED)