+* [Bug 2728] Work around C99-style structure initialization code
+ for older compilers, specifically Visual Studio prior to VS2013.
* [Bug 2695] Windows build: __func__ not supported under Windows.
---
(4.2.8p1-beta4) 2015/01/04 Released by Harlan Stenn <stenn@ntp.org>
l_fp lfp; /* NTP_LFP */
} v; /* retrieved value */
} vdc;
-#define VDC_INIT(a, b, c) { .tag = a, .display = b, .type = c }
-
+#if !defined(MISSING_C99_STYLE_INIT)
+# define VDC_INIT(a, b, c) { .tag = a, .display = b, .type = c }
+#else
+# define VDC_INIT(a, b, c) { a, b, c }
+#endif
/*
* other local function prototypes
*/
#if defined(_MSC_VER) && _MSC_VER<1800
# define MISSING_INTTYPES_H 1 /* not provided by VS2012 and earlier */
# define MISSING_STDBOOL_H 1 /* not provided by VS2012 and earlier */
+# define MISSING_C99_STYLE_INIT 1 /* see [Bug 2728] */
#else
#if defined(_MSC_VER) && _MSC_VER>=1800
/* VS2013 and above support C99 types */
#undef _aof_
static char const zNil[] = "";
-static arg_types_t argTypes = { .pzStr = NULL };
+static arg_types_t argTypes = { 0 };
static char line_fmt_buf[32];
static bool displayEnum = false;
static char const pkgdatadir_default[] = PKGDATADIR;
char const *
optionKeywordName(tOptDesc * pOD, unsigned int enum_val)
{
- tOptDesc od = { .optIndex = 0 };
+ tOptDesc od = { 0 };
od.optArg.argEnum = enum_val;
(*(pOD->pOptProc))(OPTPROC_RETURN_VALNAME, &od );