This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] boehm-gc 4.2.x, remove duplicate code
- From: Andreas Tobler <toa at pop dot agri dot ch>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, Java Patches <java-patches at gcc dot gnu dot org>
- Date: Mon, 01 Oct 2007 22:57:20 +0200
- Subject: [patch] boehm-gc 4.2.x, remove duplicate code
Hi all,
once the branch is open again I'd like to apply the following patch.
ok for 4.2.3?
2007-10-01 Andreas Tobler <a.tobler@schweiz.org>
* include/private/gc_priv.h: Remove duplicate code for DARWIN.
Index: include/private/gc_priv.h
===================================================================
--- include/private/gc_priv.h (revision 128893)
+++ include/private/gc_priv.h (working copy)
@@ -286,53 +286,6 @@
#endif
-#if defined(DARWIN)
-# if defined(POWERPC)
-# if CPP_WORDSZ == 32
-# define GC_THREAD_STATE_T ppc_thread_state_t
-# define GC_MACH_THREAD_STATE PPC_THREAD_STATE
-# define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE_COUNT
-# define GC_MACH_HEADER mach_header
-# define GC_MACH_SECTION section
-# else
-# define GC_THREAD_STATE_T ppc_thread_state64_t
-# define GC_MACH_THREAD_STATE PPC_THREAD_STATE64
-# define GC_MACH_THREAD_STATE_COUNT PPC_THREAD_STATE64_COUNT
-# define GC_MACH_HEADER mach_header_64
-# define GC_MACH_SECTION section_64
-# endif
-# elif defined(I386) || defined(X86_64)
-# if CPP_WORDSZ == 32
-# define GC_THREAD_STATE_T x86_thread_state32_t
-# define GC_MACH_THREAD_STATE x86_THREAD_STATE32
-# define GC_MACH_THREAD_STATE_COUNT x86_THREAD_STATE32_COUNT
-# define GC_MACH_HEADER mach_header
-# define GC_MACH_SECTION section
-# else
-# define GC_THREAD_STATE_T x86_thread_state64_t
-# define GC_MACH_THREAD_STATE x86_THREAD_STATE64
-# define GC_MACH_THREAD_STATE_COUNT x86_THREAD_STATE64_COUNT
-# define GC_MACH_HEADER mach_header_64
-# define GC_MACH_SECTION section_64
-# endif
-# else
-# error define GC_THREAD_STATE_T
-# define GC_MACH_THREAD_STATE MACHINE_THREAD_STATE
-# define GC_MACH_THREAD_STATE_COUNT MACHINE_THREAD_STATE_COUNT
-# endif
-/* Try to work out the right way to access thread state structure members.
- The structure has changed its definition in different Darwin versions.
- This now defaults to the (older) names without __, thus hopefully,
- not breaking any existing Makefile.direct builds. */
-# if defined (HAS_PPC_THREAD_STATE___R0) \
- || defined (HAS_PPC_THREAD_STATE64___R0) \
- || defined (HAS_X86_THREAD_STATE32___EAX) \
- || defined (HAS_X86_THREAD_STATE64___RAX)
-# define THREAD_FLD(x) __ ## x
-# else
-# define THREAD_FLD(x) x
-# endif
-#endif
/*********************************/
/* */
/* OS interface routines */