diff -urNp x-ref/include/linux/spinlock.h x/include/linux/spinlock.h --- x-ref/include/linux/spinlock.h Thu Sep 26 04:14:30 2002 +++ x/include/linux/spinlock.h Mon Sep 30 01:07:21 2002 @@ -67,16 +67,16 @@ /* * Your basic spinlocks, allowing only a single CPU anywhere + */ +typedef struct { } spinlock_t; +#define SPIN_LOCK_UNLOCKED (spinlock_t) { } + +/* * * Some older gcc versions had a nasty bug with empty initializers. - * (XXX: could someone please confirm whether egcs 1.1 still has this bug?) */ -#if (__GNUC__ > 2 || __GNUC_MINOR__ > 95) - typedef struct { } spinlock_t; - #define SPIN_LOCK_UNLOCKED (spinlock_t) { } -#else - typedef struct { int gcc_is_buggy; } spinlock_t; - #define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 } +#if (__GNUC__ <= 2 && __GNUC_MINOR__ <= 91) +#error "gcc too old to compile the kernel, please use gcc 3.2 or more recent" #endif #define spin_lock_init(lock) do { } while(0) @@ -131,17 +131,9 @@ typedef struct { * can "mix" irq-safe locks - any writer needs to get a * irq-safe write-lock, but readers can get non-irqsafe * read-locks. - * - * Some older gcc versions had a nasty bug with empty initializers. - * (XXX: could someone please confirm whether egcs 1.1 still has this bug?) */ -#if (__GNUC__ > 2 || __GNUC_MINOR__ > 91) - typedef struct { } rwlock_t; - #define RW_LOCK_UNLOCKED (rwlock_t) { } -#else - typedef struct { int gcc_is_buggy; } rwlock_t; - #define RW_LOCK_UNLOCKED (rwlock_t) { 0 } -#endif +typedef struct { } rwlock_t; +#define RW_LOCK_UNLOCKED (rwlock_t) { } #define rwlock_init(lock) do { } while(0) #define read_lock(lock) (void)(lock) /* Not "unused variable". */