config.mak.uname: add sysinfo() configuration for cygwin

Although sysinfo() is a 'Linux only' function, cygwin provides an
implementation which appears to be functional. The assumption that
this function is Linux only is reflected in the way the HAVE_SYSINFO
build variable is handled by the Makefile and config.mak.uname.

Rework the setting of HAVE_SYSINFO in the Linux section of the system
specific config file, along with the corresponding setting of the
BASIC_CFLAGS in the Makefile. Add the setting of HAVE_SYSINFO to the
cygwin section of 'config.mak.uname'. While here, add a test for the
sysinfo() function to the autoconf build system.

Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Ramsay Jones
2025-04-17 00:18:32 +01:00
committed by Junio C Hamano
parent c9a51775a3
commit 50dec7c566
3 changed files with 14 additions and 1 deletions

View File

@@ -2168,6 +2168,10 @@ ifdef HAVE_SYNC_FILE_RANGE
BASIC_CFLAGS += -DHAVE_SYNC_FILE_RANGE
endif
ifdef HAVE_SYSINFO
BASIC_CFLAGS += -DHAVE_SYSINFO
endif
ifdef HAVE_BSD_SYSCTL
BASIC_CFLAGS += -DHAVE_BSD_SYSCTL
endif