Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
0c211a19
Commit
0c211a19
authored
Dec 05, 2014
by
antirez
Browse files
Simplify lua_cmsgpack macro and fix build on old Linux distros.
Thanks to @badboy for the help in checking the build after the fix.
parent
d6ada4d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
deps/lua/src/lua_cmsgpack.c
View file @
0c211a19
...
...
@@ -18,14 +18,8 @@
#define LUACMSGPACK_MAX_NESTING 16
/* Max tables nesting. */
#endif
#if (_XOPEN_SOURCE >= 600 || _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L)
#define IS_FINITE(x) isfinite(x)
#else
#define IS_FINITE(x) ((x) == (x) && (x) + 1 > (x))
#endif
/* Check if float or double can be an integer without loss of precision */
#define IS_INT_TYPE_EQUIVALENT(x, T) (
IS_FINITE
(x) && (T)(x) == (x))
#define IS_INT_TYPE_EQUIVALENT(x, T) (
!isinf
(x) && (T)(x) == (x))
#define IS_INT64_EQUIVALENT(x) IS_INT_TYPE_EQUIVALENT(x, int64_t)
#define IS_INT_EQUIVALENT(x) IS_INT_TYPE_EQUIVALENT(x, int)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment