{"thread":{"id":"15048","subject":"[PATCH 2/6] Only define NEEDS_SOCKET if libsocket is usable","startedAt":"2008-08-17T08:57:19Z","lastAt":"2008-08-17T11:40:45Z","messageCount":3,"participants":["Andreas Färber","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"87416","messageId":"2EA0EACE-D8FE-476A-BAE2-7E12EE961C46@web.de","threadId":"15048","inReplyTo":null,"subject":"[PATCH 2/6] Only define NEEDS_SOCKET if libsocket is usable","fromName":"Andreas Färber","fromEmail":"andreas.faerber@web.de","sentAt":"2008-08-17T08:57:19Z","receivedAt":"2008-08-17T08:57:19Z","isPatch":true,"sender":{"key":"andreas.faerber@web.de","avatar":"https://gravatar.com/avatar/ac719235a76c4a5e248080fee1f7b6f507bdb1f3d71f7ae48457f3ead91ed1c0?d=mp&s=160"},"body":"Signed-off-by: Andreas Faerber <andreas.faerber@web.de>\n---\nBeOS R5 had socket functions in libnet, Haiku has them in libnetwork,\nOpenSolaris has them in libxnet. Hence checking libc is not enough.\n\n  configure.ac |    8 ++++----\n  1 files changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/configure.ac b/configure.ac\nindex 7c2856e..75ec83a 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -223,11 +223,11 @@ AC_LINK_IFELSE(ZLIBTEST_SRC,\n  LIBS=\"$old_LIBS\"\n  AC_SUBST(NO_DEFLATE_BOUND)\n  #\n-# Define NEEDS_SOCKET if linking with libc is not enough (SunOS,\n+# Define NEEDS_SOCKET if linking with libc is required (SunOS,\n  # Patrick Mauritz).\n-AC_CHECK_LIB([c], [socket],\n-[NEEDS_SOCKET=],\n-[NEEDS_SOCKET=YesPlease])\n+AC_CHECK_LIB([socket], [socket],\n+[NEEDS_SOCKET=YesPlease],\n+[NEEDS_SOCKET=])\n  AC_SUBST(NEEDS_SOCKET)\n  test -n \"$NEEDS_SOCKET\" && LIBS=\"$LIBS -lsocket\"\n\n-- \n1.6.0.rc3.32.g8aaa\n"},{"id":"87423","messageId":"7v63q080io.fsf@gitster.siamese.dyndns.org","threadId":"15048","inReplyTo":"2EA0EACE-D8FE-476A-BAE2-7E12EE961C46@web.de","subject":"Re: [PATCH 2/6] Only define NEEDS_SOCKET if libsocket is usable","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-08-17T09:16:15Z","receivedAt":"2008-08-17T09:16:15Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andreas Färber <andreas.faerber@web.de> writes:\n\n> diff --git a/configure.ac b/configure.ac\n> index 7c2856e..75ec83a 100644\n> --- a/configure.ac\n> +++ b/configure.ac\n> @@ -223,11 +223,11 @@ AC_LINK_IFELSE(ZLIBTEST_SRC,\n>  LIBS=\"$old_LIBS\"\n>  AC_SUBST(NO_DEFLATE_BOUND)\n>  #\n> -# Define NEEDS_SOCKET if linking with libc is not enough (SunOS,\n> +# Define NEEDS_SOCKET if linking with libc is required (SunOS,\n>  # Patrick Mauritz).\n> -AC_CHECK_LIB([c], [socket],\n> -[NEEDS_SOCKET=],\n> -[NEEDS_SOCKET=YesPlease])\n> +AC_CHECK_LIB([socket], [socket],\n> +[NEEDS_SOCKET=YesPlease],\n> +[NEEDS_SOCKET=])\n>  AC_SUBST(NEEDS_SOCKET)\n>  test -n \"$NEEDS_SOCKET\" && LIBS=\"$LIBS -lsocket\"\n\nDoesn't this force linkage with -lsocket even if -lc is enough to use\nsocket(2) calls?\n\nIn other words, \"checking libc is not enough\" is only half correct.  The\nright thing to do is \"check libc and if it is sufficient be happy, but\notherwise do not automatically assume -lsocket is Ok.\"  Something like:\n\nAC_CHECK_LIB([c], [socket],\n[NEEDS_SOCKET=],\n[AC_CHECK_LIB([socket], [socket],\n        \t[NEEDS_SOCKET=YesPlease],\n                [NEEDS_SOCKET=])])\n\nOther patches seemed Ok from my cursory look; I do not know the\npeople whose Ack's were on your patch submission, though...\n\nThanks.\n"},{"id":"87431","messageId":"0380BBDB-ABC4-49D2-AF89-A30256397CFB@web.de","threadId":"15048","inReplyTo":"7v63q080io.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH 2/6] Only define NEEDS_SOCKET if libsocket is usable","fromName":"Andreas Färber","fromEmail":"andreas.faerber@web.de","sentAt":"2008-08-17T11:40:45Z","receivedAt":"2008-08-17T11:40:45Z","isPatch":true,"sender":{"key":"andreas.faerber@web.de","avatar":"https://gravatar.com/avatar/ac719235a76c4a5e248080fee1f7b6f507bdb1f3d71f7ae48457f3ead91ed1c0?d=mp&s=160"},"body":"\nAm 17.08.2008 um 11:16 schrieb Junio C Hamano:\n\n> Andreas Färber <andreas.faerber@web.de> writes:\n>\n>> diff --git a/configure.ac b/configure.ac\n>> index 7c2856e..75ec83a 100644\n>> --- a/configure.ac\n>> +++ b/configure.ac\n>> @@ -223,11 +223,11 @@ AC_LINK_IFELSE(ZLIBTEST_SRC,\n>> LIBS=\"$old_LIBS\"\n>> AC_SUBST(NO_DEFLATE_BOUND)\n>> #\n>> -# Define NEEDS_SOCKET if linking with libc is not enough (SunOS,\n>> +# Define NEEDS_SOCKET if linking with libc is required (SunOS,\n>> # Patrick Mauritz).\n>> -AC_CHECK_LIB([c], [socket],\n>> -[NEEDS_SOCKET=],\n>> -[NEEDS_SOCKET=YesPlease])\n>> +AC_CHECK_LIB([socket], [socket],\n>> +[NEEDS_SOCKET=YesPlease],\n>> +[NEEDS_SOCKET=])\n>> AC_SUBST(NEEDS_SOCKET)\n>> test -n \"$NEEDS_SOCKET\" && LIBS=\"$LIBS -lsocket\"\n>\n> Doesn't this force linkage with -lsocket even if -lc is enough to use\n> socket(2) calls?\n\nIf both libc and libsocket provide it, yes.\n\n> In other words, \"checking libc is not enough\" is only half correct.   \n> The\n> right thing to do is \"check libc and if it is sufficient be happy, but\n> otherwise do not automatically assume -lsocket is Ok.\"  Something  \n> like:\n>\n> AC_CHECK_LIB([c], [socket],\n> [NEEDS_SOCKET=],\n> [AC_CHECK_LIB([socket], [socket],\n>        \t[NEEDS_SOCKET=YesPlease],\n>                [NEEDS_SOCKET=])])\n\nLooks okay to me that way.\n\n> Other patches seemed Ok from my cursory look; I do not know the\n> people whose Ack's were on your patch submission, though...\n\nSorry for not explaining: Ingo is one of the core Haiku developers,  \nand Scott is from HaikuPorts. This is the initial submission to this  \nlist, trying to adhere to the SubmittingPatches document.\n\nAndreas\n"}]}