From: "Carlo Marcelo Arenas Belón" <carenas@gmail•com>
To: git@vger•kernel.org
Cc: brad@comstyle•com, sandals@crustytoothpaste•net,
gitster@pobox•com,
"Carlo Marcelo Arenas Belón" <carenas@gmail•com>
Subject: [PATCH v4 1/2] config.mak.uname: set NO_MEMMEM only for functional version
Date: Wed, 2 Jul 2025 02:37:35 -0700 [thread overview]
Message-ID: <20250702093736.36074-2-carenas@gmail.com> (raw)
In-Reply-To: <20250702093736.36074-1-carenas@gmail.com>
FreeBSD 6 introduced memmem(), but the implementation diverged
from what was standard everywhere else (including our "compat"
fallback).
FreeBSD 10.4 (went EOL in 2018) corrected the functionality bugs
but kept a suboptimal implementation until FreeBSD 11.4 (the last
version of FreeBSD 11, that went EOL in September 2021).
Let's draw the line to require FreeBSD 12 or newer, which allows us
to drop the special casing of FreeBSD 4.x and rely on the platform
implementation of memmem() unconditionally for all versions that are
still being supported.
Suggested-by: Brad Smith <brad@comstyle•com>
Helped-by: brian m. carlson <sandals@crustytoothpaste•net>
Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail•com>
---
config.mak.uname | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/config.mak.uname b/config.mak.uname
index b12d4e168a..2b434df9e5 100644
--- a/config.mak.uname
+++ b/config.mak.uname
@@ -273,16 +273,13 @@ ifeq ($(uname_S),FreeBSD)
ifeq ($(firstword $(subst -, ,$(uname_R))),10.1)
OLD_ICONV = YesPlease
endif
- NO_MEMMEM = YesPlease
+ ifeq ($(shell v=$(uname_R) && test $${v%%.*} -lt 12 && echo 1),1)
+ NO_MEMMEM = UnfortunatelyYes
+ endif
BASIC_CFLAGS += -I/usr/local/include
BASIC_LDFLAGS += -L/usr/local/lib
DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease
USE_ST_TIMESPEC = YesPlease
- ifeq ($(shell expr "$(uname_R)" : '4\.'),2)
- PTHREAD_LIBS = -pthread
- NO_UINTMAX_T = YesPlease
- NO_STRTOUMAX = YesPlease
- endif
PYTHON_PATH = /usr/local/bin/python
PERL_PATH = /usr/local/bin/perl
HAVE_PATHS_H = YesPlease
--
2.50.0.147.gafe0d4ec5b
next prev parent reply other threads:[~2025-07-02 9:38 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-12 13:52 [PATCH v2] config.mak.uname: update settings for FreeBSD Carlo Arenas
2025-06-12 16:48 ` brian m. carlson
2025-06-12 21:31 ` Carlo Marcelo Arenas Belón
2025-06-12 21:51 ` [PATCH v3] " Junio C Hamano
2025-06-12 22:30 ` Carlo Marcelo Arenas Belón
2025-06-12 22:37 ` Junio C Hamano
2025-07-02 9:37 ` [PATCH v4 0/2] " Carlo Marcelo Arenas Belón
2025-07-02 9:37 ` Carlo Marcelo Arenas Belón [this message]
2025-07-02 9:37 ` [PATCH v4 2/2] build: retire NO_UINTMAX_T Carlo Marcelo Arenas Belón
2025-07-02 16:21 ` [PATCH v4 0/2] config.mak.uname: update settings for FreeBSD Junio C Hamano
2025-06-12 16:52 ` [PATCH v2] " Junio C Hamano
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=20250702093736.36074-2-carenas@gmail.com \
--to=carenas@gmail$(echo .)com \
--cc=brad@comstyle$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=gitster@pobox$(echo .)com \
--cc=sandals@crustytoothpaste$(echo .)net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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