aboutsummaryrefslogtreecommitdiff
path: root/src/mpack/lmpack.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2021-09-04 17:05:22 +0200
committerBjörn Linse <bjorn.linse@gmail.com>2021-09-09 16:06:43 +0200
commit2a08aeff1a38a1f44336ec1c2d0d2514de482157 (patch)
tree704b68accb60dbc2dc5211be669fc94265eabe66 /src/mpack/lmpack.c
parent4ef3c2c2c121862a9d2b3d1d7578e1f7f1f0f60c (diff)
downloadrneovim-2a08aeff1a38a1f44336ec1c2d0d2514de482157.tar.gz
rneovim-2a08aeff1a38a1f44336ec1c2d0d2514de482157.tar.bz2
rneovim-2a08aeff1a38a1f44336ec1c2d0d2514de482157.zip
fix(build): make vendored libmpack and libmpack-lua build properly
Diffstat (limited to 'src/mpack/lmpack.c')
-rw-r--r--src/mpack/lmpack.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/mpack/lmpack.c b/src/mpack/lmpack.c
index 6da28fc263..9f102fc950 100644
--- a/src/mpack/lmpack.c
+++ b/src/mpack/lmpack.c
@@ -15,8 +15,6 @@
* compilation.
*/
#define LUA_LIB
-/* for snprintf */
-#define _XOPEN_SOURCE 500
#include <limits.h>
#include <stdlib.h>
#include <string.h>
@@ -26,12 +24,11 @@
#include <lua.h>
#include <luaconf.h>
-#ifdef MPACK_USE_SYSTEM
-# include <mpack.h>
-#else
-# define MPACK_API static
-# include "mpack-src/src/mpack.c"
-#endif
+#include "nvim/macros.h"
+
+#include "lmpack.h"
+
+#include "rpc.h"
#define UNPACKER_META_NAME "mpack.Unpacker"
#define PACKER_META_NAME "mpack.Packer"
@@ -713,7 +710,7 @@ static void lmpack_unparse_enter(mpack_parser_t *parser, mpack_node_t *node)
node->tok = mpack_pack_nil();
break;
}
- /* Fallthrough */
+ FALLTHROUGH;
default:
{
/* #define FMT */