summaryrefslogtreecommitdiffstats
path: root/include/features.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/features.h')
-rw-r--r--include/features.h29
1 files changed, 17 insertions, 12 deletions
diff --git a/include/features.h b/include/features.h
index 07d19f1f5..339a320ba 100644
--- a/include/features.h
+++ b/include/features.h
@@ -106,6 +106,19 @@
#undef __FAVOR_BSD
#undef __KERNEL_STRICT_NAMES
+/*
+ * NPTL requires this to be defined. Unfortunately, due to complexities
+ * in include dependencies, this cannot be defined on a per file basis.
+ */
+#define __need_uClibc_config_h
+#include <bits/uClibc_config.h>
+#ifdef __PTHREADS_NATIVE__
+# ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+# endif
+#endif
+#undef __need_uClibc_config_h
+
/* Suppress kernel-name space pollution unless user expressedly asks
for it. */
#ifndef _LOOSE_KERNEL_NAMES
@@ -280,14 +293,6 @@
# define __GLIBC_MINOR__ 2
#endif
-/*
- * NPTL requires this to be defined. Unfortunately, due to complexities
- * in include dependencies, this cannot be defined on a per file basis.
- */
-#ifdef __PTHREADS_NATIVE__
-# define __USE_XOPEN2K 1
-#endif
-
/* Convenience macros to test the versions of glibc and gcc.
Use them like this:
#if __GNUC_PREREQ (2,8)
@@ -362,7 +367,7 @@ uClibc was built without large file support enabled.
/* Some nice features only work properly with ELF */
#if defined _LIBC
-#if defined __HAVE_ELF__
+# if defined __HAVE_ELF__
/* Define ALIASNAME as a weak alias for NAME. */
# define weak_alias(name, aliasname) _weak_alias (name, aliasname)
# define _weak_alias(name, aliasname) \
@@ -384,8 +389,8 @@ uClibc was built without large file support enabled.
asm (".section " ".gnu.warning." #symbol "\n\t.previous"); \
static const char __evoke_link_warning_##symbol[] \
__attribute__ ((unused, section (".gnu.warning." #symbol "\n\t#"))) = msg;
-#endif
-#else /* !defined __HAVE_ELF__ */
+# endif
+# else /* !defined __HAVE_ELF__ */
# define strong_alias(name, aliasname) _strong_alias (name, aliasname)
# define weak_alias(name, aliasname) _strong_alias (name, aliasname)
# define _strong_alias(name, aliasname) \
@@ -394,7 +399,7 @@ uClibc was built without large file support enabled.
# define link_warning(symbol, msg) \
asm (".stabs \"" msg "\",30,0,0,0\n\t" \
".stabs \"" #symbol "\",1,0,0,0\n");
-#endif
+# endif
#ifndef weak_function
/* If we do not have the __attribute__ ((weak)) syntax, there is no way we