Place #ifdef's around MSVC #pragma's
Rewrite some signed/unsigned unions to use casts. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@956
This commit is contained in:
parent
d8eae49c04
commit
4916b5fb6c
10 changed files with 55 additions and 21 deletions
|
@ -162,14 +162,14 @@ switch (Fetchb()) {
|
|||
case 0xbe: /* MOVSX Gd,Eb */
|
||||
{
|
||||
GetRMrd;
|
||||
if (rm >= 0xc0 ) {GetEArb;*rmrd=*earbs;}
|
||||
if (rm >= 0xc0 ) {GetEArb;*rmrd=*(Bit8s *)earb;}
|
||||
else {GetEAa;*rmrd=LoadMbs(eaa);}
|
||||
break;
|
||||
}
|
||||
case 0xbf: /* MOVSX Gd,Ew */
|
||||
{
|
||||
GetRMrd;
|
||||
if (rm >= 0xc0 ) {GetEArw;*rmrd=*earws;}
|
||||
if (rm >= 0xc0 ) {GetEArw;*rmrd=*(Bit16s *)earw;}
|
||||
else {GetEAa;*rmrd=LoadMws(eaa);}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -381,7 +381,7 @@ switch(Fetchb()) {
|
|||
case 0xbe: /* MOVSX Gw,Eb */
|
||||
{
|
||||
GetRMrw;
|
||||
if (rm >= 0xc0 ) {GetEArb;*rmrw=*earbs;}
|
||||
if (rm >= 0xc0 ) {GetEArb;*rmrw=*(Bit8s *)earb;}
|
||||
else {GetEAa;*rmrw=LoadMbs(eaa);}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -53,24 +53,12 @@ extern Bit32u * lookupRMEAregd[256];
|
|||
|
||||
|
||||
#define GetEArb \
|
||||
union { \
|
||||
Bit8u * earb; \
|
||||
Bit8s * earbs; \
|
||||
}; \
|
||||
earb=lookupRMEAregb[rm];
|
||||
Bit8u * earb=lookupRMEAregb[rm];
|
||||
|
||||
#define GetEArw \
|
||||
union { \
|
||||
Bit16u * earw; \
|
||||
Bit16s * earws; \
|
||||
}; \
|
||||
earw=lookupRMEAregw[rm];
|
||||
Bit16u * earw=lookupRMEAregw[rm];
|
||||
|
||||
#define GetEArd \
|
||||
union { \
|
||||
Bit32u * eard; \
|
||||
Bit32s * eards; \
|
||||
}; \
|
||||
eard=lookupRMEAregd[rm];
|
||||
Bit32u * eard=lookupRMEAregd[rm];
|
||||
|
||||
|
||||
|
|
|
@ -24,7 +24,9 @@
|
|||
#include "callback.h"
|
||||
#include "debug.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct EXE_Header {
|
||||
Bit16u signature; /* EXE Signature MZ or ZM */
|
||||
Bit16u extrabytes; /* Bytes on the last page */
|
||||
|
@ -41,7 +43,9 @@ struct EXE_Header {
|
|||
Bit16u reloctable;
|
||||
Bit16u overlay;
|
||||
} GCC_ATTRIBUTE(packed);
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
||||
#define MAGIC1 0x5a4d
|
||||
#define MAGIC2 0x4d5a
|
||||
|
|
|
@ -518,7 +518,9 @@ Bit8u FCB_Parsename(Bit16u seg,Bit16u offset,Bit8u parser ,char *string, Bit8u *
|
|||
hasdrive=hasname=hasext=false;
|
||||
Bitu index;bool finished;Bit8u fill;
|
||||
/* First get the old data from the fcb */
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack (1)
|
||||
#endif
|
||||
union {
|
||||
struct {
|
||||
char drive[2];
|
||||
|
@ -527,7 +529,9 @@ Bit8u FCB_Parsename(Bit16u seg,Bit16u offset,Bit8u parser ,char *string, Bit8u *
|
|||
} part GCC_ATTRIBUTE (packed) ;
|
||||
char full[DOS_FCBNAME];
|
||||
} fcb_name;
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack()
|
||||
#endif
|
||||
/* Get the old information from the previous fcb */
|
||||
fcb.GetName(fcb_name.full);fcb_name.part.drive[1]=0;fcb_name.part.name[8]=0;fcb_name.part.ext[3]=0;
|
||||
/* Strip of the leading sepetaror */
|
||||
|
|
|
@ -61,7 +61,9 @@ public:
|
|||
void SetStrategy (Bit16u ofs) { sSave(sDeviceHeader,strategy,ofs); };
|
||||
|
||||
public:
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct sDeviceHeader{
|
||||
RealPt nextDeviceHeader;
|
||||
Bit16u devAttributes;
|
||||
|
@ -72,7 +74,9 @@ public:
|
|||
Bit8u driveLetter;
|
||||
Bit8u numSubUnits;
|
||||
} TDeviceHeader;
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack()
|
||||
#endif
|
||||
};
|
||||
|
||||
class CMscdex
|
||||
|
|
|
@ -20,13 +20,17 @@
|
|||
#include "mem.h"
|
||||
#include "dos_inc.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
struct DOS_TableCase {
|
||||
Bit16u size;
|
||||
Bit8u chars[256];
|
||||
}
|
||||
GCC_ATTRIBUTE (packed);
|
||||
#ifdef _MSC_VER
|
||||
#pragma pack ()
|
||||
#endif
|
||||
|
||||
RealPt DOS_TableUpCase;
|
||||
RealPt DOS_TableLowCase;
|
||||
|
|
|
@ -33,9 +33,11 @@ namespace MAME {
|
|||
/* Defines */
|
||||
# define logerror(x)
|
||||
|
||||
#ifdef _MSC_VER
|
||||
/* Disable recurring warnings */
|
||||
# pragma warning ( disable : 4018 )
|
||||
# pragma warning ( disable : 4244 )
|
||||
#endif
|
||||
|
||||
/* Work around ANSI compliance problem (see driver.h) */
|
||||
struct __MALLOCPTR {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue