use -std=c11 not -std=gnu11

This commit is contained in:
nick black 2019-12-03 13:31:04 -05:00
parent 1ebfb2c9e3
commit d09029f7f4
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ project(notcurses VERSION 0.4.0
DESCRIPTION "UI for modern terminal emulators"
HOMEPAGE_URL "https://nick-black.com/dankwiki/index.php/notcurses"
LANGUAGES C CXX)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_VISIBILITY_PRESET hidden)
set(CMAKE_CXX_STANDARD 14)

View File

@ -46,7 +46,7 @@ egcpool_grow(egcpool* pool, size_t len){
return -1;
}
// nasty cast here because c++ source might include this header :/
typeof(*pool->pool)* tmp = (typeof(pool->pool))realloc(pool->pool, newsize);
char* tmp = (char*)realloc(pool->pool, newsize);
if(tmp == NULL){
return -1;
}