mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 16:08:36 +00:00
build: include auto/config.h explicitly
Otherwise the symbols defined in config/config.h.in may not be defined, depending on include-order.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#ifndef NVIM_ASSERT_H
|
||||
#define NVIM_ASSERT_H
|
||||
|
||||
#include "auto/config.h"
|
||||
|
||||
// support static asserts (aka compile-time asserts)
|
||||
|
||||
// some compilers don't properly support short-circuiting apparently, giving
|
||||
@@ -133,7 +135,7 @@
|
||||
///
|
||||
/// @param MAX Maximum value of the narrowest type of operand.
|
||||
/// Not used if compiler supports __builtin_add_overflow.
|
||||
#if HAVE_BUILTIN_ADD_OVERFLOW
|
||||
#ifdef HAVE_BUILTIN_ADD_OVERFLOW
|
||||
# define STRICT_ADD(a, b, c, t) \
|
||||
do { if (__builtin_add_overflow(a, b, c)) { abort(); } } while (0)
|
||||
#else
|
||||
@@ -143,7 +145,7 @@
|
||||
|
||||
/// @def STRICT_SUB
|
||||
/// @brief Subtracts (a - b) and stores result in `c`. Aborts on overflow.
|
||||
#if HAVE_BUILTIN_ADD_OVERFLOW
|
||||
#ifdef HAVE_BUILTIN_ADD_OVERFLOW
|
||||
# define STRICT_SUB(a, b, c, t) \
|
||||
do { if (__builtin_sub_overflow(a, b, c)) { abort(); } } while (0)
|
||||
#else
|
||||
|
Reference in New Issue
Block a user