From 563d45cbbf91d742128269933303c140e7ffcff5 Mon Sep 17 00:00:00 2001 From: Aaron Crane Date: Thu, 12 Oct 2017 17:43:32 +0200 Subject: [PATCH] Rely on C89 headers in U/perl/d_c99_variadic.U --- U/perl/d_c99_variadic.U | 44 ++++++++++++++++++-------------------------- 1 file changed, 18 insertions(+), 26 deletions(-) diff --git a/U/perl/d_c99_variadic.U b/U/perl/d_c99_variadic.U index 2205fa4..435ef4f 100644 --- a/U/perl/d_c99_variadic.U +++ b/U/perl/d_c99_variadic.U @@ -6,7 +6,7 @@ ?RCS: that same Artistic License; a copy of which may be found at the root ?RCS: of the source tree for dist 3.0. ?RCS: -?MAKE:d_c99_variadic_macros: Compile Setvar cat rm_try run i_stdarg i_stdlib +?MAKE:d_c99_variadic_macros: Compile Setvar cat rm_try run ?MAKE: -pick add $@ %< ?S:d_c99_variadic_macros: ?S: This variable conditionally defines the HAS_C99_VARIADIC_MACROS @@ -20,10 +20,8 @@ ?H:. ?F:!try : see if the Compiler supports C99 variadic macros -case "$i_stdarg$i_stdlib" in - "$define$define") - echo "You have and , so checking for C99 variadic macros." >&4 - $cat >try.c <&4 +$cat >try.c < #include @@ -36,27 +34,21 @@ int main() { return 0; } EOCP - set try - if eval $compile && $run ./try 2>&1 >/dev/null; then - case "`$run ./try`" in - "123 456 789") - echo "You have C99 variadic macros." >&4 - d_c99_variadic_macros="$define" - ;; - *) - echo "You don't have functional C99 variadic macros." >&4 - d_c99_variadic_macros="$undef" - ;; - esac - else - echo "I couldn't compile and run the test program, so I assume that you don't have functional C99 variadic macros." >&4 +set try +if eval $compile && $run ./try 2>&1 >/dev/null; then + case "`$run ./try`" in + "123 456 789") + echo "You have C99 variadic macros." >&4 + d_c99_variadic_macros="$define" + ;; + *) + echo "You don't have functional C99 variadic macros." >&4 d_c99_variadic_macros="$undef" - fi - $rm_try - ;; - *) - echo "You don't have and , so not checking for C99 variadic macros." >&4 + ;; + esac +else + echo "I couldn't compile and run the test program, so I assume that you don't have functional C99 variadic macros." >&4 d_c99_variadic_macros="$undef" - ;; -esac +fi +$rm_try -- 1.8.3.1