aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.com>2024-06-16 21:14:11 +0300
committerthegeorg <thegeorg@yandex-team.com>2024-06-16 21:24:07 +0300
commitbe56f24a02c348ff838c00269b9fb9ed8857a07c (patch)
treeef8a9cf2d466b5a30f9ca00ec3a6addef18b38b9 /contrib/tools
parentfd7315d701b28eebd59613f51e3f83cc77cb6eba (diff)
downloadydb-be56f24a02c348ff838c00269b9fb9ed8857a07c.tar.gz
Restore bison's --print-localedir option (which will yield weird results in runtime though)
55fd53701f86aa798c20ad45965d5e4a64ddedf9
Diffstat (limited to 'contrib/tools')
-rw-r--r--contrib/tools/bison/lib/config-linux.h2
-rw-r--r--contrib/tools/bison/lib/config-win.h3
-rw-r--r--contrib/tools/bison/lib/configmake-linux.h1
-rw-r--r--contrib/tools/bison/lib/configmake-win.h2
-rw-r--r--contrib/tools/bison/lib/configmake.h8
-rw-r--r--contrib/tools/bison/src/getargs.c17
6 files changed, 24 insertions, 9 deletions
diff --git a/contrib/tools/bison/lib/config-linux.h b/contrib/tools/bison/lib/config-linux.h
index 8fa4b4f092..26302ef536 100644
--- a/contrib/tools/bison/lib/config-linux.h
+++ b/contrib/tools/bison/lib/config-linux.h
@@ -1804,3 +1804,5 @@
/* Define as a macro for copying va_list variables. */
/* #undef va_copy */
+
+#define PACKAGE_COPYRIGHT_YEAR 2013
diff --git a/contrib/tools/bison/lib/config-win.h b/contrib/tools/bison/lib/config-win.h
index cb29c4cc78..17a8033596 100644
--- a/contrib/tools/bison/lib/config-win.h
+++ b/contrib/tools/bison/lib/config-win.h
@@ -1709,3 +1709,6 @@ char *strsignal (int signum);
/* Define as a macro for copying va_list variables. */
#define va_copy gl_va_copy
+
+#define PACKAGE_COPYRIGHT_YEAR 2013
+#define LC_MESSAGES LC_ALL
diff --git a/contrib/tools/bison/lib/configmake-linux.h b/contrib/tools/bison/lib/configmake-linux.h
index 75ea1d7d03..510a36f3e8 100644
--- a/contrib/tools/bison/lib/configmake-linux.h
+++ b/contrib/tools/bison/lib/configmake-linux.h
@@ -1,3 +1,4 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
#define LIBDIR "/usr/local/lib"
+#define LOCALEDIR "/var/empty/bison-3.0/share/locale"
diff --git a/contrib/tools/bison/lib/configmake-win.h b/contrib/tools/bison/lib/configmake-win.h
index 736cfb1bc6..41ddc3dfcb 100644
--- a/contrib/tools/bison/lib/configmake-win.h
+++ b/contrib/tools/bison/lib/configmake-win.h
@@ -1 +1 @@
-/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
+#define LOCALEDIR ""
diff --git a/contrib/tools/bison/lib/configmake.h b/contrib/tools/bison/lib/configmake.h
index 8a93b4272b..18b15176ab 100644
--- a/contrib/tools/bison/lib/configmake.h
+++ b/contrib/tools/bison/lib/configmake.h
@@ -1,5 +1,7 @@
-#ifdef _MSC_VER
- #include "configmake-win.h"
+#pragma once
+
+#if defined(_MSC_VER)
+# include "configmake-win.h"
#else
- #include "configmake-linux.h"
+# include "configmake-linux.h"
#endif
diff --git a/contrib/tools/bison/src/getargs.c b/contrib/tools/bison/src/getargs.c
index d63bc7f9f5..7c6fcf7d34 100644
--- a/contrib/tools/bison/src/getargs.c
+++ b/contrib/tools/bison/src/getargs.c
@@ -365,6 +365,15 @@ FEATURE is a list of comma separated words that can include:\n\
/* Don't output this redundant message for English locales.
Note we still output for 'C' so that it gets included in the
man page. */
+ const char *lc_messages = setlocale (LC_MESSAGES, NULL);
+ if (lc_messages && !STREQ (lc_messages, "en_"))
+ /* TRANSLATORS: Replace LANG_CODE in this URL with your language
+ code <http://translationproject.org/team/LANG_CODE.html> to
+ form one of the URLs at http://translationproject.org/team/.
+ Otherwise, replace the entire URL with your translation team's
+ email address. */
+ fputs (_("Report translation bugs to "
+ "<http://translationproject.org/team/>.\n"), stdout);
fputs (_("For complete documentation, run: info bison.\n"), stdout);
}
@@ -388,7 +397,7 @@ version (void)
fprintf (stdout,
_("Copyright (C) %d Free Software Foundation, Inc.\n"),
- 2013);
+ PACKAGE_COPYRIGHT_YEAR);
fputs (_("\
This is free software; see the source for copying conditions. There is NO\n\
@@ -476,8 +485,8 @@ enum
LOCATIONS_OPTION = CHAR_MAX + 1,
PRINT_LOCALEDIR_OPTION,
PRINT_DATADIR_OPTION,
- REPORT_FILE_OPTION,
- M4_PATH
+ M4_PATH,
+ REPORT_FILE_OPTION
};
static struct option const long_options[] =
@@ -696,11 +705,9 @@ getargs (int argc, char *argv[])
command_line_location (), true);
break;
-#if 0
case PRINT_LOCALEDIR_OPTION:
printf ("%s\n", LOCALEDIR);
exit (EXIT_SUCCESS);
-#endif
case PRINT_DATADIR_OPTION:
printf ("%s\n", pkgdatadir ());