Merge pull request 'Support building with musl libc (Alpine Linux)' (#216) from alpine-musl-build into master
Reviewed-on: #216
This commit was merged in pull request #216.
This commit is contained in:
+1
-5
@@ -57,14 +57,10 @@ include(SHSTKMacros)
|
||||
shstk_begin_project(PIP)
|
||||
set(PIP_VERSION "${PIP_VERSION}" CACHE STRING "")
|
||||
|
||||
set(_ICU_DEFAULT OFF)
|
||||
if((NOT DEFINED WIN32) AND (NOT DEFINED ANDROID_PLATFORM) AND (NOT DEFINED APPLE))
|
||||
set(_ICU_DEFAULT ON)
|
||||
endif()
|
||||
set(PIP_DLL_DIR "${CMAKE_CURRENT_BINARY_DIR}" CACHE STRING "")
|
||||
|
||||
# Options
|
||||
option(ICU "ICU support for convert codepages" ${_ICU_DEFAULT})
|
||||
option(ICU "ICU support for convert codepages" OFF)
|
||||
option(STD_IOSTREAM "Building with std iostream operators support" OFF)
|
||||
option(INTROSPECTION "Build with introspection" OFF)
|
||||
option(TESTS "Build tests" OFF)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
|
||||
const PIChar PIDir::separator = '/';
|
||||
#ifdef QNX
|
||||
#if defined(QNX) || !(defined(MAC_OS) || defined(__GLIBC__) || defined(_WIN32))
|
||||
# define _stat_struct_ struct stat
|
||||
# define _stat_call_ stat
|
||||
# define _stat_link_ lstat
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
# define _fseek_call_ fseek
|
||||
# define _ftell_call_ ftell
|
||||
# else
|
||||
# ifdef CC_GCC
|
||||
# if defined(CC_GCC) && (defined(__GLIBC__) || defined(_WIN32))
|
||||
# define _fopen_call_ fopen64
|
||||
# define _fseek_call_ fseeko64
|
||||
# define _ftell_call_ ftello64
|
||||
@@ -68,9 +68,15 @@
|
||||
# define _ftell_call_ ftell
|
||||
# endif
|
||||
# endif
|
||||
# define _stat_struct_ struct stat64
|
||||
# define _stat_call_ stat64
|
||||
# define _stat_link_ lstat64
|
||||
# if defined(MAC_OS) || defined(__GLIBC__) || defined(_WIN32)
|
||||
# define _stat_struct_ struct stat64
|
||||
# define _stat_call_ stat64
|
||||
# define _stat_link_ lstat64
|
||||
# else
|
||||
# define _stat_struct_ struct stat
|
||||
# define _stat_call_ stat
|
||||
# define _stat_link_ lstat
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -160,9 +160,11 @@ inline int pow2 (const int p ) {return 1 << p;}
|
||||
//! \~russian Возвращает `10` в указанной степени.
|
||||
inline float pow10(const float & e) {return powf(10.f, e);}
|
||||
|
||||
#if !defined(__linux__) || defined(__GLIBC__) || defined(__BIONIC__)
|
||||
//! \~english Returns `10` raised to the specified power.
|
||||
//! \~russian Возвращает `10` в указанной степени.
|
||||
inline double pow10(const double & e) {return pow (10. , e);}
|
||||
#endif
|
||||
|
||||
//! \~english Returns `10` raised to the specified power.
|
||||
//! \~russian Возвращает `10` в указанной степени.
|
||||
|
||||
@@ -795,10 +795,10 @@ void PIThread::setPriority(PIThread::Priority prior) {
|
||||
piZeroMemory(PRIVATE->sparam);
|
||||
pthread_getschedparam(PRIVATE->thread, &policy_, &(PRIVATE->sparam));
|
||||
PRIVATE->sparam.
|
||||
# ifndef LINUX
|
||||
sched_priority
|
||||
# else
|
||||
# if defined(LINUX) && defined(__GLIBC__)
|
||||
__sched_priority
|
||||
# else
|
||||
sched_priority
|
||||
# endif
|
||||
= priority2System(priority_);
|
||||
pthread_setschedparam(PRIVATE->thread, policy_, &(PRIVATE->sparam));
|
||||
@@ -1068,7 +1068,7 @@ void PIThread::setThreadName() {
|
||||
pthread_setname_np((const char *)name_ba.data());
|
||||
pthread_threadid_np(PRIVATE->thread, (__uint64_t *)&tid_);
|
||||
# else
|
||||
pthread_setname_np(PRIVATE->thread, (const char *)name_ba.data());
|
||||
pthread_setname_np(pthread_self(), (const char *)name_ba.data());
|
||||
# endif
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user