Module Name: src
Committed By: christos
Date: Sun Dec 23 16:27:17 UTC 2018
Modified Files:
src/external/bsd/flex/bin: Makefile
src/external/bsd/flex/dist/src: dfa.c filter.c flex.skl flexdef.h
flexint.h misc.c regex.c scan.l
src/external/bsd/flex/include: config.h
Removed Files:
src/external/bsd/flex/dist/lib: Makefile.am Makefile.in reallocarray.c
Log Message:
merge conflicts
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/flex/bin/Makefile
cvs rdiff -u -r1.1.1.4 -r0 src/external/bsd/flex/dist/lib/Makefile.am \
src/external/bsd/flex/dist/lib/Makefile.in
cvs rdiff -u -r1.1.1.1 -r0 src/external/bsd/flex/dist/lib/reallocarray.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/flex/dist/src/dfa.c \
src/external/bsd/flex/dist/src/filter.c \
src/external/bsd/flex/dist/src/misc.c \
src/external/bsd/flex/dist/src/regex.c
cvs rdiff -u -r1.11 -r1.12 src/external/bsd/flex/dist/src/flex.skl
cvs rdiff -u -r1.6 -r1.7 src/external/bsd/flex/dist/src/flexdef.h
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/flex/dist/src/flexint.h
cvs rdiff -u -r1.5 -r1.6 src/external/bsd/flex/dist/src/scan.l
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/flex/include/config.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/flex/bin/Makefile
diff -u src/external/bsd/flex/bin/Makefile:1.11 src/external/bsd/flex/bin/Makefile:1.12
--- src/external/bsd/flex/bin/Makefile:1.11 Mon Jan 2 13:33:22 2017
+++ src/external/bsd/flex/bin/Makefile Sun Dec 23 11:27:17 2018
@@ -1,5 +1,5 @@
# from: @(#)Makefile 5.4 (Berkeley) 6/24/90
-# $NetBSD: Makefile,v 1.11 2017/01/02 18:33:22 christos Exp $
+# $NetBSD: Makefile,v 1.12 2018/12/23 16:27:17 christos Exp $
#
# By default, flex will be configured to generate 8-bit scanners only if the
# -8 flag is given. If you want it to always generate 8-bit scanners, add
@@ -61,7 +61,7 @@ skel.c: flex.skl mkskel.sh flexint.h tab
-DFLEX_MINOR_VERSION=`echo ${VERSION} | cut -f 2 -d .` \
-DFLEX_SUBMINOR_VERSION=`echo ${VERSION} | cut -f 3 -d .` | \
${TOOL_SED} -e 's/m4postproc_/m4_/g' | \
- ${HOST_SH} ${IDIST}/mkskel.sh > ${.TARGET}
+ ${HOST_SH} ${IDIST}/mkskel.sh ${IDIST} ${TOOL_M4} ${VERSION} > ${.TARGET}
.ifndef HOSTPROG
scan.c: scan.l
Index: src/external/bsd/flex/dist/src/dfa.c
diff -u src/external/bsd/flex/dist/src/dfa.c:1.3 src/external/bsd/flex/dist/src/dfa.c:1.4
--- src/external/bsd/flex/dist/src/dfa.c:1.3 Mon Jan 2 12:45:27 2017
+++ src/external/bsd/flex/dist/src/dfa.c Sun Dec 23 11:27:17 2018
@@ -29,7 +29,7 @@
/* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
/* PURPOSE. */
#include "flexdef.h"
-__RCSID("$NetBSD: dfa.c,v 1.3 2017/01/02 17:45:27 christos Exp $");
+__RCSID("$NetBSD: dfa.c,v 1.4 2018/12/23 16:27:17 christos Exp $");
#include "tables.h"
@@ -464,14 +464,9 @@ void ntod (void)
/* We still may want to use the table if numecs
* is a power of 2.
*/
- int power_of_two;
-
- for (power_of_two = 1; power_of_two <= csize;
- power_of_two *= 2)
- if (numecs == power_of_two) {
- use_NUL_table = true;
- break;
- }
+ if (numecs <= csize && is_power_of_2(numecs)) {
+ use_NUL_table = true;
+ }
}
if (use_NUL_table)
Index: src/external/bsd/flex/dist/src/filter.c
diff -u src/external/bsd/flex/dist/src/filter.c:1.3 src/external/bsd/flex/dist/src/filter.c:1.4
--- src/external/bsd/flex/dist/src/filter.c:1.3 Mon Jan 2 12:45:27 2017
+++ src/external/bsd/flex/dist/src/filter.c Sun Dec 23 11:27:17 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: filter.c,v 1.3 2017/01/02 17:45:27 christos Exp $ */
+/* $NetBSD: filter.c,v 1.4 2018/12/23 16:27:17 christos Exp $ */
/* filter - postprocessing of flex output through filters */
@@ -23,7 +23,7 @@
/* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
/* PURPOSE. */
#include "flexdef.h"
-__RCSID("$NetBSD: filter.c,v 1.3 2017/01/02 17:45:27 christos Exp $");
+__RCSID("$NetBSD: filter.c,v 1.4 2018/12/23 16:27:17 christos Exp $");
static const char * check_4_gnu_m4 =
"m4_dnl ifdef(`__gnu__', ,"
@@ -179,7 +179,7 @@ clearerr(stdin);
if ((r = chain->filter_func (chain)) == -1)
flexfatal (_("filter_func failed"));
- exit (0);
+ FLEX_EXIT (0);
}
else {
execvp (chain->argv[0],
@@ -188,7 +188,7 @@ clearerr(stdin);
chain->argv[0]);
}
- exit (1);
+ FLEX_EXIT (1);
}
/* Parent */
@@ -299,7 +299,8 @@ int filter_tee_header (struct filter *ch
fprintf (to_h, "\n");
/* write a fake line number. It will get fixed by the linedir filter. */
- fprintf (to_h, "#line 4000 \"M4_YY_OUTFILE_NAME\"\n");
+ if (gen_line_dirs)
+ fprintf (to_h, "#line 4000 \"M4_YY_OUTFILE_NAME\"\n");
fprintf (to_h, "#undef %sIN_HEADER\n", prefix);
fprintf (to_h, "#endif /* %sHEADER_H */\n", prefix);
@@ -326,7 +327,7 @@ int filter_tee_header (struct filter *ch
while (wait (0) > 0) ;
- exit (0);
+ FLEX_EXIT (0);
return 0;
}
Index: src/external/bsd/flex/dist/src/misc.c
diff -u src/external/bsd/flex/dist/src/misc.c:1.3 src/external/bsd/flex/dist/src/misc.c:1.4
--- src/external/bsd/flex/dist/src/misc.c:1.3 Mon Jan 2 12:45:27 2017
+++ src/external/bsd/flex/dist/src/misc.c Sun Dec 23 11:27:17 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: misc.c,v 1.3 2017/01/02 17:45:27 christos Exp $ */
+/* $NetBSD: misc.c,v 1.4 2018/12/23 16:27:17 christos Exp $ */
/* misc - miscellaneous flex routines */
@@ -33,7 +33,7 @@
/* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
/* PURPOSE. */
#include "flexdef.h"
-__RCSID("$NetBSD: misc.c,v 1.3 2017/01/02 17:45:27 christos Exp $");
+__RCSID("$NetBSD: misc.c,v 1.4 2018/12/23 16:27:17 christos Exp $");
#include "tables.h"
#include <stdarg.h>
@@ -147,9 +147,14 @@ void add_action (const char *new_text)
void *allocate_array (int size, size_t element_size)
{
void *mem;
- size_t num_bytes = element_size * (size_t) size;
-
- mem = malloc(num_bytes);
+#if HAVE_REALLOCARRAY
+ /* reallocarray has built-in overflow detection */
+ mem = reallocarray(NULL, (size_t) size, element_size);
+#else
+ size_t num_bytes = (size_t) size * element_size;
+ mem = (size && SIZE_MAX / (size_t) size < element_size) ? NULL :
+ malloc(num_bytes);
+#endif
if (!mem)
flexfatal (_
("memory allocation failed in allocate_array()"));
@@ -306,18 +311,6 @@ void flexfatal (const char *msg)
}
-/* htoui - convert a hexadecimal digit string to an unsigned integer value */
-
-unsigned int htoui (unsigned char str[])
-{
- unsigned int result;
-
- (void) sscanf ((char *) str, "%x", &result);
-
- return result;
-}
-
-
/* lerr - report an error message */
void lerr (const char *msg, ...)
@@ -517,18 +510,14 @@ unsigned char myesc (unsigned char array
int sptr = 1;
while (sptr <= 3 &&
- isascii (array[sptr]) &&
- isdigit (array[sptr]))
- /* Don't increment inside loop control
- * because if isdigit() is a macro it might
- * expand into multiple increments ...
- */
+ array[sptr] >= '0' && array[sptr] <= '7') {
++sptr;
+ }
c = array[sptr];
array[sptr] = '\0';
- esc_char = (unsigned char) otoui (array + 1);
+ esc_char = (unsigned char) strtoul ((const char *)array + 1, NULL, 8);
array[sptr] = c;
@@ -539,18 +528,18 @@ unsigned char myesc (unsigned char array
{ /* \x<hex> */
int sptr = 2;
- while (isascii (array[sptr]) &&
- isxdigit (array[sptr]))
+ while (sptr <= 3 && isxdigit (array[sptr])) {
/* Don't increment inside loop control
- * because if isdigit() is a macro it might
+ * because if isxdigit() is a macro it might
* expand into multiple increments ...
*/
++sptr;
+ }
c = array[sptr];
array[sptr] = '\0';
- esc_char = (unsigned char) htoui (array + 2);
+ esc_char = (unsigned char) strtoul ((const char *)array + 2, NULL, 16);
array[sptr] = c;
@@ -563,17 +552,6 @@ unsigned char myesc (unsigned char array
}
-/* otoui - convert an octal digit string to an unsigned integer value */
-
-unsigned int otoui (unsigned char str[])
-{
- unsigned int result;
-
- (void) sscanf ((char *) str, "%o", &result);
- return result;
-}
-
-
/* out - various flavors of outputing a (possibly formatted) string for the
* generated scanner, keeping track of the line count.
*/
@@ -686,9 +664,14 @@ char *readable_form (int c)
void *reallocate_array (void *array, int size, size_t element_size)
{
void *new_array;
- size_t num_bytes = element_size * (size_t) size;
-
- new_array = realloc(array, num_bytes);
+#if HAVE_REALLOCARRAY
+ /* reallocarray has built-in overflow detection */
+ new_array = reallocarray(array, (size_t) size, element_size);
+#else
+ size_t num_bytes = (size_t) size * element_size;
+ new_array = (size && SIZE_MAX / (size_t) size < element_size) ? NULL :
+ realloc(array, num_bytes);
+#endif
if (!new_array)
flexfatal (_("attempt to increase array size failed"));
@@ -813,9 +796,6 @@ void skelout (void)
/* %e end linkage-only code. */
OUT_END_CODE ();
}
- else if (buf[1] == '#') {
- /* %# a comment in the skel. ignore. */
- }
else {
flexfatal (_("bad line in skeleton file"));
}
Index: src/external/bsd/flex/dist/src/regex.c
diff -u src/external/bsd/flex/dist/src/regex.c:1.3 src/external/bsd/flex/dist/src/regex.c:1.4
--- src/external/bsd/flex/dist/src/regex.c:1.3 Mon Jan 2 12:45:27 2017
+++ src/external/bsd/flex/dist/src/regex.c Sun Dec 23 11:27:17 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: regex.c,v 1.3 2017/01/02 17:45:27 christos Exp $ */
+/* $NetBSD: regex.c,v 1.4 2018/12/23 16:27:17 christos Exp $ */
/** regex - regular expression functions related to POSIX regex lib. */
@@ -23,7 +23,7 @@
/* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
/* PURPOSE. */
#include "flexdef.h"
-__RCSID("$NetBSD: regex.c,v 1.3 2017/01/02 17:45:27 christos Exp $");
+__RCSID("$NetBSD: regex.c,v 1.4 2018/12/23 16:27:17 christos Exp $");
static const char* REGEXP_LINEDIR = "^#line ([[:digit:]]+) \"(.*)\"";
static const char* REGEXP_BLANK_LINE = "^[[:space:]]*$";
@@ -55,21 +55,17 @@ void flex_regcomp(regex_t *preg, const c
memset (preg, 0, sizeof (regex_t));
if ((err = regcomp (preg, regex, cflags)) != 0) {
- const size_t errbuf_sz = 200;
- char *errbuf, *rxerr;
+ const size_t errbuf_sz = 200;
+ char *errbuf;
+ int n;
errbuf = malloc(errbuf_sz * sizeof(char));
if (!errbuf)
flexfatal(_("Unable to allocate buffer to report regcomp"));
- rxerr = malloc(errbuf_sz * sizeof(char));
- if (!rxerr)
- flexfatal(_("Unable to allocate buffer for regerror"));
- regerror (err, preg, rxerr, errbuf_sz);
- snprintf (errbuf, errbuf_sz, "regcomp for \"%s\" failed: %s", regex, rxerr);
-
- flexfatal (errbuf);
- free(errbuf);
- free(rxerr);
+ n = snprintf(errbuf, errbuf_sz, "regcomp for \"%s\" failed: ", regex);
+ regerror(err, preg, errbuf+n, errbuf_sz-(size_t)n);
+
+ flexfatal (errbuf); /* never returns - no need to free(errbuf) */
}
}
Index: src/external/bsd/flex/dist/src/flex.skl
diff -u src/external/bsd/flex/dist/src/flex.skl:1.11 src/external/bsd/flex/dist/src/flex.skl:1.12
--- src/external/bsd/flex/dist/src/flex.skl:1.11 Mon Jan 9 10:14:41 2017
+++ src/external/bsd/flex/dist/src/flex.skl Sun Dec 23 11:27:17 2018
@@ -6,8 +6,9 @@
%# pre-compilation stage of flex. Only macros starting
%# with `m4preproc_' are processed, and quoting is normal.
%#
-%# 2. The preprocessed skeleton is translated verbatim into a
-%# C array, saved as "skel.c" and compiled into the flex binary.
+%# 2. The preprocessed skeleton is translated into a C array, saved
+%# as "skel.c" and compiled into the flex binary. The %# comment
+%# lines are removed.
%#
%# 3. At runtime, the skeleton is generated and filtered (again)
%# through m4. Macros beginning with `m4_' will be processed.
@@ -114,6 +115,16 @@ m4_ifdef( [[M4_YY_PREFIX]],, [[m4_define
m4preproc_define(`M4_GEN_PREFIX',
``[[#define yy$1 ]]M4_YY_PREFIX[[$1]]
%# m4_define([[yy$1]], [[M4_YY_PREFIX[[$1]]m4_ifelse($'`#,0,,[[($'`@)]])]])'')
+m4preproc_define(`M4_GEN_PREFIX',``
+[[#ifdef yy$1
+#define ]]M4_YY_PREFIX[[$1_ALREADY_DEFINED
+#else
+#define yy$1 ]]M4_YY_PREFIX[[$1
+#endif]]
+'m4preproc_divert(1)`
+[[#ifndef ]]M4_YY_PREFIX[[$1_ALREADY_DEFINED
+#undef yy$1
+#endif]]'m4preproc_divert(0)')
%if-c++-only
/* The c++ scanner is a mess. The FlexLexer.h header file relies on the
@@ -1682,6 +1693,8 @@ m4_ifdef( [[M4_YY_USES_REJECT]],
(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size M4_YY_CALL_LAST_ARG );
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
+ /* "- 2" to take care of EOB's */
+ YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
}
YY_G(yy_n_chars) += number_to_move;
@@ -1914,6 +1927,9 @@ m4_ifdef( [[M4_YY_USE_LINENO]],
*/
void yyFlexLexer::yyrestart( std::istream* input_file )
{
+ if( ! input_file ) {
+ input_file = &yyin;
+ }
yyrestart( *input_file );
}
%endif
@@ -2075,7 +2091,7 @@ static void yy_load_buffer_state (M4_YY
b->yy_input_file = file;
%endif
%if-c++-only
- b->yy_input_file = (&file == 0) ? NULL : file.rdbuf();
+ b->yy_input_file = file.rdbuf();
%endif
b->yy_fill_buffer = 1;
@@ -2453,7 +2469,7 @@ static void yynoreturn yy_fatal_error YY
{
M4_YY_DECL_GUTS_VAR();
M4_YY_NOOP_GUTS_VAR();
- (void) fprintf( stderr, "%s\n", msg );
+ fprintf( stderr, "%s\n", msg );
exit( YY_EXIT_FAILURE );
}
%endif
@@ -3416,4 +3432,5 @@ m4_ifdef( [[M4_YY_IN_HEADER]],
#undef YY_DECL_IS_OURS
#undef YY_DECL
#endif
+m4preproc_undivert(1)
]])
Index: src/external/bsd/flex/dist/src/flexdef.h
diff -u src/external/bsd/flex/dist/src/flexdef.h:1.6 src/external/bsd/flex/dist/src/flexdef.h:1.7
--- src/external/bsd/flex/dist/src/flexdef.h:1.6 Mon Aug 20 06:26:58 2018
+++ src/external/bsd/flex/dist/src/flexdef.h Sun Dec 23 11:27:17 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: flexdef.h,v 1.6 2018/08/20 10:26:58 christos Exp $ */
+/* $NetBSD: flexdef.h,v 1.7 2018/12/23 16:27:17 christos Exp $ */
/* flexdef - definitions file for flex */
@@ -68,23 +68,24 @@
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
-#ifdef HAVE_UNISTD_H
+/* Required: dup() and dup2() in <unistd.h> */
#include <unistd.h>
-#endif
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#ifdef HAVE_SYS_PARAMS_H
#include <sys/params.h>
#endif
-#ifdef HAVE_SYS_STAT_H
+/* Required: stat() in <sys/stat.h> */
#include <sys/stat.h>
-#endif
+/* Required: wait() in <sys/wait.h> */
#include <sys/wait.h>
#include <stdbool.h>
-#ifdef HAVE_REGEX_H
+#include <stdarg.h>
+/* Required: regcomp(), regexec() and regerror() in <regex.h> */
#include <regex.h>
-#endif
+/* Required: strcasecmp() in <strings.h> */
+#include <strings.h>
#include "flexint.h"
/* We use gettext. So, when we write strings which should be translated, we mark them with _() */
@@ -119,6 +120,8 @@
#define ABS(x) ((x) < 0 ? -(x) : (x))
#endif
+/* Whether an integer is a power of two */
+#define is_power_of_2(n) ((n) > 0 && ((n) & ((n) - 1)) == 0)
#define unspecified -1
@@ -853,9 +856,6 @@ extern void flexfatal(const char *);
}while(0)
#endif /* ! HAVE_DECL___func__ */
-/* Convert a hexadecimal digit string to an integer value. */
-extern unsigned int htoui(unsigned char[]);
-
/* Report an error message formatted */
extern void lerr(const char *, ...)
#if defined(__GNUC__) && __GNUC__ >= 3
@@ -892,9 +892,6 @@ extern int myctoi(const char *);
/* Return character corresponding to escape sequence. */
extern unsigned char myesc(unsigned char[]);
-/* Convert an octal digit string to an integer value. */
-extern unsigned int otoui(unsigned char[]);
-
/* Output a (possibly-formatted) string to the generated scanner. */
extern void out(const char *);
extern void out_dec(const char *, int);
Index: src/external/bsd/flex/dist/src/flexint.h
diff -u src/external/bsd/flex/dist/src/flexint.h:1.2 src/external/bsd/flex/dist/src/flexint.h:1.3
--- src/external/bsd/flex/dist/src/flexint.h:1.2 Sat Jan 9 12:38:57 2016
+++ src/external/bsd/flex/dist/src/flexint.h Sun Dec 23 11:27:17 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: flexint.h,v 1.2 2016/01/09 17:38:57 christos Exp $ */
+/* $NetBSD: flexint.h,v 1.3 2018/12/23 16:27:17 christos Exp $ */
/* flex integer type definitions */
@@ -60,6 +60,10 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
+#ifndef SIZE_MAX
+#define SIZE_MAX (~(size_t)0)
+#endif
+
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
Index: src/external/bsd/flex/dist/src/scan.l
diff -u src/external/bsd/flex/dist/src/scan.l:1.5 src/external/bsd/flex/dist/src/scan.l:1.6
--- src/external/bsd/flex/dist/src/scan.l:1.5 Mon Jan 2 12:45:27 2017
+++ src/external/bsd/flex/dist/src/scan.l Sun Dec 23 11:27:17 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: scan.l,v 1.5 2017/01/02 17:45:27 christos Exp $ */
+/* $NetBSD: scan.l,v 1.6 2018/12/23 16:27:17 christos Exp $ */
/* scan.l - scanner for flex input -*-C-*- */
@@ -34,7 +34,7 @@
/* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR */
/* PURPOSE. */
#include "flexdef.h"
-__RCSID("$NetBSD: scan.l,v 1.5 2017/01/02 17:45:27 christos Exp $");
+__RCSID("$NetBSD: scan.l,v 1.6 2018/12/23 16:27:17 christos Exp $");
#include "parse.h"
extern bool tablesverify, tablesext;
@@ -267,8 +267,7 @@ M4QEND "]""]"
}
. /* ignore spurious characters */
}
-<ACTION,CODEBLOCK,ACTION_STRING,PERCENT_BRACE_ACTION,CHARACTER_CONSTANT,
-COMMENT,CODE_COMMENT>{
+<ACTION,CODEBLOCK,ACTION_STRING,PERCENT_BRACE_ACTION,CHARACTER_CONSTANT,COMMENT,CODE_COMMENT>{
{M4QSTART} ACTION_ECHO_QSTART;
{M4QEND} ACTION_ECHO_QEND;
}
@@ -924,7 +923,7 @@ nmstr[yyleng - 2 - end_is_ws] = '\0'; /
{NL} {
++linenum;
ACTION_ECHO;
- if (bracelevel == 0 || (doing_codeblock && indented_code)) {
+ if (bracelevel <= 0 || (doing_codeblock && indented_code)) {
if ( doing_rule_action )
add_action( "\tYY_BREAK]""]\n" );
@@ -945,16 +944,16 @@ nmstr[yyleng - 2 - end_is_ws] = '\0'; /
"'" ACTION_ECHO; BEGIN(CHARACTER_CONSTANT);
\" ACTION_ECHO; BEGIN(ACTION_STRING);
{NL} {
- ++linenum;
- ACTION_ECHO;
- if (bracelevel == 0) {
- if ( doing_rule_action )
- add_action( "\tYY_BREAK]""]\n" );
+ ++linenum;
+ ACTION_ECHO;
+ if (bracelevel <= 0) {
+ if ( doing_rule_action )
+ add_action( "\tYY_BREAK]""]\n" );
- doing_rule_action = false;
- BEGIN(SECT2);
- }
- }
+ doing_rule_action = false;
+ BEGIN(SECT2);
+ }
+ }
. ACTION_ECHO;
}
@@ -969,7 +968,7 @@ nmstr[yyleng - 2 - end_is_ws] = '\0'; /
<ACTION_STRING,CHARACTER_CONSTANT>{
(\\\n)* ACTION_ECHO;
\\(\\\n)*. ACTION_ECHO;
- {NL} ++linenum; ACTION_ECHO; BEGIN(ACTION);
+ {NL} ++linenum; ACTION_ECHO; if (bracelevel <= 0) { BEGIN(SECT2); } else { BEGIN(ACTION); }
. ACTION_ECHO;
}
Index: src/external/bsd/flex/include/config.h
diff -u src/external/bsd/flex/include/config.h:1.8 src/external/bsd/flex/include/config.h:1.9
--- src/external/bsd/flex/include/config.h:1.8 Mon Jan 2 13:15:55 2017
+++ src/external/bsd/flex/include/config.h Sun Dec 23 11:27:17 2018
@@ -20,11 +20,11 @@
*/
/* #undef HAVE_ALLOCA_H */
-/* Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the
+/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
CoreFoundation framework. */
/* #undef HAVE_CFLOCALECOPYCURRENT */
-/* Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in
+/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
the CoreFoundation framework. */
/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
@@ -56,9 +56,6 @@
/* Define to 1 if you have the `m' library (-lm). */
#define HAVE_LIBM 1
-/* pthread library */
-#define HAVE_LIBPTHREAD 1
-
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
@@ -92,7 +89,7 @@
#define HAVE_REALLOC 1
/* Define to 1 if you have the `reallocarray' function. */
-#define HAVE_REALLOCARRAY 1
+#undef HAVE_REALLOCARRAY
/* Define to 1 if you have the `regcomp' function. */
#define HAVE_REGCOMP 1
@@ -112,6 +109,9 @@
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
+/* Define to 1 if you have the `strcasecmp' function. */
+#define HAVE_STRCASECMP 1
+
/* Define to 1 if you have the `strchr' function. */
#define HAVE_STRCHR 1
@@ -133,6 +133,9 @@
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#define HAVE_SYS_WAIT_H 1
+
/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1
@@ -169,7 +172,7 @@
#define PACKAGE_NAME "the fast lexical analyser generator"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "the fast lexical analyser generator 2.6.3"
+#define PACKAGE_STRING "the fast lexical analyser generator 2.6.4"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "flex"
@@ -178,7 +181,7 @@
#define PACKAGE_URL ""
/* Define to the version of this package. */
-#define PACKAGE_VERSION "2.6.3"
+#define PACKAGE_VERSION "2.6.4"
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
@@ -192,7 +195,7 @@
#define STDC_HEADERS 1
/* Version number of package */
-#define VERSION "2.6.3"
+#define VERSION "2.6.4"
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
`char[]'. */