summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/features.h23
-rw-r--r--include/unistd.h6
2 files changed, 18 insertions, 11 deletions
diff --git a/include/features.h b/include/features.h
index 54330dae9..af64066d9 100644
--- a/include/features.h
+++ b/include/features.h
@@ -45,6 +45,10 @@
# define __restrict /* Ignore */
#endif
+/* __extension__ is known in gcc 2.8 above. */
+#if !defined __GNUC__ || __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
+# define __extension__ /* Ignore */
+#endif
#ifdef __STDC__
@@ -105,13 +109,20 @@
#undef __need_uClibc_config_h
-#if 1 /* This only works with GNU ld, but that is what we use 'round these parts */
-#define link_warning(symbol, msg) \
-asm (".section " ".gnu.warning." #symbol "\n\t.previous"); \
-static const char __evoke_link_warning_##symbol[] \
-__attribute__ ((section (".gnu.warning." #symbol "\n\t#"))) = msg;
+/* Some nice features only work properly with ELF */
+#if defined HAVE_ELF
+# define link_warning(symbol, msg) \
+ asm (".section " ".gnu.warning." #symbol "\n\t.previous"); \
+ static const char __evoke_link_warning_##symbol[] \
+ __attribute__ ((section (".gnu.warning." #symbol "\n\t#"))) = msg;
+# define weak_alias(name, aliasname) \
+ extern __typeof (name) aliasname __attribute__ ((weak, alias (#name)));
#else
-# define link_warning(symbol, msg)
+# define link_warning(symbol, msg) \
+ asm (".stabs \"" msg "\",30,0,0,0\n\t" \
+ ".stabs \"" #symbol "\",1,0,0,0\n");
+# define weak_alias(name, aliasname) \
+ __asm__(".global alias\n.set alias,original");
#endif
diff --git a/include/unistd.h b/include/unistd.h
index 16deb1ac3..b13d0c1f1 100644
--- a/include/unistd.h
+++ b/include/unistd.h
@@ -649,7 +649,7 @@ extern int setegid __P ((__gid_t __gid));
#ifdef __UCLIBC_HAS_MMU__
extern __pid_t fork __P ((void));
#else
-#define fork fork_not_available_on_mmuless_systems
+#define fork fork_not_available_on_mmuless_systems__use_vfork
#endif
#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
@@ -1008,10 +1008,6 @@ extern int pthread_atfork __P ((void (*__prepare) (void),
void (*__child) (void)));
#endif
-#ifdef __VFORK_MACRO__
-#include <bits/vfork.h>
-#endif
-
__END_DECLS
#endif /* unistd.h */