cvginfo.h: remove top-level defines and forward declare struct sstregs.
It 'defined' FxU32 and FxBool for if __unix__ is defined and cvgregs.h not included. DJGPP does define __unix__, and this caused a mess with one of my experiments. I do not see the real need for this. So, adding a forward declaration of struct sstregs, replacing all SstRegs* with volatile struct sstregs* serves the purpose. 3dfx.h (which typedefs FxU32 and FxBool) is always included before cvginfo.h everywhere in the code, so, there is no need for 'defining' FxU32 and FxBool here, either. DJGPP build gives an identical DXE output before and after this change.
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
*/
|
||||
|
||||
/*
|
||||
#if defined(__unix__) && ! defined(__CVGREGS_H__)
|
||||
// basic data types
|
||||
#define FxU32 unsigned long
|
||||
@@ -28,7 +29,9 @@
|
||||
// defn of registers not reqd, treat (SstRegs *) as (void *)
|
||||
typedef void SstRegs;
|
||||
#endif
|
||||
|
||||
*/
|
||||
struct sstregs; /* see cvgregs.h */
|
||||
|
||||
#define MAX_NUM_TMUS 3
|
||||
|
||||
// Video timing data structure
|
||||
@@ -64,7 +67,8 @@ typedef void (*FxSet32Proc)(volatile FxU32* const addr, const FxU32 val);
|
||||
// Initialization and configuration data structure
|
||||
typedef struct {
|
||||
FxU32 size; // size of this structure
|
||||
SstRegs *virtAddr[2]; // virtual memory base address
|
||||
volatile
|
||||
struct sstregs *virtAddr[2]; // virtual memory base address
|
||||
FxU32 physAddr[2]; // physical memory base address
|
||||
FxU32 deviceNumber; // PCI device number
|
||||
FxU32 vendorID; // PCI vendor ID
|
||||
@@ -128,8 +132,8 @@ typedef struct {
|
||||
FxU32 mtrrUncacheable; /* 3d register space (all wraps) */
|
||||
FxU32 mtrrWriteCombine; /* command fifo/3d lfb */
|
||||
|
||||
SstRegs *sstCSIM;
|
||||
SstRegs *sstHW; // pointer to HW
|
||||
volatile struct sstregs *sstCSIM;
|
||||
volatile struct sstregs *sstHW; // pointer to HW
|
||||
} sst1DeviceInfoStruct;
|
||||
|
||||
typedef sst1DeviceInfoStruct FxDeviceInfo;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED
|
||||
*/
|
||||
|
||||
/*
|
||||
#if defined(__unix__) && ! defined(__CVGREGS_H__)
|
||||
// basic data types
|
||||
#define FxU32 unsigned int
|
||||
@@ -28,7 +29,9 @@
|
||||
// defn of registers not reqd, treat (SstRegs *) as (void *)
|
||||
typedef void SstRegs;
|
||||
#endif
|
||||
|
||||
*/
|
||||
struct sstregs; /* see cvgregs.h */
|
||||
|
||||
#define MAX_NUM_TMUS 3
|
||||
|
||||
// Video timing data structure
|
||||
@@ -64,7 +67,8 @@ typedef void (*FxSet32Proc)(volatile FxU32* const addr, const FxU32 val);
|
||||
// Initialization and configuration data structure
|
||||
typedef struct {
|
||||
FxU32 size; // size of this structure
|
||||
SstRegs *virtAddr[2]; // virtual memory base address
|
||||
volatile
|
||||
struct sstregs *virtAddr[2]; // virtual memory base address
|
||||
FxU32 physAddr[2]; // physical memory base address
|
||||
FxU32 deviceNumber; // PCI device number
|
||||
FxU32 vendorID; // PCI vendor ID
|
||||
@@ -128,9 +132,8 @@ typedef struct {
|
||||
FxU32 mtrrUncacheable; /* 3d register space (all wraps) */
|
||||
FxU32 mtrrWriteCombine; /* command fifo/3d lfb */
|
||||
|
||||
|
||||
SstRegs *sstCSIM;
|
||||
SstRegs *sstHW; // pointer to HW
|
||||
volatile struct sstregs *sstCSIM;
|
||||
volatile struct sstregs *sstHW; // pointer to HW
|
||||
} sst1DeviceInfoStruct;
|
||||
|
||||
typedef sst1DeviceInfoStruct FxDeviceInfo;
|
||||
|
||||
Reference in New Issue
Block a user