Fixes for bug # 10543, build on older sunpro now works.

This commit is contained in:
Bill Hoffman 2010-05-04 14:51:12 -04:00
parent e2c496e2af
commit a18612429d
2 changed files with 7 additions and 5 deletions

View File

@ -43,9 +43,11 @@
* Disabling inline keyword for compilers known to choke on it:
* - Watcom C++ in C code. (For any version?)
* - SGI MIPSpro
* - SunPro C
* - Microsoft Visual C++ 6.0 (supposedly newer versions too)
*/
#if defined(__WATCOMC__) || defined(__sgi) || defined(__hpux) || defined(__BORLANDC__)
#if defined(__WATCOMC__) || defined(__sgi) || defined(__hpux)
|| defined(__BORLANDC__) || defined(__SUNPRO_C)
#define inline
#elif defined(_MSC_VER)
#define inline __inline

View File

@ -286,10 +286,10 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte));
// The following memset eliminates the valgrind uninitialized warning
// "swept under the carpet" here:
// http://www.zlib.net/zlib_faq.html#faq36
//
/* The following memset eliminates the valgrind uninitialized warning
"swept under the carpet" here:
http://www.zlib.net/zlib_faq.html#faq36 */
memset(s->window, 0, s->w_size*2*sizeof(Byte));
s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos));