pike.git / src / modules / Gz / zlibmod.c

version» Context lines:

pike.git/src/modules/Gz/zlibmod.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: zlibmod.c,v 1.87 2009/08/30 13:44:15 grubba Exp $ + || $Id: zlibmod.c,v 1.88 2009/08/30 15:58:54 grubba Exp $   */      #include "global.h"   #include "zlib_machine.h"   #include "module.h"   #include "program.h"   #include "module_support.h"      #if !defined(HAVE_LIBZ) && !defined(HAVE_LIBGZ)   #undef HAVE_ZLIB_H
pike.git/src/modules/Gz/zlibmod.c:645:    else    Pike_error("Failed to initialize Gz.inflate (%d).\n", tmp);    }   }      static int do_inflate(dynamic_buffer *buf,    struct zipper *this,    int flush)   {    int fail=0; -  ONERROR uwp; +     -  + #ifdef _REENTRANT +  ONERROR uwp;    THREADS_ALLOW();    mt_lock(& this->lock);    THREADS_DISALLOW();    SET_ONERROR (uwp, do_mt_unlock, &this->lock); -  + #endif       if(!this->gz.state)    {    fail=Z_STREAM_ERROR;    }else{   #if 0    static int fnord=0;    fnord++;   #endif   
pike.git/src/modules/Gz/zlibmod.c:701:    if(ret == Z_BUF_ERROR) ret=Z_OK;       if(ret != Z_OK)    {    fail=ret;    break;    }    } while(!this->gz.avail_out || flush==Z_FINISH || this->gz.avail_in);    }    + #ifdef _REENTRANT    CALL_AND_UNSET_ONERROR (uwp); -  + #endif    return fail;   }      void zlibmod_unpack(struct pike_string *data, dynamic_buffer *buf, int raw)   {    struct zipper z;    int ret;       MEMSET(&z, 0, sizeof(z));    z.gz.zalloc = Z_NULL;