Merge branch 'master' into revert-102-const

This commit is contained in:
PeterLemon 2018-09-10 21:10:06 +01:00 committed by GitHub
commit 0a79c4cacd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -25,7 +25,7 @@ find_package(Threads REQUIRED)
# If using GCC, configure it accordingly.
if (${CMAKE_C_COMPILER_ID} MATCHES GNU)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -std=c99")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-unused-parameter -std=c99 -Werror=discarded-qualifiers -Werror=implicit-function-declaration")
# Include architecture-specify machinery.
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpmachine

View file

@ -42,6 +42,14 @@ static inline int cen64_thread_join(cen64_thread *t) {
return pthread_join(*t, NULL);
}
#ifdef __APPLE__
int pthread_setname_np(const char*);
#elif __NETBSD__
int pthread_setname_np(cen64_thread*, const char*, const char*);
#else
int pthread_setname_np(cen64_thread*, const char*);
#endif
// Sets the name of the thread to a specific value
// This function is os dependent and must be called either
// before starting the thread or on macOS directly after the creation.