Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!usc!brutus.cs.uiuc.edu!apple!hercules!sparkyfs!zodiac!anders@penguin From: anders@penguin (Anders Wallgren) Newsgroups: comp.sys.mac.programmer Subject: Re: MPW compiler bugs (was: interface war) Message-ID: <10963@zodiac.ADS.COM> Date: 20 Feb 90 19:16:36 GMT References: <1990Feb14.004350.14475@oracle.com> <10898@zodiac.ADS.COM> <34412@cci632.UUCP> <10936@zodiac.ADS.COM> <6792@internal.Apple.COM> Sender: news@zodiac.ADS.COM Reply-To: anders@penguin (Anders Wallgren) Organization: Verity Lines: 29 In-reply-to: rmh@apple.com (Rick Holzgrafe) In article <6792@internal.Apple.COM>, rmh@apple (Rick Holzgrafe) writes: >I *know* it's ugly and offensive, but could you do something like: > enum type { type1, type2, type3, typeDummy=0x7fffffff }; >to force MPW C to use 32-bit values for enums? If so, > #define FORCE_LONG_ENUMS ,typeDummy=0x7fffffff > enum type { type1, type2, type3 FORCE_LONG_ENUMS}; >could be used for the duration, then easily compiled out when the >compilers get their acts together. Yeah, we did something like: typedef enum { foo, bar, } ENUM_DEF(FOO_BAR); using a macro which was conditionally defined based on what platform we compiled the code on: #ifdef MACOS #define ENUM_DEF(name) _ ## name; typedef short name #else #define ENUM_DEF(name) name #endif This way we didn't have to modify the member of the enums, and could rely on enums being a certain size. Anders