mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 07:13:02 +00:00
Pacify -DGNULIB_POSIXCHECK.
* bootstrap.conf (gnulib_modules): Add all modules suggested by -DGNULIB_POSIXCHECK. * src/files.c (file_name_split) * src/getargs.c (getargs) * src/location.c (boundary_set_from_string) * src/output.c (token_definitions_output, output_skeleton) * src/parse-gram.y (prologue_declaration) * src/scan-gram.l (handle_syncline) * src/symtab.c (symbol_new): Use mbschr and mbsrchr instead of strchr and strrchr. In the cases of command-line options, file names, and thus locations, functionality may be improved. In the case of symbol names, there should be no functional difference as all characters are ASCII, so the intended benefit is just warning suppression.
This commit is contained in:
@@ -367,9 +367,9 @@ token_definitions_output (FILE *out)
|
||||
|
||||
/* Don't #define nonliteral tokens whose names contain periods,
|
||||
dashes or '$' (as does the default value of the EOF token). */
|
||||
if (strchr (sym->tag, '.')
|
||||
|| strchr (sym->tag, '-')
|
||||
|| strchr (sym->tag, '$'))
|
||||
if (mbschr (sym->tag, '.')
|
||||
|| mbschr (sym->tag, '-')
|
||||
|| mbschr (sym->tag, '$'))
|
||||
continue;
|
||||
|
||||
fprintf (out, "%s[[[%s]], %d]",
|
||||
@@ -518,7 +518,7 @@ output_skeleton (void)
|
||||
full_m4sugar = xstrdup (full_skeleton);
|
||||
strcpy (full_skeleton + pkgdatadirlen + 1, m4bison);
|
||||
full_m4bison = xstrdup (full_skeleton);
|
||||
if (strchr (skeleton, '/'))
|
||||
if (mbschr (skeleton, '/'))
|
||||
strcpy (full_skeleton, skeleton);
|
||||
else
|
||||
strcpy (full_skeleton + pkgdatadirlen + 1, skeleton);
|
||||
|
||||
Reference in New Issue
Block a user