Re: [PATCH 04/40] Windows: Use the Windows style PATH separator ';'.
- From
Paolo Bonzini <bonzini@gnu.org>
- Date
- Feb 29, 2008, 07:57 UTC
- Message-ID
- <47C7BAEE.2020408@gnu.org>
- In-Reply-To
- <200802282143.19322.johannes.sixt@telecom.at>
Johannes Sixt wrote:
Show 13 quoted lines
> On Thursday 28 February 2008 10:25, Paolo Bonzini wrote: >>> +#ifdef __MINGW32__ >>> + strbuf_addch(out, ';'); >>> +#else >>> strbuf_addch(out, ':'); >>> +#endif >> Why not adding a PATH_SEPARATOR #define? > > Because IMO it is obfuscating: > > 1. When you read through the code and see PATH_SEPARATOR, you still have > to go look how it's defined. Why? Because you always will ask: Is this > about ':' vs. ';' or '/' vs. '\\'?
One is a DIR_SEPARATOR, the other is a PATH_SEPARATOR. It's a matter of conventions.
Paolo