mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:47:46 +00:00
AK+Userland: Replace Linux, macOS, and *BSD macros with platform defines
We have such nice platform macros, let's clean up any remnants of manual __my_platform__ macros in LibCore, LibCompress and AK.
This commit is contained in:
parent
539fb08551
commit
1d533acbc0
6 changed files with 18 additions and 18 deletions
|
@ -12,9 +12,9 @@
|
|||
|
||||
#ifdef AK_OS_SERENITY
|
||||
# include <serenity.h>
|
||||
#elif defined(__linux__) or defined(AK_OS_MACOS)
|
||||
#elif defined(AK_OS_LINUX) or defined(AK_OS_MACOS)
|
||||
# include <pthread.h>
|
||||
#elif defined(__FreeBSD__)
|
||||
#elif defined(AK_OS_FREEBSD)
|
||||
# include <pthread.h>
|
||||
# include <pthread_np.h>
|
||||
#endif
|
||||
|
@ -28,12 +28,12 @@ StackInfo::StackInfo()
|
|||
perror("get_stack_bounds");
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
#elif defined(__linux__) or defined(__FreeBSD__)
|
||||
#elif defined(AK_OS_LINUX) or defined(AK_OS_FREEBSD)
|
||||
int rc;
|
||||
pthread_attr_t attr;
|
||||
pthread_attr_init(&attr);
|
||||
|
||||
# ifdef __linux__
|
||||
# ifdef AK_OS_LINUX
|
||||
if ((rc = pthread_getattr_np(pthread_self(), &attr)) != 0) {
|
||||
fprintf(stderr, "pthread_getattr_np: %s\n", strerror(rc));
|
||||
VERIFY_NOT_REACHED();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue