mate: avoid redefining NDEBUG
authorPascal Quantin <pascal.quantin@gmail.com>
Tue, 18 Apr 2017 19:55:30 +0000 (21:55 +0200)
committerGuy Harris <guy@alum.mit.edu>
Tue, 18 Apr 2017 21:27:27 +0000 (21:27 +0000)
When building RelWithDebInfo target with MSVC, NDEBUG is automatically defined.
Avoid redefining the macro by checking if it already exists.

Change-Id: I1720f47cce0df210c2b2dff3b20c218dc2ae7b02
Reviewed-on: https://code.wireshark.org/review/21200
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
plugins/mate/mate_grammar.lemon

index f40243789fa9a49259cf4d3cc5def1ccce3abdec..302f0582a518a12dee124c02659220fd24779dce 100644 (file)
@@ -28,7 +28,9 @@
  * XXX - there's a Lemon bug where this grammar produces a parser that
  * fails assertions; to work around it, we disable assert() failures.
  */
+#ifndef NDEBUG
 #define NDEBUG
+#endif
 
 #include "mate.h"
 #include "mate_grammar.h"