From 6984b8554c94a34d375e221eb08d094c28599c8b Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Mon, 21 Dec 2015 12:16:33 -0500 Subject: [PATCH] Revert "libroot: Undefine constants for unsupported POSIX features" This reverts commit 7aebec8db1a6f231a2a93ec82872afadb8ed3879. As per the discussion on the mailing list. --- headers/posix/unistd.h | 4 ++-- src/system/libroot/posix/unistd/conf.cpp | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/headers/posix/unistd.h b/headers/posix/unistd.h index 4de488a158..9c8fc77099 100644 --- a/headers/posix/unistd.h +++ b/headers/posix/unistd.h @@ -43,9 +43,9 @@ #define _POSIX_THREADS (200112L) #define _POSIX_MAPPED_FILES (200809L) #define _POSIX_THREAD_PROCESS_SHARED (200809L) -#undef _POSIX_THREAD_ATTR_STACKADDR /* currently unsupported */ +#define _POSIX_THREAD_ATTR_STACKADDR (-1) /* currently unsupported */ #define _POSIX_THREAD_ATTR_STACKSIZE (200809L) -#undef _POSIX_THREAD_PRIORITY_SCHEDULING /* currently unsupported */ +#define _POSIX_THREAD_PRIORITY_SCHEDULING (-1) /* currently unsupported */ #define _POSIX_REALTIME_SIGNALS (200809L) #define _POSIX_MEMORY_PROTECTION (200809L) #define _POSIX_MONOTONIC_CLOCK (200809L) diff --git a/src/system/libroot/posix/unistd/conf.cpp b/src/system/libroot/posix/unistd/conf.cpp index a5728928cb..5ae51e9f68 100644 --- a/src/system/libroot/posix/unistd/conf.cpp +++ b/src/system/libroot/posix/unistd/conf.cpp @@ -156,13 +156,11 @@ __sysconf(int name) case _SC_THREAD_STACK_MIN: return MIN_USER_STACK_SIZE; case _SC_THREAD_ATTR_STACKADDR: - return -1; - // currently unsupported + return _POSIX_THREAD_ATTR_STACKADDR; case _SC_THREAD_ATTR_STACKSIZE: return _POSIX_THREAD_ATTR_STACKSIZE; case _SC_THREAD_PRIORITY_SCHEDULING: - return -1; - // currently unsupported + return _POSIX_THREAD_PRIORITY_SCHEDULING; case _SC_REALTIME_SIGNALS: return _POSIX_REALTIME_SIGNALS; case _SC_MEMORY_PROTECTION: