From nobody Sat Sep 10 06:33:00 2022 X-Original-To: dev-commits-ports-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MPjj91N5yz4cT3l; Sat, 10 Sep 2022 06:33:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MPjj90qvSz49jg; Sat, 10 Sep 2022 06:33:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662791581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OwJ9fqsq9kcEU42nK89lEtdId79Y9ige7LSJORSW49o=; b=M5/f62uMhP5o8+vM0ngmtMLpg/sBctK8jDjlu3iDLDj63FqNKb3nMbkLEPClHWoLcqcAiD 4tFs1BRA3m7LAw99Qebpp4RX0yozPoWXK/rSJrCzTEaqnssXRBpXt2R1fYJefH+B0TpxtV ysjya4TgW2hzNuaOo3GUAF8H3I+51YNUbIrwepGZf+nVD9TiwK0GaYupCjRiNUnq3BeV36 9NlDzyvWJXtz3HXxYrHL5WlvqPGGJyN8cglGq26bJW5GDKMsEHzi7UFLe4xIojPbTwVXJM xIz69FYMZjfcQ7VcnwirDjIgjmOIAiDpMXITdWqq9j3rKxDHPV6HAIAKKjx6hA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MPjj86hbKz1SN8; Sat, 10 Sep 2022 06:33:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 28A6X0tw040561; Sat, 10 Sep 2022 06:33:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 28A6X0HU040560; Sat, 10 Sep 2022 06:33:00 GMT (envelope-from git) Date: Sat, 10 Sep 2022 06:33:00 GMT Message-Id: <202209100633.28A6X0HU040560@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Xin LI Subject: git: 1785b9ca4f4e - 2022Q3 - lang/ruby{27,30,31,32}: Improve qsort_r() detection. List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-branches@freebsd.org X-BeenThere: dev-commits-ports-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: ports X-Git-Refname: refs/heads/2022Q3 X-Git-Reftype: branch X-Git-Commit: 1785b9ca4f4e2092bd8b485f94196e1d66eadcf8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662791581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OwJ9fqsq9kcEU42nK89lEtdId79Y9ige7LSJORSW49o=; b=FdJJaqb7M8qWKRd/XsWbDTTI1KwAiWzdgzr3lXSh5a4R2WNc9eSIpheP0FTgfl8HUTnjXh 3Xdw4gIZBRFgV7/cAg11Z9nbsZCuBPG4yqKETzIbBWYJEgO/cATjpFpculM4ELlt1wYXgg DaH9JhYkOC0DZTicBaQ9Dko1iyuLqZCuG4U8rgBDmQPex51gIEbYr24rK/rACdxCG5jkyu K6IhhB8yRxgAtgMGNoRzCafaUkvOMv+o8y1eo8BYX8xGWnJrwCTUxgRyIkzLMgFypl0ceL NrB0hBIaUqbJI/hpm7fxtS2/UPv7h8ECObcyPc9jh2qPeuGKxFU2umGua6jwGA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662791581; a=rsa-sha256; cv=none; b=ZDQb3y4FdF507Y3ic6WnNrKIi0fSTQCIif/QL86FyY4k0BjJyNzprNMtALgIEZGhtyTUGP n6EnvM+HhRjG1+k+YkQxshbgh+RNhtbfY4kmbBCa6e+eA8ccFJLG2b6T16fVxqDOMTX04h 855fJPgegHRGBRpuHV7fPm8YKDMPbBffM63kHDqrNxDbnPA5lEdjpX8rrolYW7R5RSruEs GTT5z6+ACEq4ViCur0YZX0qB8FcZQb8aiqIoMjqk7oXi9lO5D9f7OX1WOsNMQcEprtdFd+ zRtbxb6gqJW5H4IH+OI8lV4BQWbc8fMakVwMzQfhGPDNFkYLSBwQ9UNWTmdMbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch 2022Q3 has been updated by delphij: URL: https://cgit.FreeBSD.org/ports/commit/?id=1785b9ca4f4e2092bd8b485f94196e1d66eadcf8 commit 1785b9ca4f4e2092bd8b485f94196e1d66eadcf8 Author: Xin LI AuthorDate: 2022-09-10 06:31:50 +0000 Commit: Xin LI CommitDate: 2022-09-10 06:32:54 +0000 lang/ruby{27,30,31,32}: Improve qsort_r() detection. This change merges the following upstream pull request into the Ruby interpreter: https://github.com/ruby/ruby/pull/6332 Adding this patch is no-op right now because we are not using POSIX (GNU) qsort_r(3) interface yet. It will fix build when the change is applied. Reviewed by: bapt (portmgr@), sunpoet (ruby@) PR: ports/266227 MFH: 2022Q3 Differential Revision: https://reviews.freebsd.org/D36492 (cherry picked from commit b4b8c98857e409dd294fd58680cd05ae71893261) --- lang/ruby27/files/patch-util.c | 29 +++++++++++++++++++++++++++++ lang/ruby30/files/patch-util.c | 29 +++++++++++++++++++++++++++++ lang/ruby31/files/patch-util.c | 29 +++++++++++++++++++++++++++++ lang/ruby32/files/patch-util.c | 29 +++++++++++++++++++++++++++++ 4 files changed, 116 insertions(+) diff --git a/lang/ruby27/files/patch-util.c b/lang/ruby27/files/patch-util.c new file mode 100644 index 000000000000..34686785879f --- /dev/null +++ b/lang/ruby27/files/patch-util.c @@ -0,0 +1,29 @@ +--- util.c.orig 2022-04-12 11:25:48 UTC ++++ util.c +@@ -210,6 +210,7 @@ typedef int (cmpfunc_t)(const void*, const void*, void + + typedef int (cmpfunc_t)(const void*, const void*, void*); + ++#if !defined HAVE_GNU_QSORT_R + #if defined HAVE_QSORT_S && defined RUBY_MSVCRT_VERSION + /* In contrast to its name, Visual Studio qsort_s is incompatible with + * C11 in the order of the comparison function's arguments, and same +@@ -255,7 +256,7 @@ ruby_qsort(void* base, const size_t nel, const size_t + qsort_s(base, nel, size, cmp, d); + } + # define HAVE_GNU_QSORT_R 1 +-#elif !defined HAVE_GNU_QSORT_R ++#else + /* mm.c */ + + #define mmtype long +@@ -521,7 +522,8 @@ ruby_qsort(void* base, const size_t nel, const size_t + else goto nxt; /* need not to sort both sides */ + } + } +-#endif /* HAVE_GNU_QSORT_R */ ++#endif ++#endif /* !HAVE_GNU_QSORT_R */ + + char * + ruby_strdup(const char *str) diff --git a/lang/ruby30/files/patch-util.c b/lang/ruby30/files/patch-util.c new file mode 100644 index 000000000000..f454ef14eb0d --- /dev/null +++ b/lang/ruby30/files/patch-util.c @@ -0,0 +1,29 @@ +--- util.c.orig 2022-04-12 11:48:55 UTC ++++ util.c +@@ -214,6 +214,7 @@ typedef int (cmpfunc_t)(const void*, const void*, void + + typedef int (cmpfunc_t)(const void*, const void*, void*); + ++#if !defined HAVE_GNU_QSORT_R + #if defined HAVE_QSORT_S && defined RUBY_MSVCRT_VERSION + /* In contrast to its name, Visual Studio qsort_s is incompatible with + * C11 in the order of the comparison function's arguments, and same +@@ -259,7 +260,7 @@ ruby_qsort(void* base, const size_t nel, const size_t + qsort_s(base, nel, size, cmp, d); + } + # define HAVE_GNU_QSORT_R 1 +-#elif !defined HAVE_GNU_QSORT_R ++#else + /* mm.c */ + + #define mmtype long +@@ -525,7 +526,8 @@ ruby_qsort(void* base, const size_t nel, const size_t + else goto nxt; /* need not to sort both sides */ + } + } +-#endif /* HAVE_GNU_QSORT_R */ ++#endif ++#endif /* !HAVE_GNU_QSORT_R */ + + char * + ruby_strdup(const char *str) diff --git a/lang/ruby31/files/patch-util.c b/lang/ruby31/files/patch-util.c new file mode 100644 index 000000000000..65701973aaee --- /dev/null +++ b/lang/ruby31/files/patch-util.c @@ -0,0 +1,29 @@ +--- util.c.orig 2022-04-12 11:11:15 UTC ++++ util.c +@@ -218,6 +218,7 @@ typedef int (cmpfunc_t)(const void*, const void*, void + + typedef int (cmpfunc_t)(const void*, const void*, void*); + ++#if !defined HAVE_GNU_QSORT_R + #if defined HAVE_QSORT_S && defined RUBY_MSVCRT_VERSION + /* In contrast to its name, Visual Studio qsort_s is incompatible with + * C11 in the order of the comparison function's arguments, and same +@@ -263,7 +264,7 @@ ruby_qsort(void* base, const size_t nel, const size_t + qsort_s(base, nel, size, cmp, d); + } + # define HAVE_GNU_QSORT_R 1 +-#elif !defined HAVE_GNU_QSORT_R ++#else + /* mm.c */ + + #define mmtype long +@@ -530,7 +531,8 @@ ruby_qsort(void* base, const size_t nel, const size_t + else goto nxt; /* need not to sort both sides */ + } + } +-#endif /* HAVE_GNU_QSORT_R */ ++#endif ++#endif /* !HAVE_GNU_QSORT_R */ + + char * + ruby_strdup(const char *str) diff --git a/lang/ruby32/files/patch-util.c b/lang/ruby32/files/patch-util.c new file mode 100644 index 000000000000..f454ef14eb0d --- /dev/null +++ b/lang/ruby32/files/patch-util.c @@ -0,0 +1,29 @@ +--- util.c.orig 2022-04-12 11:48:55 UTC ++++ util.c +@@ -214,6 +214,7 @@ typedef int (cmpfunc_t)(const void*, const void*, void + + typedef int (cmpfunc_t)(const void*, const void*, void*); + ++#if !defined HAVE_GNU_QSORT_R + #if defined HAVE_QSORT_S && defined RUBY_MSVCRT_VERSION + /* In contrast to its name, Visual Studio qsort_s is incompatible with + * C11 in the order of the comparison function's arguments, and same +@@ -259,7 +260,7 @@ ruby_qsort(void* base, const size_t nel, const size_t + qsort_s(base, nel, size, cmp, d); + } + # define HAVE_GNU_QSORT_R 1 +-#elif !defined HAVE_GNU_QSORT_R ++#else + /* mm.c */ + + #define mmtype long +@@ -525,7 +526,8 @@ ruby_qsort(void* base, const size_t nel, const size_t + else goto nxt; /* need not to sort both sides */ + } + } +-#endif /* HAVE_GNU_QSORT_R */ ++#endif ++#endif /* !HAVE_GNU_QSORT_R */ + + char * + ruby_strdup(const char *str)