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
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue