summaryrefslogtreecommitdiff
path: root/math/lp_solve/patches/patch-lp__solve_ccc
blob: 10a70f9a53948092810c26a5f7337a38dc5d5b0c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$NetBSD: patch-lp__solve_ccc,v 1.2 2016/09/08 05:12:39 richard Exp $

recent versions of gcc are noisy unless main() is declared returning 'int'
and isnan() needs a floating argument else NOISNAN is defined causing
problems.

--- lp_solve/ccc.orig	2009-01-25 18:39:03.000000000 +0000
+++ lp_solve/ccc
@@ -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);}'>>/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=
@@ -38,4 +38,4 @@ then opts='-O0'
 else dl=-ldl
 fi
 
-$c -I.. -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I../shared $opts $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src -o bin/$PLATFORM/lp_solve $math $dl
+$c -I.. -I../bfp -I../bfp/bfp_LUSOL -I../bfp/bfp_LUSOL/LUSOL -I../colamd -I../shared $opts $def $NOISNAN -DYY_NEVER_INTERACTIVE -DPARSER_LP -DINVERSE_ACTIVE=INVERSE_LUSOL -DRoleIsExternalInvEngine $src -o bin/$PLATFORM/lp_solve $math $DL_LDADD