clean-up for posix tests compatibility
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4901 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
41585aacb4
commit
471db94eb8
2 changed files with 19 additions and 21 deletions
|
@ -11,11 +11,14 @@
|
||||||
* warranty.
|
* warranty.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "../Platform.h"
|
||||||
#include "../exehead/config.h"
|
#include "../exehead/config.h"
|
||||||
#ifdef NSIS_COMPRESS_USE_ZLIB
|
|
||||||
|
|
||||||
#include "ZUTIL.H"
|
#include "ZUTIL.H"
|
||||||
|
|
||||||
|
#ifndef min
|
||||||
|
# define min(x,y) ((x<y)?x:y)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* defines for inflate input/output */
|
/* defines for inflate input/output */
|
||||||
/* update pointers and return */
|
/* update pointers and return */
|
||||||
|
@ -705,6 +708,3 @@ int ZEXPORT inflate(z_streamp z)
|
||||||
#undef n
|
#undef n
|
||||||
#undef q
|
#undef q
|
||||||
#undef m
|
#undef m
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
subject to change. Applications should only use zlib.h.
|
subject to change. Applications should only use zlib.h.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* @(#) $Id: ZUTIL.H,v 1.4 2006/10/28 19:45:02 joostverburg Exp $ */
|
/* @(#) $Id: ZUTIL.H,v 1.5 2007/01/13 17:28:23 kichik Exp $ */
|
||||||
|
|
||||||
#ifndef _Z_UTIL_H
|
#ifndef _Z_UTIL_H
|
||||||
#define _Z_UTIL_H
|
#define _Z_UTIL_H
|
||||||
|
@ -59,28 +59,26 @@ typedef unsigned long ulg;
|
||||||
|
|
||||||
|
|
||||||
#ifdef EXEHEAD
|
#ifdef EXEHEAD
|
||||||
#include "../exehead/util.h"
|
# ifdef _WIN32
|
||||||
#define zmemcpy mini_memcpy
|
# include "../exehead/util.h"
|
||||||
|
# define zmemcpy mini_memcpy
|
||||||
|
# else
|
||||||
|
# define zmemcpy memcpy
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
#define zmemcpy memcpy
|
# define zmemcpy memcpy
|
||||||
#define zmemzero(a,b) memset(a,0,b)
|
# define zmemzero(a,b) memset(a,0,b)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
# define Assert(cond,msg)
|
#define Assert(cond,msg)
|
||||||
# define Trace(x)
|
#define Trace(x)
|
||||||
# define Tracev(x)
|
#define Tracev(x)
|
||||||
# define Tracevv(x)
|
#define Tracevv(x)
|
||||||
# define Tracec(c,x)
|
#define Tracec(c,x)
|
||||||
# define Tracecv(c,x)
|
#define Tracecv(c,x)
|
||||||
|
|
||||||
#ifdef EXEHEAD
|
|
||||||
#include "../exehead/util.h"
|
|
||||||
#define ZALLOC(strm, items, size) my_GlobalAlloc((items)*(size))
|
|
||||||
#define ZFREE(strm, addr) { if (addr) GlobalFree(addr); }
|
|
||||||
#else // def EXEHEAD
|
|
||||||
#define ZALLOC(strm, items, size) malloc((items)*(size))
|
#define ZALLOC(strm, items, size) malloc((items)*(size))
|
||||||
#define ZFREE(strm, addr) { if (addr) free(addr); }
|
#define ZFREE(strm, addr) { if (addr) free(addr); }
|
||||||
#endif // def EXEHEAD
|
|
||||||
#define TRY_FREE(s, p) { ZFREE(s, p); }
|
#define TRY_FREE(s, p) { ZFREE(s, p); }
|
||||||
#define ERR_RETURN(strm,err) return (err)
|
#define ERR_RETURN(strm,err) return (err)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue