diff -ru /tmp/mad-0.14.2b/libmad/layer3.c mad-0.14.2b/libmad/layer3.c --- /tmp/mad-0.14.2b/libmad/layer3.c 2001-11-09 01:28:02.000000000 +0200 +++ mad-0.14.2b/libmad/layer3.c 2006-09-18 18:54:50.000000000 +0300 @@ -45,6 +45,18 @@ # include "huffman.h" # include "layer3.h" +#if defined(_WIN32_WCE) && _WIN32_WCE < 300 + +void *calloc(size_t n, size_t s) { + void *result = malloc(n * s); + if (result) + memset(result, 0, n * s); + + return result; +} + +#endif + /* --- Layer III ----------------------------------------------------------- */ enum { @@ -1250,7 +1262,7 @@ } } - assert(-bits_left <= MAD_BUFFER_GUARD * CHAR_BIT); + //assert(-bits_left <= MAD_BUFFER_GUARD * CHAR_BIT); # if 0 && defined(DEBUG) if (bits_left < 0) @@ -2433,9 +2445,9 @@ *stream->main_data + stream->md_len - si.main_data_begin); if (md_len > si.main_data_begin) { - assert(stream->md_len + md_len - + /*assert(stream->md_len + md_len - si.main_data_begin <= MAD_BUFFER_MDLEN); - +*/ memcpy(*stream->main_data + stream->md_len, mad_bit_nextbyte(&stream->ptr), frame_used = md_len - si.main_data_begin); diff -ru /tmp/mad-0.14.2b/libmad/timer.c mad-0.14.2b/libmad/timer.c --- /tmp/mad-0.14.2b/libmad/timer.c 2001-11-01 22:27:41.000000000 +0200 +++ mad-0.14.2b/libmad/timer.c 2006-09-18 18:54:08.000000000 +0300 @@ -124,7 +124,7 @@ factor = gcd(*numer, *denom); - assert(factor != 0); + //assert(factor != 0); *numer /= factor; *denom /= factor; @@ -141,7 +141,7 @@ reduce_rational(&numer, &denom); reduce_rational(&scale, &denom); - assert(denom != 0); + //assert(denom != 0); if (denom < scale) return numer * (scale / denom) + numer * (scale % denom) / denom; diff -ru /tmp/mad-0.14.2b/msvc++/libmad/config.h mad-0.14.2b/msvc++/libmad/config.h --- /tmp/mad-0.14.2b/msvc++/libmad/config.h 2001-11-09 04:39:15.000000000 +0200 +++ mad-0.14.2b/msvc++/libmad/config.h 2006-09-18 13:47:30.000000000 +0300 @@ -90,6 +90,8 @@ /* Define if you have the waitpid function. */ /* #undef HAVE_WAITPID */ +#ifndef _WIN32_WCE + /* Define if you have the header file. */ #define HAVE_ASSERT_H 1 @@ -105,6 +107,8 @@ /* Define if you have the header file. */ #define HAVE_SYS_TYPES_H 1 +#endif + /* Define if you have the header file. */ /* #undef HAVE_UNISTD_H */