Don't use multi-character constants for portability reasons
Instead of using numeric constants for MinGW and character constants otherwise, just always use the former as this code can also be compiled with non-MinGW gcc when building under Cygwin and this results in the same warnings as for MinGW. Additionally, it's not guaranteed that other MSW compilers actually support multi-character constants at all, even if they don't warn about them, so just avoid them completely.
This commit is contained in:
@@ -101,14 +101,11 @@ typedef struct ComponentInstanceRecord * ComponentInstance;
|
||||
#define MovieController ComponentInstance
|
||||
|
||||
#ifndef URLDataHandlerSubType
|
||||
#if defined(__MINGW32__)
|
||||
// use magic numbers for compilers which complain about multicharacter integers
|
||||
const OSType URLDataHandlerSubType = 1970433056;
|
||||
const OSType VisualMediaCharacteristic = 1702454643;
|
||||
#else
|
||||
const OSType URLDataHandlerSubType = 'url ';
|
||||
const OSType VisualMediaCharacteristic = 'eyes';
|
||||
#endif
|
||||
// Under Mac this would be defined as 'url ' and 'eyes' multi-character
|
||||
// constants respectively (translate each byte to ASCII to see it), but this is
|
||||
// not accepted by non-Mac compilers, so use the numeric constants instead.
|
||||
const OSType URLDataHandlerSubType = 0x75726c20;
|
||||
const OSType VisualMediaCharacteristic = 0x65796573;
|
||||
#endif
|
||||
|
||||
struct FSSpec
|
||||
|
Reference in New Issue
Block a user