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