Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!dogie.macc.wisc.edu!indri!aplcen!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.std.c Subject: Re: Multiple typedefs Keywords: typedefs, includes Message-ID: <10167@smoke.BRL.MIL> Date: 29 Apr 89 03:02:00 GMT References: <2322@lethe.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 13 In article <2322@lethe.UUCP> drew@lethe.UUCP (Drew Sullivan) writes: >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); No, the second typedef is syntactically invalid. The conventional way to guard against this is: #ifndef _FOO_T_DEFINED #define _FOO_T_DEFINED typedef unsigned int foo_t; #endif Sorry about that..