Commit c1c69e7fdd for perl
commit c1c69e7fdd1ad8af40a29da61e37fb65389f2870
Author: Yves Orton <demerphq@gmail.com>
Date: Mon Nov 16 16:52:34 2026 +0100
Configure: fix mmap and shmat return-type probes with -Werror
Clang warns about these declarations because they lack prototypes. With
-Werror this makes Configure guess the wrong return types. Filter
-Werror for these probes so they can check the return type without
assuming parameter types.
diff --git a/Configure b/Configure
index 79b89c2375..65582afbda 100755
--- a/Configure
+++ b/Configure
@@ -16653,7 +16653,15 @@ case "$i_sysmman$d_mmap" in
#include <sys/mman.h>
void *mmap();
END
- if $cc $ccflags -c mmap.c >/dev/null 2>&1; then
+ # Filter out -Werror so deprecation warnings do not break this probe.
+ probe_ccflags=''
+ for flag in $ccflags; do
+ case "$flag" in
+ -Werror|-Werror=*) ;;
+ *) probe_ccflags="$probe_ccflags $flag" ;;
+ esac
+ done
+ if $cc $probe_ccflags -c mmap.c >/dev/null 2>&1; then
mmaptype='void *'
else
mmaptype='caddr_t'
@@ -19128,7 +19136,15 @@ case "$d_shmat" in
#include <sys/shm.h>
void *shmat();
END
- if $cc $ccflags -c shmat.c >/dev/null 2>&1; then
+ # Filter out -Werror so deprecation warnings do not break this probe.
+ probe_ccflags=''
+ for flag in $ccflags; do
+ case "$flag" in
+ -Werror|-Werror=*) ;;
+ *) probe_ccflags="$probe_ccflags $flag" ;;
+ esac
+ done
+ if $cc $probe_ccflags -c shmat.c >/dev/null 2>&1; then
shmattype='void *'
else
shmattype='char *'
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index a7a3465148..ddff386a8a 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -287,8 +287,10 @@ L</Platform Support> section, instead.
=item *
-GCC configuration probes now work with C<-Werror> when detecting library
-functions, the size of C<long double>, and supported compiler options.
+GCC and Clang configuration probes now work with C<-Werror> when detecting
+library functions, the size of C<long double>, supported compiler options,
+time headers, memory-mapping and shared-memory return types, and the
+in-memory representation of floating-point zero.
=item *