[git commit prelink] remove ucontext.h and guard sigstack structure with SUSV4_LEGACY and STRICT_HEADERS

Peter S. Mazinger ps.m at gmx.net
Wed Mar 30 11:53:36 UTC 2011


commit: http://git.uclibc.org/uClibc/commit/?id=5e22e71adfef5ad46119cea98fccf4ae998ad0d8
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/prelink

Remove ucontext.h if SUSV4_LEGACY is not set and fix it's references.
Guard sigstack structure with SUSV4_LEGACY and STRICT_HEADERS.
Disable sigstack function prototype, it is not provided by uClibc.

Signed-off-by: Peter S. Mazinger <ps.m at gmx.net>
---
 Makefile.in                               |    4 +---
 include/signal.h                          |    5 ++++-
 libc/sysdeps/linux/alpha/bits/sigstack.h  |    2 ++
 libc/sysdeps/linux/common/bits/sigstack.h |    2 ++
 libc/sysdeps/linux/ia64/bits/sigstack.h   |    2 ++
 libc/sysdeps/linux/mips/bits/sigstack.h   |    2 ++
 libc/sysdeps/linux/sparc/bits/sigstack.h  |    2 ++
 libpthread/linuxthreads.old/signals.c     |    1 -
 libpthread/linuxthreads/signals.c         |    1 -
 9 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index 6cb2034..4d232b4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -276,9 +276,7 @@ HEADERS_RM-$(UCLIBC_LINUX_SPECIFIC)          += sys/fsuid.h sys/inotify.h sys/pe
 HEADERS_RM-$(UCLIBC_SUPPORT_AI_ADDRCONFIG)   += ifaddrs.h
 HEADERS_RM-$(UCLIBC_SV4_DEPRECATED)          += ustat.h sys/ustat.h bits/ustat.h
 HEADERS_RM-$(UCLIBC_SUSV3_LEGACY)            += sys/timeb.h regexp.h
-HEADERS_RM-$(UCLIBC_SUSV4_LEGACY)            += utime.h
-	# BREAKAGE: include/signal.h uses it, this rm broke bbox compile:
-	### ucontext.h
+HEADERS_RM-$(UCLIBC_SUSV4_LEGACY)            += utime.h ucontext.h
 
 ifneq ($(findstring install,$(MAKECMDGOALS)),)
 $(addprefix $(PREFIX)$(DEVEL_PREFIX),/include $(MULTILIB_DIR)):
diff --git a/include/signal.h b/include/signal.h
index 80e4ede..37ed297 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -392,14 +392,17 @@ extern int siginterrupt (int __sig, int __interrupt) __THROW;
 # include <bits/sigstack.h>
 # ifdef __USE_XOPEN
 /* This will define `ucontext_t' and `mcontext_t'.  */
-#  include <ucontext.h>
+/* SuSv4 obsoleted include/ucontext.h */
+#  include <sys/ucontext.h>
 # endif
 
+# if 0
 /* Run signals handlers on the stack specified by SS (if not NULL).
    If OSS is not NULL, it is filled in with the old signal stack status.
    This interface is obsolete and on many platform not implemented.  */
 extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
      __THROW __attribute_deprecated__;
+# endif
 
 /* Alternate signal handler stack interface.
    This interface should always be preferred over `sigstack'.  */
diff --git a/libc/sysdeps/linux/alpha/bits/sigstack.h b/libc/sysdeps/linux/alpha/bits/sigstack.h
index 7faaf98..e9fbc6d 100644
--- a/libc/sysdeps/linux/alpha/bits/sigstack.h
+++ b/libc/sysdeps/linux/alpha/bits/sigstack.h
@@ -22,12 +22,14 @@
 #endif
 
 
+#if defined __UCLIBC_SUSV4_LEGACY__ || !defined __UCLIBC_STRICT_HEADERS__
 /* Structure describing a signal stack (obsolete).  */
 struct sigstack
   {
     __ptr_t ss_sp;		/* Signal stack pointer.  */
     int ss_onstack;		/* Nonzero if executing on this stack.  */
   };
+#endif
 
 
 /* Possible values for `ss_flags.'.  */
