From: Jean-Christophe PLAGNIOL-VILLARD Date: Sun, 17 Aug 2008 00:38:46 +0200 Subject: [U-Boot] [PATCH 1/1] add u-boot/types to simplify HOST support In-Reply-To: <20080816220406.6DA6F247A4@gemini.denx.de> References: <1218905776-3096-1-git-send-email-plagnioj@jcrosoft.com> <20080816220406.6DA6F247A4@gemini.denx.de> Message-ID: <20080816223846.GA13375@game.jcrosoft.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de > > + > > + > > +#endif /* __U_BOOT_TYPES_H__ */ > > My initial reaction was "what a good idea", bt after looking at the > resulting code I find that it bocmes even less readable. With this > patch applied, I lost the last bit of track I had which define was > coming where from. > > For example, include/environment.h used to have this code: > > -#ifdef USE_HOSTCC > -# include > -#else > -# include > -#endif > > So it would include for for native builds. > > With your change, we have added complexity of selecting from > or or or nothing. we can modify it as #ifdef USE_HOSTCC #include #else #if defined(__BEOS__) || \ defined(__NetBSD__) || \ defined(__FreeBSD__) || \ defined(__sun__) || \ defined(__APPLE__) #include /* sysv */ typedef unsigned char unchar; typedef unsigned short ushort; typedef unsigned int uint; typedef unsigned long ulong; #elif defined(__WIN32__) #include typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #else /* __linux__ & default */ #include #endif #endif /* USE_HOSTCC */ > > Are you absolutely sure that this is 100% equivalent and working? > I've test it on MacOs and Linux. Best Regards, J.