Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!utcsri!flaps From: flaps@utcsri.UUCP Newsgroups: comp.lang.c Subject: Re: Standard int sizes Message-ID: <4632@utcsri.UUCP> Date: Mon, 20-Apr-87 17:11:47 EST Article-I.D.: utcsri.4632 Posted: Mon Apr 20 17:11:47 1987 Date-Received: Tue, 21-Apr-87 00:05:57 EST References: <6759@brl-adm.ARPA> <230@ems.UUCP> <170@vianet.UUCP> <764@hoqax.UUCP> Reply-To: flaps@utcsri.UUCP (Alan J Rosenthal) Organization: University of Toronto Lines: 35 Summary: In article <764@hoqax.UUCP> twb@hoqax.UUCP (BEATTIE) writes: :>> If "machine has compiler that uses 16 bits for 'short'" :>> #define int16 short :>> :>> If "machine has compiler that uses 16 bits for 'int'" :>> #define int16 int :> :>It is not a good idea to use #define where you mean typedef. :>Think about the difference between: :> :>typedef int *INT_PTR; :>INT_PTR a, b; :> :>and :> :>#define INT_PTR int * :>INT_PTR a, b; IRRELEVANT!!! So what that "#define INTPTR int *" doesn't work? The original author never claimed it did! "#define int16 int" works fine! In fact, 4.2bsd stdio.h contains "#define FILE struct _iobuf" (and so do many other stdio.h's, I believe). -- Alan J Rosenthal flaps@csri.toronto.edu, {seismo!utai or utzoo}!utcsri!flaps, flaps@toronto on csnet, flaps at utorgpu on bitnet. "Probably the best operating system in the world is the [operating system] made for the PDP-11 by Bell Laboratories." - Ted Nelson, October 1977