Port configure script to C99 (#2161952)
Related to: <https://fedoraproject.org/wiki/Changes/PortingToModernC> <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
parent
0b9dccc109
commit
21cf594807
54
plotutils-configure-c99.patch
Normal file
54
plotutils-configure-c99.patch
Normal file
@ -0,0 +1,54 @@
|
||||
Do not call the undeclared exit function. This avoids build problems
|
||||
with future compilers which do not support implicit function
|
||||
declarations.
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 229ccd453ae4487f..fdf3785ad4c5175f 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -19537,9 +19537,9 @@ int main()
|
||||
|| fflush ((FILE *)0) < 0
|
||||
|| (fpr = fopen ("conftest0", "r")) == (FILE *)0
|
||||
|| fread (test_array, 1, 7, fpr) != 7)
|
||||
- exit (1);
|
||||
+ return 1;
|
||||
else
|
||||
- exit(0); }
|
||||
+ return 0; }
|
||||
_ACEOF
|
||||
rm -f conftest$ac_exeext
|
||||
if { (ac_try="$ac_link"
|
||||
@@ -24022,7 +24022,7 @@ int main()
|
||||
int i;
|
||||
for (i=0; i < B; i++)
|
||||
Array[i] = i - 3;
|
||||
- exit (Array[1] != -2);
|
||||
+ return Array[1] != -2;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest$ac_exeext
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 8fb7b640864eb4a8..d1f6d7e08c6946d4 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -88,9 +88,9 @@ int main()
|
||||
|| fflush ((FILE *)0) < 0
|
||||
|| (fpr = fopen ("conftest0", "r")) == (FILE *)0
|
||||
|| fread (test_array, 1, 7, fpr) != 7)
|
||||
- exit (1);
|
||||
+ return 1;
|
||||
else
|
||||
- exit(0); }]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_NULL_FLUSH)],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)])
|
||||
+ return 0; }]])],[AC_MSG_RESULT(yes); AC_DEFINE(HAVE_NULL_FLUSH)],[AC_MSG_RESULT(no)],[AC_MSG_RESULT(no)])
|
||||
|
||||
# Checks for header files: ANSI C, POSIX, and nonstandard Unix headers.
|
||||
AC_HEADER_STDC
|
||||
@@ -383,7 +383,7 @@ int main()
|
||||
int i;
|
||||
for (i=0; i < B; i++)
|
||||
Array[[i]] = i - 3;
|
||||
- exit (Array[[1]] != -2);
|
||||
+ return Array[[1]] != -2;
|
||||
}]])],
|
||||
[ac_cv_c_gcc_strength_bug="no"],[ac_cv_c_gcc_strength_bug="yes"],[ac_cv_c_gcc_strength_bug="yes"]) )
|
||||
if test "$ac_cv_c_gcc_strength_bug" = "yes"
|
||||
@ -1,6 +1,6 @@
|
||||
Name: plotutils
|
||||
Version: 2.6
|
||||
Release: 29%{?dist}
|
||||
Release: 30%{?dist}
|
||||
Summary: GNU vector and raster graphics utilities and libraries
|
||||
|
||||
# libxmi is GPLv2+
|
||||
@ -11,6 +11,7 @@ Source0: ftp://ftp.gnu.org/gnu/plotutils/plotutils-%{version}.tar.gz
|
||||
Patch0: plotutils-2.6-png15.patch
|
||||
Patch1: plotutils-aarch64.patch
|
||||
Patch2: plotutils-werror-format-security.patch
|
||||
Patch3: plotutils-configure-c99.patch
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: make
|
||||
@ -47,6 +48,9 @@ applications
|
||||
%patch0 -p1 -b .png15
|
||||
%patch1 -p1 -b .aarch64
|
||||
%patch2 -p1 -b .format-security
|
||||
%patch3 -p1
|
||||
# Avoid attempting autotools rebuild.
|
||||
touch -r aclocal.m4 configure*
|
||||
|
||||
%build
|
||||
%configure --disable-static --enable-libplotter --enable-libxmi --enable-ps-fonts-in-pcl
|
||||
@ -93,6 +97,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Jan 18 2023 Florian Weimer <fweimer@redhat.com> - 2.6-30
|
||||
- Port configure script to C99
|
||||
|
||||
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.6-29
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user