krb5 commit: Fix designated initializer check to be defined

Greg Hudson ghudson at mit.edu
Fri Apr 14 12:14:36 EDT 2017


https://github.com/krb5/krb5/commit/0822275972a3b5bf4c88ae13cd51a19b8f354aa1
commit 0822275972a3b5bf4c88ae13cd51a19b8f354aa1
Author: Robbie Harwood <rharwood at redhat.com>
Date:   Mon Apr 10 14:01:40 2017 -0400

    Fix designated initializer check to be defined

 src/lib/krb5/os/accessor.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/lib/krb5/os/accessor.c b/src/lib/krb5/os/accessor.c
index df63b14..11552ef 100644
--- a/src/lib/krb5/os/accessor.c
+++ b/src/lib/krb5/os/accessor.c
@@ -30,11 +30,14 @@
 
 /* If this trick gets used elsewhere, move it to k5-platform.h.  */
 #ifndef DESIGNATED_INITIALIZERS
-#define DESIGNATED_INITIALIZERS                         \
-    /* ANSI/ISO C 1999 supports this...  */             \
-    (__STDC_VERSION__ >= 199901L                        \
-     /* ...as does GCC, since version 2.something.  */  \
-     || (!defined __cplusplus && __GNUC__ >= 3))
+/* ANSI/ISO C 1999 supports this...  */
+#if __STDC_VERSION__ >= 199901L                       \
+    /* ...as does GCC, since version 2.something.  */ \
+    || (!defined __cplusplus && __GNUC__ >= 3)
+#define DESIGNATED_INITIALIZERS 1
+#else
+#define DESIGNATED_INITIALIZERS 0
+#endif
 #endif
 
 krb5_error_code KRB5_CALLCONV


More information about the cvs-krb5 mailing list