mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 23:33:03 +00:00
maint: address sc_bindtextdomain, sc_program_name and sc_prohibit_HAVE_MBRTOWC.
* bootstrap.conf (gnulib_modules): Require progname.
* src/complain.c, src/getargs.c, src/getargs.h, src/main.c: Use it.
* cfg.mk (exclude): New.
Use it.
Skip lib/main.c for bindtextdomain and set_program_name.
(cherry picked from commit 4d699f44e6)
Conflicts:
cfg.mk
This commit is contained in:
@@ -22,7 +22,8 @@ gnulib_modules='
|
|||||||
gettext git-version-gen gitlog-to-changelog
|
gettext git-version-gen gitlog-to-changelog
|
||||||
gpl-3.0 hash inttypes isnan javacomp-script
|
gpl-3.0 hash inttypes isnan javacomp-script
|
||||||
javaexec-script ldexpl maintainer-makefile malloc-gnu mbschr mbsrchr
|
javaexec-script ldexpl maintainer-makefile malloc-gnu mbschr mbsrchr
|
||||||
mbswidth obstack perror pipe-posix quote quotearg realloc-posix
|
mbswidth obstack perror pipe-posix progname
|
||||||
|
quote quotearg realloc-posix
|
||||||
spawn-pipe stdbool stpcpy strdup-posix strerror strtoul strverscmp
|
spawn-pipe stdbool stpcpy strdup-posix strerror strtoul strverscmp
|
||||||
sysexits
|
sysexits
|
||||||
unistd unistd-safer unlocked-io update-copyright unsetenv verify
|
unistd unistd-safer unlocked-io update-copyright unsetenv verify
|
||||||
|
|||||||
19
cfg.mk
19
cfg.mk
@@ -39,9 +39,6 @@ url_dir_list = \
|
|||||||
local-checks-to-skip = \
|
local-checks-to-skip = \
|
||||||
changelog-check \
|
changelog-check \
|
||||||
sc_immutable_NEWS \
|
sc_immutable_NEWS \
|
||||||
sc_bindtextdomain \
|
|
||||||
sc_program_name \
|
|
||||||
sc_prohibit_HAVE_MBRTOWC \
|
|
||||||
sc_prohibit_always-defined_macros \
|
sc_prohibit_always-defined_macros \
|
||||||
sc_prohibit_always_true_header_tests \
|
sc_prohibit_always_true_header_tests \
|
||||||
sc_prohibit_atoi_atof \
|
sc_prohibit_atoi_atof \
|
||||||
@@ -62,9 +59,13 @@ update-copyright: update-b4-copyright update-package-copyright-year
|
|||||||
update-copyright-env = \
|
update-copyright-env = \
|
||||||
UPDATE_COPYRIGHT_FORCE=1 UPDATE_COPYRIGHT_USE_INTERVALS=1
|
UPDATE_COPYRIGHT_FORCE=1 UPDATE_COPYRIGHT_USE_INTERVALS=1
|
||||||
|
|
||||||
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^src/parse-gram.[ch]$$
|
exclude = $(foreach a,$(1),$(eval exclude_file_name_regexp--sc_$(a)))
|
||||||
exclude_file_name_regexp--sc_require_config_h_first = \
|
$(call exclude, \
|
||||||
^(lib/yyerror|data/(glr|yacc))\.c$$
|
bindtextdomain=^lib/main.c$$ \
|
||||||
exclude_file_name_regexp--sc_space_tab = ^tests/(input|c\+\+)\.at$$
|
program_name=^lib/main.c$$ \
|
||||||
exclude_file_name_regexp--sc_trailing_blank = ^src/parse-gram.[ch]$$
|
prohibit_empty_lines_at_EOF=^src/parse-gram.[ch]$$ \
|
||||||
exclude_file_name_regexp--sc_unmarked_diagnostics = ^djgpp/
|
require_config_h_first=^(lib/yyerror|data/(glr|yacc))\.c$$ \
|
||||||
|
space_tab=^tests/(input|c\+\+)\.at$$ \
|
||||||
|
trailing_blank=^src/parse-gram.[ch]$$ \
|
||||||
|
unmarked_diagnostics=^djgpp/ \
|
||||||
|
)
|
||||||
|
|||||||
2
lib/.gitignore
vendored
2
lib/.gitignore
vendored
@@ -264,3 +264,5 @@
|
|||||||
/fpending.c
|
/fpending.c
|
||||||
/fpending.h
|
/fpending.h
|
||||||
/sysexits.in.h
|
/sysexits.in.h
|
||||||
|
/progname.c
|
||||||
|
/progname.h
|
||||||
|
|||||||
@@ -23,6 +23,7 @@
|
|||||||
#include "system.h"
|
#include "system.h"
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
#include <progname.h>
|
||||||
|
|
||||||
#include "complain.h"
|
#include "complain.h"
|
||||||
#include "files.h"
|
#include "files.h"
|
||||||
|
|||||||
@@ -40,6 +40,8 @@
|
|||||||
# undef HACK_FOR___GNU_LIBRARY___PROTOTYPE
|
# undef HACK_FOR___GNU_LIBRARY___PROTOTYPE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <progname.h>
|
||||||
|
|
||||||
#include "complain.h"
|
#include "complain.h"
|
||||||
#include "files.h"
|
#include "files.h"
|
||||||
#include "getargs.h"
|
#include "getargs.h"
|
||||||
@@ -79,8 +81,6 @@ int language_prio = default_prio;
|
|||||||
struct bison_language const *language = &valid_languages[0];
|
struct bison_language const *language = &valid_languages[0];
|
||||||
const char *include = NULL;
|
const char *include = NULL;
|
||||||
|
|
||||||
char *program_name;
|
|
||||||
|
|
||||||
|
|
||||||
/** Decode an option's set of keys.
|
/** Decode an option's set of keys.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include "location.h"
|
#include "location.h"
|
||||||
|
|
||||||
extern char *program_name;
|
|
||||||
enum { command_line_prio, grammar_prio, default_prio };
|
enum { command_line_prio, grammar_prio, default_prio };
|
||||||
|
|
||||||
/* flags set by % directives */
|
/* flags set by % directives */
|
||||||
|
|||||||
@@ -24,6 +24,7 @@
|
|||||||
#include <bitset_stats.h>
|
#include <bitset_stats.h>
|
||||||
#include <bitset.h>
|
#include <bitset.h>
|
||||||
#include <configmake.h>
|
#include <configmake.h>
|
||||||
|
#include <progname.h>
|
||||||
#include <quotearg.h>
|
#include <quotearg.h>
|
||||||
#include <timevar.h>
|
#include <timevar.h>
|
||||||
|
|
||||||
@@ -57,7 +58,7 @@
|
|||||||
int
|
int
|
||||||
main (int argc, char *argv[])
|
main (int argc, char *argv[])
|
||||||
{
|
{
|
||||||
program_name = argv[0];
|
set_program_name (argv[0]);
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
(void) bindtextdomain (PACKAGE, LOCALEDIR);
|
(void) bindtextdomain (PACKAGE, LOCALEDIR);
|
||||||
(void) bindtextdomain ("bison-runtime", LOCALEDIR);
|
(void) bindtextdomain ("bison-runtime", LOCALEDIR);
|
||||||
|
|||||||
Reference in New Issue
Block a user