git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brandon Casey <drafnel@gmail.com>
To: Jakub Narebski <jnareb@gmail.com>
Cc: Brandon Casey <casey@nrlssc.navy.mil>,
	git@vger.kernel.org, gitster@pobox.com, peff@peff.net,
	Ralf Wildenhues <Ralf.Wildenhues@gmx.de>,
	David Syzdek <david@syzdek.net>
Subject: Re: [PATCH 2/8] Makefile: add NEEDS_RESOLV to optionally add -lresolv  to compile arguments
Date: Sat, 6 Jun 2009 20:02:19 -0500	[thread overview]
Message-ID: <ee63ef30906061802m4153b9e6i1b289897f2f7f52a@mail.gmail.com> (raw)
In-Reply-To: <m3y6s54y8g.fsf@localhost.localdomain>

On Sat, Jun 6, 2009 at 2:29 AM, Jakub Narebski<jnareb@gmail.com> wrote:
> Brandon Casey <casey@nrlssc.navy.mil> writes:
>
>> From: Brandon Casey <drafnel@gmail.com>
>>
>> This library is required on Solaris when compiling with NO_IPV6 since
>> hstrerror resides in libresolv.  Additionally, Solaris 7 will need it,
>> since inet_ntop and inet_pton reside there too.
>>
>> Signed-off-by: Brandon Casey <drafnel@gmail.com>
>> ---
>>  Makefile |   11 ++++++++++-
>>  1 files changed, 10 insertions(+), 1 deletions(-)
>>
>> diff --git a/Makefile b/Makefile
>> index baa05f5..40642f7 100644
>> --- a/Makefile
>> +++ b/Makefile
>> @@ -95,6 +95,10 @@ all::
>>  # Define NEEDS_SOCKET if linking with libc is not enough (SunOS,
>>  # Patrick Mauritz).
>>  #
>> +# Define NEEDS_RESOLV if linking with -lnsl and/or -lsocket is not enough.
>> +# Notably on Solaris hstrerror resides in libresolv and on Solaris 7
>> +# inet_ntop and inet_pton additionally reside there.
>> +#
>>  # Define NO_MMAP if you want to avoid mmap.
>>  #
>>  # Define NO_PTHREADS if you do not have or do not want to use Pthreads.
>
> Could you please add this build configuration variable to configure.ac
> and config.mak.in, to be able to autodetect this situation?

I'll take a look at it, but autoconf is not a strong suit of mine.
Plus, I doubt I will actually be able to test anything on the
platforms I have access to that need to set NEEDS_RESOLV, since any
autoconf installation is likely to be very old.

> CC-ed Ralf Wildenhues and David Syzdek (who hopefully can produce
> autoconf patch to squash with this one).

Yes please. :)

FYI:
Solaris 7 needs -lresov since inet_ntop and inet_pton reside there.
Additionally, since NO_IPV6 is set, hstrerror is called in connect.c
and hstrerror also resides in libresolv.

On more modern Solaris, inet_ntop and inet_pton reside somewhere else,
and since NO_IPV6 does not need to be set, -lresolv is not needed.

-brandon

  reply	other threads:[~2009-06-07  1:37 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7vk53vlxhz.fsf@alter.siamese.dyndns.org>
2009-06-05 23:36 ` [PATCH 0/8] enhancing builds on Solaris Brandon Casey
2009-06-05 23:36   ` [PATCH 1/8] Makefile: use /usr/ucb/install on SunOS platforms rather than ginstall Brandon Casey
2009-06-05 23:36     ` [PATCH 2/8] Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile arguments Brandon Casey
2009-06-05 23:36       ` [PATCH 3/8] diff-delta.c: "diff.h" is not a required include Brandon Casey
2009-06-05 23:36         ` [PATCH 4/8] On Solaris choose the OLD_ICONV iconv() declaration based on the UNIX spec Brandon Casey
2009-06-05 23:36           ` [PATCH 5/8] git-compat-util.h: tweak the way _XOPEN_SOURCE is set on Solaris Brandon Casey
2009-06-05 23:36             ` [PATCH 6/8] Makefile: define __sun__ on SunOS Brandon Casey
2009-06-05 23:36               ` [PATCH 7/8] Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH Brandon Casey
2009-06-05 23:36                 ` [PATCH 8/8] Makefile: add section for SunOS 5.7 Brandon Casey
2009-06-08 11:43                 ` [PATCH 7/8] Makefile: introduce SANE_TOOL_PATH for prepending required elements to PATH Jeff King
2009-06-08 13:39                   ` Brandon Casey
2009-06-08 13:50                     ` Jeff King
2009-06-08 15:59                       ` Brandon Casey
2009-06-08 16:41                   ` Junio C Hamano
2009-06-08 22:11                     ` Jeff King
2009-06-08 23:39                       ` Brandon Casey
2009-06-09 16:31                         ` Brandon Casey
2009-06-06  0:47         ` [PATCH v2 3/8] diff-delta.c: "delta.h" is not a required include Brandon Casey
2009-06-06  1:21           ` Nicolas Pitre
2009-06-06  2:49             ` Brandon Casey
2009-06-06  3:10               ` Nicolas Pitre
2009-06-06  3:56                 ` Brandon Casey
2009-06-08 23:53                   ` [PATCH] git-compat-util.h: avoid using c99 flex array feature with Sun compiler 5.8 Brandon Casey
2009-06-06  7:29       ` [PATCH 2/8] Makefile: add NEEDS_RESOLV to optionally add -lresolv to compile arguments Jakub Narebski
2009-06-07  1:02         ` Brandon Casey [this message]
2009-06-07  5:40         ` [PATCH] configure: test whether -lresolv is needed Ralf Wildenhues
2009-06-05 23:46   ` [PATCH 0/8] enhancing builds on Solaris Brandon Casey
2009-06-06  0:13   ` Junio C Hamano
2009-06-06  0:41     ` Brandon Casey
2009-06-08 11:50   ` Jeff King

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=ee63ef30906061802m4153b9e6i1b289897f2f7f52a@mail.gmail.com \
    --to=drafnel@gmail.com \
    --cc=Ralf.Wildenhues@gmx.de \
    --cc=casey@nrlssc.navy.mil \
    --cc=david@syzdek.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jnareb@gmail.com \
    --cc=peff@peff.net \
    /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;
as well as URLs for NNTP newsgroup(s).