Changeset 171 for trunk/src/sh_unix.c


Ignore:
Timestamp:
Jul 8, 2008, 11:16:14 AM (16 years ago)
Author:
katerina
Message:

Include dnmalloc (ticket #108) and fix bugs #106 (EINPROGRESS) and #107 (compressBound).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_unix.c

    r170 r171  
    37733773        {
    37743774#ifdef HAVE_LIBZ
    3775           unsigned long   clen = compressBound(sh_string_len(content));
    3776           unsigned char * compressed = SH_ALLOC(clen);
     3775          unsigned long   clen;
     3776          unsigned char * compressed;
     3777#ifdef HAVE_COMPRESSBOUND
     3778          clen       = compressBound(sh_string_len(content));
     3779#else
     3780          if (sh_string_len(content) > 10*SH_TXT_MAX)
     3781            clen = SH_TXT_MAX;
     3782          else
     3783            clen = 13 + (int)(1.0001*sh_string_len(content));
     3784#endif
     3785          compressed = SH_ALLOC(clen);
    37773786          if (Z_OK == compress(compressed, &clen,
    37783787                               (unsigned char *) sh_string_str(content),
Note: See TracChangeset for help on using the changeset viewer.