git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Add autoconf tests for pthreads

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 3, 2008, 22:07 UTC
Message-ID
<7vd4hcv4z1.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<1225736068-97988-1-git-send-email-david.syzdek@acsalaska.net>
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.

Show 10 quoted lines
> +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.
Previous: david.syzdek@acsalaska.net
Message 2 of 2 in “Add autoconf tests for pthreads”
  1. Add autoconf tests for pthreadsdavid.syzdek@acsalaska.net, Nov 3, 2008
  2. Junio C HamanoNov 3, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.