mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 02:21:51 +00:00
refactor(build): don't use the preprocessor when generating headers
Using the preprocessor before generating prototypes provides some
"niceties" but the places that rely on these are pretty few.
Vastly simplifying the BUILD SYSTEM is a better trade-off.
Unbalancing { } blocks due to the preprocessor is cringe anyway (think
of the tree-sitter trees!), write these in a different way.
Add some workarounds for plattform specific features.
INCLUDE_GENERATED_DECLARATIONS flag is now technically redundant,
but will be cleaned up in a follow-up PR as it is a big mess.
This commit is contained in:
@@ -33,6 +33,10 @@
|
||||
#include "nvim/ui.h"
|
||||
#include "nvim/ui_client.h"
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "msgpack_rpc/channel.c.generated.h"
|
||||
#endif
|
||||
|
||||
#ifdef NVIM_LOG_DEBUG
|
||||
# define REQ "[request] "
|
||||
# define RES "[response] "
|
||||
@@ -66,10 +70,6 @@ static void log_notify(char *dir, uint64_t channel_id, const char *name)
|
||||
# define log_notify(...)
|
||||
#endif
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "msgpack_rpc/channel.c.generated.h"
|
||||
#endif
|
||||
|
||||
void rpc_init(void)
|
||||
{
|
||||
ch_before_blocking_events = multiqueue_new_child(main_loop.events);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h> // IWYU pragma: keep
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
|
||||
Reference in New Issue
Block a user