Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: david.syzdek@acsalaska.net
Cc: git@vger.kernel.org, jnareb@gmail.com
Subject: Re: [PATCH] Add autoconf tests for pthreads
Date: Mon, 03 Nov 2008 14:07:14 -0800	[thread overview]
Message-ID: <7vd4hcv4z1.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1225736068-97988-1-git-send-email-david.syzdek@acsalaska.net> (david syzdek's message of "Mon, 3 Nov 2008 09:14:28 -0900")

david.syzdek@acsalaska.net writes:

> +# Define PTHREAD_LIBS to the linker flag used for Pthread support and define
> +# THREADED_DELTA_SEARCH if Pthreads are available.

This may affect platforms that do have pthread library but choose not to
use threaded delta search for whatever reason by suddenly turning it on.

Which arguably may be a good thing to do, but it is a change unrelated to
porting to FreeBSD.

> +AC_LANG_CONFTEST([AC_LANG_PROGRAM(
> +  [[#include <pthread.h>]],
> +  [[pthread_mutex_t test_mutex;]]
> +)])
> +${CC} -pthread conftest.c -o conftest.o > /dev/null 2>&1
> +if test $? -eq 0;then
> + PTHREAD_LIBS="-pthread"
> + THREADED_DELTA_SEARCH=YesPlease
> +else
> + ${CC} -lpthread conftest.c -o conftest.o > /dev/null 2>&1

Maybe I am old fashioned, but having "-library" very near the beginning of
the command line and naming the final link product (i.e. not with -c) *.o
makes me go "Huh?"  If it were written like this,

	$CC -o conftest$ac_exeext conftest.c -lpthread

it might have been easier to swallow.  I dunno.

      reply	other threads:[~2008-11-03 22:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-03 18:14 [PATCH] Add autoconf tests for pthreads david.syzdek
2008-11-03 22:07 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vd4hcv4z1.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=david.syzdek@acsalaska.net \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox