Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 gcl27 (2.7.1-8) unstable; urgency=medium
 .
   * Bug fix: "FTBFS: /tmp/gazonk_6005_0.c:21:63: error: implicit
     declaration of function &#39;__builtin_c23_va_start&#39;; did you mean
     &#39;__builtin_ms_va_start&#39;? [-Wimplicit-function-declaration]",
     thanks to Santiago Vila (Closes: #1114119).
   * Version_2_7_2pre7
Author: Camm Maguire <camm@debian.org>
Bug-Debian: https://bugs.debian.org/1114119

---
The information above should follow the Patch Tagging Guidelines, please
checkout https://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: (upstream|backport|vendor|other), (<patch-url>|commit:<commit-id>)
Bug: <upstream-bugtracker-url>
Bug-Debian: https://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: (no|not-needed|<patch-forwarded-url>)
Applied-Upstream: <version>, (<commit-url>|commit:<commid-id>)
Reviewed-By: <name and email of someone who approved/reviewed the patch>
Last-Update: 2025-09-21

--- gcl27-2.7.1.orig/configure
+++ gcl27-2.7.1/configure
@@ -7000,6 +7000,61 @@ fi
 
 
 
+add_arg_to_cppflags() {
+
+    { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CPPFLAG $1" >&5
+printf %s "checking for CPPFLAG $1... " >&6; }
+    CPPFLAGS_ORI=$CPPFLAGS
+    CPPFLAGS="$CPPFLAGS -Werror $1 `echo $1|sed 's,-Wno-,-W,1'`"
+    if test "$cross_compiling" = yes
+then :
+  { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; }
+else case e in #(
+  e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main (void)
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"
+then :
+  CPPFLAGS="$CPPFLAGS_ORI $1";{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+printf "%s\n" "yes" >&6; };return 0
+else case e in #(
+  e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5
+printf "%s\n" "no" >&6; } ;;
+esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext ;;
+esac
+fi
+
+    CPPFLAGS=$CPPFLAGS_ORI
+    return 1
+
+}
+
+assert_arg_to_cppflags() {
+    if ! add_arg_to_cppflags $1 ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: cannot add $1 to CPPFLAGS" >&5
+printf "%s\n" "cannot add $1 to CPPFLAGS" >&6; }; exit 1 ; fi
+    return 0
+}
+
+add_args_to_cppflags() {
+
+    while test "$#" -ge 1 ; do
+  	add_arg_to_cppflags $1
+	shift
+    done
+}
+
 add_arg_to_cflags() {
 
     { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLAG $1" >&5
@@ -7127,6 +7182,8 @@ printf "%s\n" "removing $1 from LDFLAGS"
 
 }
 
+add_args_to_cppflags -std=gnu17
+
 add_args_to_cflags  -fsigned-char -pipe -fcommon \
                     -fno-builtin-malloc -fno-builtin-free \
                     -fno-PIE -fno-pie -fno-PIC -fno-pic \
--- gcl27-2.7.1.orig/configure.ac
+++ gcl27-2.7.1/configure.ac
@@ -170,6 +170,34 @@ fi
 AC_SUBST(GCL_CC)
 AC_SUBST(CPP)
 
+add_arg_to_cppflags() {
+
+    AC_MSG_CHECKING([for CPPFLAG $1])
+    CPPFLAGS_ORI=$CPPFLAGS
+    CPPFLAGS="$CPPFLAGS -Werror $1 `echo $1|sed 's,-Wno-,-W,1'`"
+    AC_RUN_IFELSE(
+	[AC_LANG_PROGRAM([[]],[[]])],
+	[CPPFLAGS="$CPPFLAGS_ORI $1";AC_MSG_RESULT([yes]);return 0],
+	[AC_MSG_RESULT([no])],
+	[AC_MSG_RESULT([no])])
+    CPPFLAGS=$CPPFLAGS_ORI
+    return 1
+
+}
+
+assert_arg_to_cppflags() {
+    if ! add_arg_to_cppflags $1 ; then AC_MSG_RESULT([cannot add $1 to CPPFLAGS]); exit 1 ; fi
+    return 0
+}
+
+add_args_to_cppflags() {
+
+    while test "$#" -ge 1 ; do
+  	add_arg_to_cppflags $1
+	shift
+    done
+}
+
 add_arg_to_cflags() {
 
     AC_MSG_CHECKING([for CFLAG $1])
@@ -242,6 +270,8 @@ remove_arg_from_ldflags() {
 
 }
 
+add_args_to_cppflags -std=gnu17
+
 add_args_to_cflags  -fsigned-char -pipe -fcommon \
                     -fno-builtin-malloc -fno-builtin-free \
                     -fno-PIE -fno-pie -fno-PIC -fno-pic \
--- gcl27-2.7.1.orig/git.tag
+++ gcl27-2.7.1/git.tag
@@ -1,2 +1,2 @@
-"Version_2_7_2pre6"
+"Version_2_7_2pre7"
 
