Reduce the number of ifdefs in machine independent code
Hopefully we don't have too many GNUC users who don't have
fetch and add.
diff --git a/src/mi/mempool.c b/src/mi/mempool.c
index e567904..dbc183f 100644
--- a/src/mi/mempool.c
+++ b/src/mi/mempool.c
@@ -50,12 +50,10 @@
size = UNW_ALIGN(size, MAX_ALIGN);
-#if defined(__GNUC__)
+#if defined(__GNUC__) && defined(HAVE_FETCH_AND_ADD)
/* Assume `sos_memory' is suitably aligned. */
assert(((uintptr_t) &sos_memory[0] & (MAX_ALIGN-1)) == 0);
-#endif
-#if defined(__GNUC__) && defined(HAVE_FETCH_AND_ADD)
pos = fetch_and_add (&sos_memory_freepos, size);
#else
static define_lock (sos_lock);
@@ -63,7 +61,6 @@
lock_acquire (&sos_lock, saved_mask);
{
-# ifndef __GNUC__
/* No assumptions about `sos_memory' alignment. */
if (sos_memory_freepos == 0)
{
@@ -71,7 +68,6 @@
- (uintptr_t) &sos_memory[0];
sos_memory_freepos = align;
}
-# endif
pos = sos_memory_freepos;
sos_memory_freepos += size;
}