summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tsbogend@alpha.franken.de>1998-08-25 16:20:59 +0000
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>1998-08-25 16:20:59 +0000
commita30674b9d904056e352196494597989a36839fe1 (patch)
treeee7b5b92f9a9db0a6b55f44c4e1b20f852ab8975 /include
parentc7fc24dc4420057f103afe8fc64524ebc25c5d37 (diff)
workaround for gcc-2.7.2 bug
Diffstat (limited to 'include')
-rw-r--r--include/asm-mips/spinlock.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/asm-mips/spinlock.h b/include/asm-mips/spinlock.h
index 31390a14b..72d354f84 100644
--- a/include/asm-mips/spinlock.h
+++ b/include/asm-mips/spinlock.h
@@ -1,14 +1,22 @@
-/* $Id: spinlock.h,v 1.2 1998/05/07 15:21:41 ralf Exp $
+/* $Id: spinlock.h,v 1.2 1998/06/30 00:23:12 ralf Exp $
*/
#ifndef __ASM_MIPS_SPINLOCK_H
#define __ASM_MIPS_SPINLOCK_H
#ifndef __SMP__
-/* gcc 2.7.2 can crash initializing an empty structure. For now we
- try to do though ... */
+/*
+ * Gcc-2.7.x has a nasty bug with empty initializers.
+ */
typedef struct { } spinlock_t;
#define SPIN_LOCK_UNLOCKED { }
+#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8)
+ typedef struct { } spinlock_t;
+ #define SPIN_LOCK_UNLOCKED { }
+#else
+ typedef struct { int gcc_is_buggy; } spinlock_t;
+ #define SPIN_LOCK_UNLOCKED { 0 }
+#endif
#define spin_lock_init(lock) do { } while(0)
#define spin_lock(lock) do { } while(0)