Adapt to new zlib. Get rid of proxy zlib.h, we supply proper "-I".
Implement zcalloc/zfree in terms of WinCE functions.
This commit is contained in:
parent
b674645e95
commit
c498580cc6
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
# $NetBSD: libz.config,v 1.5 2005/12/11 12:17:30 christos Exp $
|
||||
# $NetBSD: libz.config,v 1.6 2006/01/17 03:12:29 uwe Exp $
|
||||
|
||||
# config file/script to generate project file (.dsp/.vcp) for libz
|
||||
|
||||
|
@ -7,15 +7,13 @@ TYPE=static_library
|
|||
|
||||
NAME='libz'
|
||||
SRCFILE_LIST='
|
||||
../../../../lib/libz/crc32.c
|
||||
../../../../lib/libz/infblock.c
|
||||
../../../../lib/libz/infcodes.c
|
||||
../../../../lib/libz/inffast.c
|
||||
../../../../lib/libz/inflate.c
|
||||
../../../../lib/libz/inftrees.c
|
||||
../../../../lib/libz/infutil.c
|
||||
../../../../lib/libz/uncompr.c
|
||||
../../../../lib/libz/zalloc.c
|
||||
../../../../../common/dist/zlib/adler32.c
|
||||
../../../../../common/dist/zlib/crc32.c
|
||||
../../../../../common/dist/zlib/inffast.c
|
||||
../../../../../common/dist/zlib/inflate.c
|
||||
../../../../../common/dist/zlib/inftrees.c
|
||||
../../../../../common/dist/zlib/uncompr.c
|
||||
zalloc.c
|
||||
'
|
||||
CPPDEF_LIST='
|
||||
_STANDALONE
|
||||
|
@ -29,8 +27,9 @@ CPPDEF_LIST='
|
|||
'
|
||||
INCDIR_LIST='
|
||||
.
|
||||
../../../..
|
||||
../include
|
||||
../../../..
|
||||
../../../../../common/dist/zlib
|
||||
'
|
||||
LIBDEP_LIST=''
|
||||
LIBRARY_LIST=''
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
/* $NetBSD: zalloc.c,v 1.1 2006/01/17 03:12:29 uwe Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Valeriy E. Ushakov
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. The name of the author may not be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "zutil.h"
|
||||
#include <malloc.h>
|
||||
#include <memory.h>
|
||||
|
||||
voidpf
|
||||
zcalloc(opaque, items, size)
|
||||
voidpf opaque;
|
||||
unsigned items;
|
||||
unsigned size;
|
||||
{
|
||||
size_t total = items * size;
|
||||
|
||||
opaque = malloc(total);
|
||||
if (opaque != NULL)
|
||||
memset(opaque, 0, total);
|
||||
return opaque;
|
||||
}
|
||||
|
||||
void
|
||||
zcfree(opaque, ptr)
|
||||
voidpf opaque;
|
||||
voidpf ptr;
|
||||
{
|
||||
free(ptr);
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
#include "../../../../lib/libz/zlib.h"
|
Loading…
Reference in New Issue