Merge pull request #78 from alexey-lysiuk/fix_osx_build

Fix OS X build
This commit is contained in:
Blzut3 2014-06-28 04:49:37 -04:00
commit c4bc5f7b97
3 changed files with 13 additions and 13 deletions

View file

@ -29,51 +29,51 @@
// WAD files are stored little endian.
#ifdef __APPLE__
#include <CoreFoundation/CoreFoundation.h>
#include <libkern/OSByteOrder.h>
inline short LittleShort(short x)
{
return (short)CFSwapInt16LittleToHost((uint16_t)x);
return (short)OSSwapLittleToHostInt16((uint16_t)x);
}
inline unsigned short LittleShort(unsigned short x)
{
return CFSwapInt16LittleToHost(x);
return OSSwapLittleToHostInt16(x);
}
inline short LittleShort(int x)
{
return CFSwapInt16LittleToHost((uint16_t)x);
return OSSwapLittleToHostInt16((uint16_t)x);
}
inline int LittleLong(int x)
{
return CFSwapInt32LittleToHost((uint32_t)x);
return OSSwapLittleToHostInt32((uint32_t)x);
}
inline unsigned int LittleLong(unsigned int x)
{
return CFSwapInt32LittleToHost(x);
return OSSwapLittleToHostInt32(x);
}
inline short BigShort(short x)
{
return (short)CFSwapInt16BigToHost((uint16_t)x);
return (short)OSSwapBigToHostInt16((uint16_t)x);
}
inline unsigned short BigShort(unsigned short x)
{
return CFSwapInt16BigToHost(x);
return OSSwapBigToHostInt16(x);
}
inline int BigLong(int x)
{
return CFSwapInt32BigToHost((uint32_t)x);
return OSSwapBigToHostInt32((uint32_t)x);
}
inline unsigned int BigLong(unsigned int x)
{
return CFSwapInt32BigToHost(x);
return OSSwapBigToHostInt32(x);
}
#else

View file

@ -303,8 +303,8 @@ int main (int argc, char **argv)
vid_defwidth = videoInfo->current_w;
vid_defheight = videoInfo->current_h;
vid_defbits = videoInfo->vfmt->BitsPerPixel;
vid_vsync = True;
fullscreen = True;
vid_vsync = true;
fullscreen = true;
}
#endif // __APPLE__

View file

@ -167,7 +167,7 @@ INTBOOL CheckActorFlag(const AActor *owner, FFlagDef *fd)
{
return fd->flagbit & *(DWORD *)(((char*)owner) + fd->structoffset);
}
#ifdef __BID_ENDIAN__
#ifdef __BIG_ENDIAN__
else if (fd->fieldsize == 2)
{
return fd->flagbit & *(WORD *)(((char*)owner) + fd->structoffset);