glide2x/h3 (linhwc.c/minihwc.c): fix fenceVar with newer gcc versions.
from glide3x tree.
This commit is contained in:
@@ -63,7 +63,15 @@ hwcCheckMemSize(hwcBoardInfo *bInfo, FxU32 xres, FxU32 yres, FxU32 nColBuffers,
|
||||
#include <X11/extensions/xf86dga.h>
|
||||
#include <X11/extensions/xf86vmode.h>
|
||||
|
||||
static FxU32 fenceVar;
|
||||
#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
|
||||
# define __attribute_used __attribute__((__used__))
|
||||
#elif defined(__GNUC__) && (__GNUC__ >= 2)
|
||||
# define __attribute_used __attribute__((__unused__))
|
||||
#else
|
||||
# define __attribute_used
|
||||
#endif
|
||||
|
||||
static FxU32 __attribute_used fenceVar;
|
||||
#define P6FENCE asm("xchg %%eax, %0" : : "m" (fenceVar) : "eax");
|
||||
|
||||
#define MAXFIFOSIZE 0x40000
|
||||
|
||||
@@ -441,10 +441,18 @@
|
||||
|
||||
#define MAXFIFOSIZE 0x40000
|
||||
|
||||
#if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)))
|
||||
# define __attribute_used __attribute__((__used__))
|
||||
#elif defined(__GNUC__) && (__GNUC__ >= 2)
|
||||
# define __attribute_used __attribute__((__unused__))
|
||||
#else
|
||||
# define __attribute_used
|
||||
#endif
|
||||
|
||||
static hwcInfo hInfo;
|
||||
static char errorString[1024];
|
||||
static int num_monitor = 0;
|
||||
static FxU32 fenceVar;
|
||||
static FxU32 __attribute_used fenceVar;
|
||||
|
||||
|
||||
#if defined(__WATCOMC__)
|
||||
|
||||
Reference in New Issue
Block a user