Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site dataio.UUCP Path: utzoo!linus!philabs!cmcl2!seismo!lll-crg!dual!qantel!ihnp4!houxm!mtuxo!mtunh!mtung!mtunf!ariel!vax135!cornell!uw-beaver!uw-june!entropy!dataio!bright From: bright@dataio.UUCP (Walter Bright) Newsgroups: net.lang.c Subject: Re: casts to (void) [considered harmful] Message-ID: <753@dataio.UUCP> Date: Thu, 8-Aug-85 07:40:11 EDT Article-I.D.: dataio.753 Posted: Thu Aug 8 07:40:11 1985 Date-Received: Tue, 13-Aug-85 01:20:03 EDT Reply-To: bright@dataio.UUCP (Walter Bright Organization: Data I/O Corp., Redmond WA Lines: 26 In article <4894@mit-eddie.UUCP> simsong@mit-eddie.UUCP (Simson L. Garfinkel) writes: >Normally, when I am working on a project that must be transportable, I >use a file on my system called "COMPILER_DEPENDENCIES.h" On a VAX, this >file looks like this: >#typedef int32 unsigned int >#typedef int16 unsigned short int > >On my IBM/PC (lattice C, UGH!), the file is "COMP_DPD.h" and it looks >like this: >#typedef int32 unsigned long int ^^^^^^^^^^^^^ Lattice doesn't support unsigned long! >#typedef int16 unsigned int The above syntax won't work on any compiler I've ever heard of. For Lattice C, try this: #define int32 long #define uns32#define int16 int #define uns16 unsigned #define int8 short #define uns8 char If you try to port code to Lattice C that uses an uns32, you will get a syntax error at the location in the code that needs to be rewritten so it doesn't require an unsigned long.