From: Junio C Hamano <gitster@pobox.com>
To: "Andreas Färber" <andreas.faerber@web.de>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH 2/6] Only define NEEDS_SOCKET if libsocket is usable
Date: Sun, 17 Aug 2008 02:16:15 -0700 [thread overview]
Message-ID: <7v63q080io.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 2EA0EACE-D8FE-476A-BAE2-7E12EE961C46@web.de
Andreas Färber <andreas.faerber@web.de> writes:
> diff --git a/configure.ac b/configure.ac
> index 7c2856e..75ec83a 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -223,11 +223,11 @@ AC_LINK_IFELSE(ZLIBTEST_SRC,
> LIBS="$old_LIBS"
> AC_SUBST(NO_DEFLATE_BOUND)
> #
> -# Define NEEDS_SOCKET if linking with libc is not enough (SunOS,
> +# Define NEEDS_SOCKET if linking with libc is required (SunOS,
> # Patrick Mauritz).
> -AC_CHECK_LIB([c], [socket],
> -[NEEDS_SOCKET=],
> -[NEEDS_SOCKET=YesPlease])
> +AC_CHECK_LIB([socket], [socket],
> +[NEEDS_SOCKET=YesPlease],
> +[NEEDS_SOCKET=])
> AC_SUBST(NEEDS_SOCKET)
> test -n "$NEEDS_SOCKET" && LIBS="$LIBS -lsocket"
Doesn't this force linkage with -lsocket even if -lc is enough to use
socket(2) calls?
In other words, "checking libc is not enough" is only half correct. The
right thing to do is "check libc and if it is sufficient be happy, but
otherwise do not automatically assume -lsocket is Ok." Something like:
AC_CHECK_LIB([c], [socket],
[NEEDS_SOCKET=],
[AC_CHECK_LIB([socket], [socket],
[NEEDS_SOCKET=YesPlease],
[NEEDS_SOCKET=])])
Other patches seemed Ok from my cursory look; I do not know the
people whose Ack's were on your patch submission, though...
Thanks.
next prev parent reply other threads:[~2008-08-17 9:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-17 8:57 [PATCH 2/6] Only define NEEDS_SOCKET if libsocket is usable Andreas Färber
2008-08-17 9:16 ` Junio C Hamano [this message]
2008-08-17 11:40 ` Andreas Färber
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=7v63q080io.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=andreas.faerber@web.de \
--cc=git@vger.kernel.org \
/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