Branch: Tag:

2016-11-12

2016-11-12 08:16:41 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Build [NT]: Test for C99-style struct initialization.

MSVC lagged in implementing the C99 standard, and apparently first
started supporting C99-style structure initialization in 2013.

Fixes compilation issues on NT (and other platforms with old compilers).

6878:      #############################################################################    + AC_MSG_CHECKING(for C99-style designator struct initialization) + AC_CACHE_VAL(pike_cv_c99_struct_init, [ +  AC_TRY_COMPILE([ +  struct foo { +  int a; +  float b; +  } f = { .b = 0.5, .a = 1 }; +  ], [], [ pike_cv_c99_struct_init=yes +  ], [ pike_cv_c99_struct_init=no ]) + ]) + if test "x$pike_cv_c99_struct_init" = "xyes"; then +  AC_MSG_RESULT(yes) +  AC_DEFINE(HAVE_C99_STRUCT_INIT, [], [C99-style struct initialization supported.]) + else +  AC_MSG_RESULT(no) + fi +  + ############################################################################# +    AC_MSG_CHECKING(if port.c works in CONFIGURE_TEST mode)   AC_CACHE_VAL(pike_cv_configure_test_port_c, [    AC_TRY_RUN([