Skip to content

Fix. Build on MSVC #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
language: erlang
language:

env:
global:
- PLATFORM=linux
- LUAROCKS_VER=2.2.0
matrix:
- LUA=lua5.1 LUA_SFX=
- LUA=lua5.2 LUA_SFX=
- LUA=luajit LUA_SFX=jit
- LUA=lua5.3 LUA_SFX=
- LUA=lua5.1
- LUA=lua5.2
- LUA=lua5.3
- LUA=luajit

before_install:
- bash -x .travis/setup_lua.sh
- bash .travis/setup_lua.sh
- sudo pip install cpp-coveralls

install:
- sudo luarocks make rockspec/lua-cmsgpack-scm-1.rockspec CFLAGS="-O2 -fPIC -ftest-coverage -fprofile-arcs" LIBFLAG="-shared --coverage"

script:
- lua$LUA_SFX test.lua
- lua test.lua

after_success:
- coveralls
Expand Down
4 changes: 4 additions & 0 deletions lua_cmsgpack.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
#define LUACMSGPACK_MAX_NESTING 16 /* Max tables nesting. */
#endif

#ifdef _MSC_VER
#define isinf(x) (!_finite(x))
#endif

/* Check if float or double can be an integer without loss of precision */
#define IS_INT_TYPE_EQUIVALENT(x, T) (!isinf(x) && (T)(x) == (x))

Expand Down