#3 Port configure script to C99 preserving broken behavior for equivilence.
Merged 2 years ago by fweimer. Opened 2 years ago by pjfordham.
rpms/ pjfordham/autogen rawhide  into  rawhide

@@ -0,0 +1,44 @@ 

+ diff --git a/config/ag_macros.m4 b/config/ag_macros.m4

+ index ccce347..ae36cf7 100644

+ --- a/config/ag_macros.m4

+ +++ b/config/ag_macros.m4

+ @@ -113,7 +113,7 @@ AC_DEFUN([INVOKE_AG_MACROS_LAST],[

+    fi

+  

+    AC_CACHE_CHECK([for static inline], [snv_cv_static_inline], [

+ -  AC_TRY_COMPILE([static inline foo(bar) int bar; { return bar; }],

+ +  AC_TRY_COMPILE([static inline int foo(bar) int bar; { return bar; }],

+      [return foo(0);],

+      [snv_cv_static_inline='static inline'],

+      [snv_cv_static_inline='static'])

+ @@ -428,7 +428,7 @@ int main (int argc, char ** argv) {

+     char zRej@<:@@:>@ = reject;

+     char zAcc@<:@@:>@ = "a-ok-eject";

+     return strcspn( zAcc, zRej ) - 5;

+ -}] )]

+ +}] )],

+      [ag_cv_run_strcspn=yes],[ag_cv_run_strcspn=no],[ag_cv_run_strcspn=no]

+    ) # end of RUN_IFELSE

+    ]) # end of AC_CACHE_VAL for ag_cv_run_strcspn

+ diff --git a/configure b/configure

+ index 518ac9c..5eacd76 100755

+ --- a/configure

+ +++ b/configure

+ @@ -17338,7 +17338,7 @@ int main (int argc, char ** argv) {

+     char zAcc[] = "a-ok-eject";

+     return strcspn( zAcc, zRej ) - 5;

+  }

+ -    ag_cv_run_strcspn=yes

+ +#error

+  _ACEOF

+  if ac_fn_c_try_run "$LINENO"; then :

+    ag_cv_run_strcspn=no

+ @@ -18406,7 +18405,7 @@ else

+  

+    cat confdefs.h - <<_ACEOF >conftest.$ac_ext

+  /* end confdefs.h.  */

+ -static inline foo(bar) int bar; { return bar; }

+ +static inline int foo(bar) int bar; { return bar; }

+  int

+  main ()

+  {

file modified
+6 -1
@@ -1,7 +1,7 @@ 

  Summary:	Automated text file generator

  Name:		autogen

  Version:	5.18.16

- Release:	11%{?dist}

+ Release:	12%{?dist}

  # Some files are licensed under GPLv2+.

  # We redistribute them under GPLv3+.

  License:	GPLv3+
@@ -12,6 +12,7 @@ 

  Patch0:		autogen-multilib.patch

  # Fix gcc error on overlapping strings

  Patch1:		autogen-overlap.patch

+ Patch2:		autogen-configure-c99.patch

  

  Requires:	%{name}-libopts%{?_isa} = %{version}-%{release}

  
@@ -68,6 +69,7 @@ 

  %setup -q

  %patch0 -p1 -b .multilib

  %patch1 -p1 -b .overlap

+ %patch2 -p1

  

  # Disable failing test

  sed -i 's|errors.test||' autoopts/test/Makefile.in
@@ -144,6 +146,9 @@ 

  %{_includedir}/autoopts/usage-txt.h

  

  %changelog

+ * Wed Dec 07 2022 Peter Fordham <peter.fordham@gmail.com> - 5.18.16-12

+ - Patch in fix for https://sourceforge.net/p/autogen/bugs/213/, C99 compliance.

+ 

  * Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.18.16-11

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

  

Real fix for issue is included for informational purposes even though autoconf isn't run as part of the build. Upstream bug opened.

https://fedoraproject.org/wiki/Toolchain/PortingToModernC
https://sourceforge.net/p/autogen/bugs/213/

Pull-Request has been merged by fweimer

2 years ago
Metadata