Re: [PATCH] MSVC: port pthread code to native Windows threads
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Nov 4, 2009, 14:04 UTC
- Message-ID
- <alpine.DEB.1.00.0911041427140.2788@felix-maschine>
- In-Reply-To
- <1257331059-26344-1-git-send-email-ahaczewski@gmail.com>
Hi,
On Wed, 4 Nov 2009, Andrzej K. Haczewski wrote:
Show 10 quoted lines
> diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c > index 02f9246..c96d293 100644 > --- a/builtin-pack-objects.c > +++ b/builtin-pack-objects.c > @@ -2327,6 +2327,18 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix) > #ifdef THREADED_DELTA_SEARCH > if (!delta_search_threads) /* --threads=0 means autodetect */ > delta_search_threads = online_cpus(); > + > +#ifdef _WIN32
This flies in the face of our endeavors to enhance readability by reducing the number of #ifdef's, and at least guarding the #ifdef'ed parts behind meaningful names rather than platform specifiers.
See for example THREADED_DELTA_SEARCH: it does not read "HAS_PTHREADS" or some such.
Ciao, Dscho