Skip to content

Commit 26a8b23

Browse files
ramsay-jonesgitster
authored andcommitted
config.mak.uname: add a note about NO_STRLCPY for Linux
Commit 817151e ("Rename safe_strncpy() to strlcpy().", 2006-06-24) added the NO_STRLCPY make variable to allow the conditional use of the gitstrlcpy() compat function on those platforms which didn't provide the 'standard' strlcpy() function. Recently, in the summer of 2023, the strlcpy() and strlcat() functions were added to the glibc library (v2.38), so some of the more up-to-date Linux distributions no longer need to set NO_STRLCPY. For example, both Ubuntu 24.04 LTS and RHEL 10 beta have glibc v2.39. However, several distributions, which are still within their support window, have an earlier version and must still use the 'compat' version of strlcpy(). If the meson or autoconf build systems are used on newer platforms, then they will be configured to to use strlcpy() from glibc, whereas the make build will always choose the 'compat' function instead. Add a note to the config.mak.uname file, in the Linux section, to prompt make users to override NO_STRLCPY in the config.mak file, if appropriate. Signed-off-by: Ramsay Jones <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ead39b2 commit 26a8b23

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

config.mak.uname

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ ifeq ($(uname_S),OSF1)
4848
endif
4949
ifeq ($(uname_S),Linux)
5050
HAVE_ALLOCA_H = YesPlease
51+
# override in config.mak if you have glibc >= 2.38
5152
NO_STRLCPY = YesPlease
5253
HAVE_PATHS_H = YesPlease
5354
LIBC_CONTAINS_LIBINTL = YesPlease

0 commit comments

Comments
 (0)