Florian Weimer 2 years ago
parent 77990cb0f1
commit 249cdb9702

@ -0,0 +1,51 @@
Port the ccc build configuration detection tool to C99 by
specifying the return type of main as int.
Submitted upstream:
<https://groups.google.com/g/lp_solve/c/WjVf0dxrwfQ/m/rKMwf57tAwAJ>
diff --git a/lp_solve/ccc b/lp_solve/ccc
index 9b79cea7ee71536c..b1f761aab33345d4 100644
--- a/lp_solve/ccc
+++ b/lp_solve/ccc
@@ -6,7 +6,7 @@ c=$CC
>/tmp/platform.c
echo '#include <stdlib.h>'>>/tmp/platform.c
echo '#include <stdio.h>'>>/tmp/platform.c
-echo 'main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c
+echo 'int main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c
$c /tmp/platform.c -o /tmp/platform
PLATFORM=`/tmp/platform`
rm /tmp/platform /tmp/platform.c >/dev/null 2>&1
@@ -20,7 +20,7 @@ math=-lm
echo '#include <stdio.h>'>>/tmp/isnan.c
echo '#include <stdlib.h>'>>/tmp/isnan.c
echo '#include <math.h>'>>/tmp/isnan.c
-echo 'main(){isnan(0.0);}'>>/tmp/isnan.c
+echo 'int main(){isnan(0.0);}'>>/tmp/isnan.c
$c /tmp/isnan.c -o /tmp/isnan $math >/dev/null 2>&1
if [ $? = 0 ]
then NOISNAN=
diff --git a/lpsolve55/ccc b/lpsolve55/ccc
index 0470611bc45a851c..ca350f257add7730 100644
--- a/lpsolve55/ccc
+++ b/lpsolve55/ccc
@@ -6,7 +6,7 @@ c=$CC
>/tmp/platform.c
echo '#include <stdlib.h>'>>/tmp/platform.c
echo '#include <stdio.h>'>>/tmp/platform.c
-echo 'main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c
+echo 'int main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c
$c /tmp/platform.c -o /tmp/platform
PLATFORM=`/tmp/platform`
rm /tmp/platform /tmp/platform.c >/dev/null 2>&1
@@ -18,7 +18,7 @@ mkdir bin bin/$PLATFORM >/dev/null 2>&1
echo '#include <stdio.h>'>>/tmp/isnan.c
echo '#include <stdlib.h>'>>/tmp/isnan.c
echo '#include <math.h>'>>/tmp/isnan.c
-echo 'main(){isnan(0.0);}'>>/tmp/isnan.c
+echo 'int main(){isnan(0.0);}'>>/tmp/isnan.c
$c /tmp/isnan.c -o /tmp/isnan $math >/dev/null 2>&1
if [ $? = 0 ]
then NOISNAN=

@ -1,7 +1,7 @@
Name: lpsolve
Summary: A Mixed Integer Linear Programming (MILP) solver
Version: 5.5.2.0
Release: 29%{?dist}
Release: 30%{?dist}
Source: http://downloads.sourceforge.net/lpsolve/lp_solve_%{version}_source.tar.gz
URL: http://sourceforge.net/projects/lpsolve
License: LGPLv2+
@ -11,6 +11,7 @@ BuildRequires: gcc-c++
Patch0: lpsolve-5.5.0.11.cflags.patch
Patch1: lpsolve-5.5.2.0.defines.patch
Patch2: read-cc-from-env.patch
Patch3: lpsolve-ccc-c99.patch
%description
Mixed Integer Linear Programming (MILP) solver lpsolve solves pure linear,
@ -28,6 +29,7 @@ Includes and definitions for developing with lpsolve
%patch0 -p1 -b .cflags.patch
%patch1 -p1 -b .defines.patch
%patch2 -p1 -b .cc-from-env.patch
%patch3 -p1 -b .ccc-c99.patch
%build
%set_build_flags
@ -58,6 +60,9 @@ install -p -m 644 \
%{_includedir}/lpsolve
%changelog
* Fri Nov 25 2022 Florian Weimer <fweimer@redhat.com> - 5.5.2.0-30
- Port the ccc build configuration tool to C99
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.5.2.0-29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

Loading…
Cancel
Save