Skip to content

Commit

Permalink
Fix macos build
Browse files Browse the repository at this point in the history
  • Loading branch information
Hoishin committed Apr 30, 2019
1 parent 4ed990e commit 5ec4c9d
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 12 deletions.
35 changes: 27 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,42 @@
# https://travis-ci.org/HearthSim/decrunch
dist: xenial
language: python

python:
- 3.5
- 3.6
- 3.7

cache: pip

matrix:
include:
- os: linux
python: 3.5
env: CXX=g++-8
- os: linux
python: 3.6
env: CXX=g++-8
- os: linux
python: 3.7
env: CXX=g++-8
- os: osx
language: generic
env: CXX=g++-8 PYTHON_VERSION=3.5.7
- os: osx
language: generic
env: CXX=g++-8 PYTHON_VERSION=3.6.8
- os: osx
language: generic
env: CXX=g++-8 PYTHON_VERSION=3.7.3

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
homebrew:
packages:
- pyenv
update: true

env:
- CXX=g++-8
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pyenv install "$PYTHON_VERSION" && pyenv global "$PYTHON_VERSION"; fi

install:
- pip install --upgrade pip wheel setuptools
Expand Down
4 changes: 1 addition & 3 deletions crn_decomp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@

#include <string.h>

#if defined(__APPLE__)
#define malloc_usable_size malloc_size
#else
#if !defined(__APPLE__)
#if defined(__FreeBSD__)
#include <stdlib.h>
#else
Expand Down
5 changes: 4 additions & 1 deletion crunch/crn_decomp.h
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,11 @@ const unsigned int cCRNHeaderMinSize = 62U;

#include <stdio.h>
#include <stdlib.h>
#ifdef WIN32
#if defined(WIN32)
#include <memory.h>
#elif defined(__APPLE__)
#include <malloc/malloc.h>
#define malloc_usable_size malloc_size
#else
#include <malloc.h>
#endif
Expand Down

0 comments on commit 5ec4c9d

Please sign in to comment.