"comply" with ISO C11
Except for the bunch of macros prefixed with double underscores, but let's take care of that some time later (read: never).
This commit is contained in:
parent
b011d5feb5
commit
5b46a05ce7
2 changed files with 5 additions and 1 deletions
|
@ -3,7 +3,7 @@
|
|||
cmake_minimum_required(VERSION 3.14.0)
|
||||
project(neo VERSION 0.1.0 LANGUAGES C)
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_C_EXTENSIONS ON)
|
||||
set(CMAKE_C_EXTENSIONS OFF)
|
||||
|
||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
|
|
@ -21,6 +21,10 @@ extern "C" {
|
|||
# define offsetof(type, member) __builtin_offsetof(type, member)
|
||||
#endif
|
||||
|
||||
#ifndef typeof
|
||||
# define typeof(expr) __typeof(expr)
|
||||
#endif
|
||||
|
||||
/** Get the absolute (non negative) value of an integer */
|
||||
#define nabs(n) ({ \
|
||||
/* n is an expression, not a variable, evaluate it only once */ \
|
||||
|
|
Loading…
Reference in a new issue