From dc262b45ae8c63be64fa38c7db0296e0d3889895 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 7 Jun 2023 17:30:18 +0200 Subject: [PATCH] Port to C99 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Port the ccc build configuration detection tool to C99 by specifying the return type of main as int. Submitted upstream: Signed-off-by: Petr Písař --- bfp/bfp_LUSOL/ccc | 2 +- lp_solve/ccc | 4 ++-- lpsolve55/ccc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bfp/bfp_LUSOL/ccc b/bfp/bfp_LUSOL/ccc index 86b274c..a349345 100644 --- a/bfp/bfp_LUSOL/ccc +++ b/bfp/bfp_LUSOL/ccc @@ -7,7 +7,7 @@ c=${CC:-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(void){printf("ux%d", (int) (sizeof(void *)*8));}'>>/tmp/platform.c $c $CFLAGS /tmp/platform.c $LDFLAGS -o /tmp/platform PLATFORM=`/tmp/platform` rm /tmp/platform /tmp/platform.c >/dev/null 2>&1 diff --git a/lp_solve/ccc b/lp_solve/ccc index 83f21df..2e99f39 100644 --- a/lp_solve/ccc +++ b/lp_solve/ccc @@ -8,7 +8,7 @@ MYTMP=`mktemp -d "${TMPDIR:-/tmp}"/lp_solve_XXXXXX` >"$MYTMP"/platform.c echo '#include '>>"$MYTMP"/platform.c echo '#include '>>"$MYTMP"/platform.c -echo 'main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>"$MYTMP"/platform.c +echo 'int main(void){printf("ux%d", (int) (sizeof(void *)*8));}'>>"$MYTMP"/platform.c $c $CFLAGS "$MYTMP"/platform.c $LDFLAGS -o "$MYTMP"/platform PLATFORM=`"$MYTMP"/platform` rm "$MYTMP"/platform "$MYTMP"/platform.c >/dev/null 2>&1 @@ -22,7 +22,7 @@ math=-lm echo '#include '>>"$MYTMP"/isnan.c echo '#include '>>"$MYTMP"/isnan.c echo '#include '>>"$MYTMP"/isnan.c -echo 'main(){isnan(0.0);return 0;}'>>"$MYTMP"/isnan.c +echo 'int main(void){isnan(0.0);return 0;}'>>"$MYTMP"/isnan.c $c $CFLAGS "$MYTMP"/isnan.c $LDFLAGS -o "$MYTMP"/isnan $math >/dev/null 2>&1 if [ $? = 0 ] then NOISNAN= diff --git a/lpsolve55/ccc b/lpsolve55/ccc index 49cd7dc..59c720f 100644 --- a/lpsolve55/ccc +++ b/lpsolve55/ccc @@ -8,7 +8,7 @@ MYTMP=`mktemp -d "${TMPDIR:-/tmp}"/lp_solve_XXXXXX` >"$MYTMP"/platform.c echo '#include '>>"$MYTMP"/platform.c echo '#include '>>"$MYTMP"/platform.c -echo 'main(){printf("ux%d", (int) (sizeof(void *)*8));}'>>"$MYTMP"/platform.c +echo 'int main(void){printf("ux%d", (int) (sizeof(void *)*8));}'>>"$MYTMP"/platform.c $c $CFLAGS "$MYTMP"/platform.c $LDFLAGS -o "$MYTMP"/platform PLATFORM=`"$MYTMP"/platform` rm "$MYTMP"/platform "$MYTMP"/platform.c >/dev/null 2>&1 @@ -20,7 +20,7 @@ mkdir bin bin/$PLATFORM >/dev/null 2>&1 echo '#include '>>"$MYTMP"/isnan.c echo '#include '>>"$MYTMP"/isnan.c echo '#include '>>"$MYTMP"/isnan.c -echo 'main(){isnan(0.0);return 0;}'>>"$MYTMP"/isnan.c +echo 'int main(void){isnan(0.0);return 0;}'>>"$MYTMP"/isnan.c $c $CFLAGS "$MYTMP"/isnan.c $LDFLAGS -o "$MYTMP"/isnan $math >/dev/null 2>&1 if [ $? = 0 ] then NOISNAN= -- 2.40.1