Path: utzoo!mnetor!tmsoft!dptcdc!lethe!drew From: drew@lethe.UUCP (Drew Sullivan) Newsgroups: comp.std.c Subject: Multiple typedefs Keywords: typedefs, includes Message-ID: <2322@lethe.UUCP> Date: 25 Apr 89 18:46:50 GMT Organization: Systems Software Lines: 24 Under ANSI-C the I think that the following is legal: +------------------------------------------------------------ | #define foo_t unsigned int /* from include file 1 */ | extern foo_t foo(void); | | #define foo_t unsigned int /* from include file 2 */ | extern foo_t foo(void); +------------------------------------------------------------ But, is the following legal: +------------------------------------------------------------ | typedef unsigned int foo_t; /* from include file 1 */ | extern foo_t foo(void); | | typedef unsigned int foo_t; /* from include file 2 */ | extern foo_t foo(void); +------------------------------------------------------------ If it is not legal how do we guard the multiple typedefs. Do we use #ifdefs, and if so, are there to be any conventions. -- -- Drew Sullivan,