From 86b474d4dbeb9d4038124c9f2a793f910672465c Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 13 Sep 2023 10:59:55 +0000 Subject: automatic import of lpsolve --- lpsolve-ccc-c99.patch | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 lpsolve-ccc-c99.patch (limited to 'lpsolve-ccc-c99.patch') diff --git a/lpsolve-ccc-c99.patch b/lpsolve-ccc-c99.patch new file mode 100644 index 0000000..929138b --- /dev/null +++ b/lpsolve-ccc-c99.patch @@ -0,0 +1,51 @@ +Port the ccc build configuration detection tool to C99 by +specifying the return type of main as int. + +Submitted upstream: + + + +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 '>>/tmp/platform.c + echo '#include '>>/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 '>>/tmp/isnan.c + echo '#include '>>/tmp/isnan.c + echo '#include '>>/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 '>>/tmp/platform.c + echo '#include '>>/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 '>>/tmp/isnan.c + echo '#include '>>/tmp/isnan.c + echo '#include '>>/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= -- cgit v1.2.3