Port configure script to C99
Related to: <https://fedoraproject.org/wiki/Changes/PortingToModernC> <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
parent
702ae2fa34
commit
d92f136c03
56
gimp-configure-c99.patch
Normal file
56
gimp-configure-c99.patch
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
Do not call the undeclared exit function. Implicit function
|
||||||
|
declarations are likely not going to be supported by future compilers
|
||||||
|
by default, changing the outcome of this configure probe.
|
||||||
|
|
||||||
|
Submitted upstream: <https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/810>
|
||||||
|
|
||||||
|
diff --git a/configure b/configure
|
||||||
|
index 6e62da8e3c164f82..f1c447baf7ff68f7 100755
|
||||||
|
--- a/configure
|
||||||
|
+++ b/configure
|
||||||
|
@@ -28898,17 +28898,17 @@ else $as_nop
|
||||||
|
char *shmaddr;
|
||||||
|
id = shmget (IPC_PRIVATE, 4, IPC_CREAT | 0600);
|
||||||
|
if (id == -1)
|
||||||
|
- exit (2);
|
||||||
|
+ return 2;
|
||||||
|
shmaddr = shmat (id, 0, 0);
|
||||||
|
shmctl (id, IPC_RMID, 0);
|
||||||
|
if ((char*) shmat (id, 0, 0) == (char*) -1)
|
||||||
|
{
|
||||||
|
shmdt (shmaddr);
|
||||||
|
- exit (1);
|
||||||
|
+ return 1;
|
||||||
|
}
|
||||||
|
shmdt (shmaddr);
|
||||||
|
shmdt (shmaddr);
|
||||||
|
- exit (0);
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
_ACEOF
|
||||||
|
diff --git a/configure.ac b/configure.ac
|
||||||
|
index d73f56228712f59d..32d2a072863ae64f 100644
|
||||||
|
--- a/configure.ac
|
||||||
|
+++ b/configure.ac
|
||||||
|
@@ -1284,17 +1284,17 @@ elif test "x$shmtype" = "xsysv"; then
|
||||||
|
char *shmaddr;
|
||||||
|
id = shmget (IPC_PRIVATE, 4, IPC_CREAT | 0600);
|
||||||
|
if (id == -1)
|
||||||
|
- exit (2);
|
||||||
|
+ return 2;
|
||||||
|
shmaddr = shmat (id, 0, 0);
|
||||||
|
shmctl (id, IPC_RMID, 0);
|
||||||
|
if ((char*) shmat (id, 0, 0) == (char*) -1)
|
||||||
|
{
|
||||||
|
shmdt (shmaddr);
|
||||||
|
- exit (1);
|
||||||
|
+ return 1;
|
||||||
|
}
|
||||||
|
shmdt (shmaddr);
|
||||||
|
shmdt (shmaddr);
|
||||||
|
- exit (0);
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
]])],
|
||||||
|
[AC_DEFINE([IPC_RMID_DEFERRED_RELEASE],[1],
|
@ -191,6 +191,8 @@ Patch3: gimp-2.10.18-no-phone-home-default.patch
|
|||||||
# use external help browser directly if help browser plug-in is not built
|
# use external help browser directly if help browser plug-in is not built
|
||||||
Patch100: gimp-2.10.24-external-help-browser.patch
|
Patch100: gimp-2.10.24-external-help-browser.patch
|
||||||
|
|
||||||
|
Patch101: gimp-configure-c99.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
GIMP (GNU Image Manipulation Program) is a powerful image composition and
|
GIMP (GNU Image Manipulation Program) is a powerful image composition and
|
||||||
editing program, which can be extremely useful for creating logos and other
|
editing program, which can be extremely useful for creating logos and other
|
||||||
@ -277,6 +279,11 @@ EOF
|
|||||||
%patch100 -p1 -b .external-help-browser
|
%patch100 -p1 -b .external-help-browser
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%patch101 -p1
|
||||||
|
|
||||||
|
# Avoid re-running autotools.
|
||||||
|
touch -r aclocal.m4 configure*
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# allow python2 package for RHEL-8
|
# allow python2 package for RHEL-8
|
||||||
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
|
export RHEL_ALLOW_PYTHON2_FOR_BUILD=1
|
||||||
|
Loading…
Reference in New Issue
Block a user