Port configure script to C99 preserving broken behavior for equivilence.
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/
This commit is contained in:
parent
6a63d46f9b
commit
7d157d98e7
44
autogen-configure-c99.patch
Normal file
44
autogen-configure-c99.patch
Normal file
@ -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 ()
|
||||||
|
{
|
@ -1,7 +1,7 @@
|
|||||||
Summary: Automated text file generator
|
Summary: Automated text file generator
|
||||||
Name: autogen
|
Name: autogen
|
||||||
Version: 5.18.16
|
Version: 5.18.16
|
||||||
Release: 11%{?dist}
|
Release: 12%{?dist}
|
||||||
# Some files are licensed under GPLv2+.
|
# Some files are licensed under GPLv2+.
|
||||||
# We redistribute them under GPLv3+.
|
# We redistribute them under GPLv3+.
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
@ -12,6 +12,7 @@ Source0: ftp://ftp.gnu.org/gnu/autogen/rel%{version}/%{name}-%{version}.tar.xz
|
|||||||
Patch0: autogen-multilib.patch
|
Patch0: autogen-multilib.patch
|
||||||
# Fix gcc error on overlapping strings
|
# Fix gcc error on overlapping strings
|
||||||
Patch1: autogen-overlap.patch
|
Patch1: autogen-overlap.patch
|
||||||
|
Patch2: autogen-configure-c99.patch
|
||||||
|
|
||||||
Requires: %{name}-libopts%{?_isa} = %{version}-%{release}
|
Requires: %{name}-libopts%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
@ -68,6 +69,7 @@ This package contains development files for libopts.
|
|||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .multilib
|
%patch0 -p1 -b .multilib
|
||||||
%patch1 -p1 -b .overlap
|
%patch1 -p1 -b .overlap
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
# Disable failing test
|
# Disable failing test
|
||||||
sed -i 's|errors.test||' autoopts/test/Makefile.in
|
sed -i 's|errors.test||' autoopts/test/Makefile.in
|
||||||
@ -144,6 +146,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
|||||||
%{_includedir}/autoopts/usage-txt.h
|
%{_includedir}/autoopts/usage-txt.h
|
||||||
|
|
||||||
%changelog
|
%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
|
* Wed Jul 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.18.16-11
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user