diff --git a/libc/sysdeps/linux/common/bits/sigstack.h b/libc/sysdeps/linux/common/bits/sigstack.h
index 7f26036..2b3b321 100644
--- a/libc/sysdeps/linux/common/bits/sigstack.h
+++ b/libc/sysdeps/linux/common/bits/sigstack.h
@@ -22,12 +22,14 @@
 #endif
 
 
+#if defined __UCLIBC_SUSV4_LEGACY__ || !defined __UCLIBC_STRICT_HEADERS__
 /* Structure describing a signal stack (obsolete).  */
 struct sigstack
   {
     void *ss_sp;		/* Signal stack pointer.  */
     int ss_onstack;		/* Nonzero if executing on this stack.  */
   };
+#endif
 
 
 /* Possible values for `ss_flags.'.  */
diff --git a/libc/sysdeps/linux/ia64/bits/sigstack.h b/libc/sysdeps/linux/ia64/bits/sigstack.h
index c9c9d2f..ea27a77 100644
--- a/libc/sysdeps/linux/ia64/bits/sigstack.h
+++ b/libc/sysdeps/linux/ia64/bits/sigstack.h
@@ -24,12 +24,14 @@
 #ifndef _SIGSTACK_H
 #define _SIGSTACK_H	1
 
+#if defined __UCLIBC_SUSV4_LEGACY__ || !defined __UCLIBC_STRICT_HEADERS__
 /* Structure describing a signal stack (obsolete).  */
 struct sigstack
   {
     __ptr_t ss_sp;		/* Signal stack pointer.  */
     int ss_onstack;		/* Nonzero if executing on this stack.  */
   };
+#endif
 
 
 /* Possible values for `ss_flags.'.  */
diff --git a/libc/sysdeps/linux/mips/bits/sigstack.h b/libc/sysdeps/linux/mips/bits/sigstack.h
index d2c8552..64643d1 100644
--- a/libc/sysdeps/linux/mips/bits/sigstack.h
+++ b/libc/sysdeps/linux/mips/bits/sigstack.h
@@ -22,12 +22,14 @@
 #endif
 
 
+#if defined __UCLIBC_SUSV4_LEGACY__ || !defined __UCLIBC_STRICT_HEADERS__
 /* Structure describing a signal stack (obsolete).  */
 struct sigstack
   {
     void *ss_sp;		/* Signal stack pointer.  */
     int ss_onstack;		/* Nonzero if executing on this stack.  */
   };
+#endif
 
 
 /* Possible values for `ss_flags.'.  */
diff --git a/libc/sysdeps/linux/sparc/bits/sigstack.h b/libc/sysdeps/linux/sparc/bits/sigstack.h
index df46539..432ec83 100644
--- a/libc/sysdeps/linux/sparc/bits/sigstack.h
+++ b/libc/sysdeps/linux/sparc/bits/sigstack.h
@@ -22,12 +22,14 @@
 #endif
 
 
+#if defined __UCLIBC_SUSV4_LEGACY__ || !defined __STRICT_HEADERS__
 /* Structure describing a signal stack (obsolete).  */
 struct sigstack
   {
     void *ss_sp;		/* Signal stack pointer.  */
     int ss_onstack;		/* Nonzero if executing on this stack.  */
   };
+#endif
 
 
 /* Possible values for `ss_flags.'.  */
diff --git a/libpthread/linuxthreads.old/signals.c b/libpthread/linuxthreads.old/signals.c
index 2a451f3..23d838e 100644
--- a/libpthread/linuxthreads.old/signals.c
+++ b/libpthread/linuxthreads.old/signals.c
@@ -20,7 +20,6 @@
 #include "pthread.h"
 #include "internals.h"
 #include "spinlock.h"
-#include <ucontext.h>
 #include <bits/sigcontextinfo.h>
 
 /* mods for uClibc: __libc_sigaction is not in any standard headers */
diff --git a/libpthread/linuxthreads/signals.c b/libpthread/linuxthreads/signals.c
index 02bf1c6..c081255 100644
--- a/libpthread/linuxthreads/signals.c
+++ b/libpthread/linuxthreads/signals.c
@@ -19,7 +19,6 @@
 #include "pthread.h"
 #include "internals.h"
 #include "spinlock.h"
-#include <ucontext.h>
 
 /* mods for uClibc: __libc_sigaction is not in any standard headers */
 extern __typeof(sigaction) __libc_sigaction;
-- 
1.7.3.4



More information about the uClibc-cvs mailing list