HearthSim / decrunch

Python wrapper around Crunch DXTc decompressor
https://hearthsim.info
zlib License
14 stars 23 forks source link

Malloc.h replaced by stdlib.h while installing #9

Closed jleclanche closed 6 years ago

jleclanche commented 6 years ago

@danielfrausto commented on Fri Feb 02 2018

Hi , while trying to install scrunch, I get the error "malloc.h replaced by stdlib.h" while installing. Using freebsd 11.1 and python3.

jleclanche commented 6 years ago

@danielfrausto Can you PR an ifdef for freebsd? It should be straightforward but I have no way to test it myself here.

danielfrausto commented 6 years ago

@jleclanche I have modified crn_decomp.cpp to this...

#define _CRT_SECURE_NO_WARNINGS
#include <string.h>
#if !defined(__APPLE__)
#if defined(__FreeBSD__)
#include <stdlib.h>
#else
#include <malloc.h>
#endif
#ifdef _WIN32
#define malloc_usable_size _msize
#endif
#endif

#include "crn_decomp.h"

and in crunch/crn_decomp.h include is already set.

Sorry , I am new to python.