From 00aaf3ca0db96212996091ab6d690bd3ee462e3f Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Sun, 1 Jan 2017 21:56:54 +0100 Subject: [PATCH 1/1] fix gcc 6.2 builds It was failing with the error: type 'struct yy_buffer_state' violates the C++ One Definition Rule. A different type is defined in another translation unit. This comes from the fact that I rebuilt one of the flex parser with a new version of flex. Rebuilding all of them is difficult because they are somehow manually edited to make the C compile with g++. Dirty, dirty :( --- src/simdag/dax_dtd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/simdag/dax_dtd.c b/src/simdag/dax_dtd.c index bb9d481706..82071a55c4 100644 --- a/src/simdag/dax_dtd.c +++ b/src/simdag/dax_dtd.c @@ -241,7 +241,7 @@ struct yy_buffer_state /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. @@ -3076,7 +3076,7 @@ static int yy_get_next_buffer (void) else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((unsigned int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) dax_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); -- 2.20.1