diff options
author | thegeorg <[email protected]> | 2024-06-19 00:45:54 +0300 |
---|---|---|
committer | thegeorg <[email protected]> | 2024-06-19 00:57:49 +0300 |
commit | dac397659bea6624b9b9e1d19139cb617bb7a4d3 (patch) | |
tree | 1887091331a3a2faf216e318a3f99cfc8aa65c2c | |
parent | 78c2ba1e357d7771ebdd4833170f395d9388a6df (diff) |
Revert more bison patches (but be more accurate this time)
ec99123741a115e4fba95ef0478d6b8a4dd9c152
-rw-r--r-- | build/sysincl/misc.yml | 1 | ||||
-rw-r--r-- | contrib/tools/bison/lib/config-linux.h | 2 | ||||
-rw-r--r-- | contrib/tools/bison/lib/config-musl.h | 3 | ||||
-rw-r--r-- | contrib/tools/bison/lib/config-win.h | 1 | ||||
-rw-r--r-- | contrib/tools/bison/lib/config.h | 4 | ||||
-rw-r--r-- | contrib/tools/bison/lib/configmake-linux.h | 1 | ||||
-rw-r--r-- | contrib/tools/bison/lib/configmake-win.h | 2 | ||||
-rw-r--r-- | contrib/tools/bison/lib/timevar.c | 8 | ||||
-rw-r--r-- | contrib/tools/bison/src/files.c | 1 | ||||
-rw-r--r-- | contrib/tools/bison/src/getargs.c | 6 | ||||
-rw-r--r-- | contrib/tools/bison/src/output.c | 2 |
11 files changed, 16 insertions, 15 deletions
diff --git a/build/sysincl/misc.yml b/build/sysincl/misc.yml index c4129f4f75d..6a150cecfd4 100644 --- a/build/sysincl/misc.yml +++ b/build/sysincl/misc.yml @@ -49,7 +49,6 @@ includes: - error.h: contrib/tools/bison/lib/error.h - obstack.h: contrib/tools/bison/lib/obstack.h - - system.h # ucrt headers are included by bison/lib in a very specific way - ../ucrt/fcntl.h - ../ucrt/locale.h diff --git a/contrib/tools/bison/lib/config-linux.h b/contrib/tools/bison/lib/config-linux.h index 8fa4b4f0920..294275396ec 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 M4_GNU_OPTION "--gnu" diff --git a/contrib/tools/bison/lib/config-musl.h b/contrib/tools/bison/lib/config-musl.h new file mode 100644 index 00000000000..d8ad04c19ef --- /dev/null +++ b/contrib/tools/bison/lib/config-musl.h @@ -0,0 +1,3 @@ +#define HAVE_SYS_TIMES_H 1 +#define HAVE_STRUCT_TMS 1 +#define HAVE_CLOCK_T 1 diff --git a/contrib/tools/bison/lib/config-win.h b/contrib/tools/bison/lib/config-win.h index 07248a9798f..eed2ed434e3 100644 --- a/contrib/tools/bison/lib/config-win.h +++ b/contrib/tools/bison/lib/config-win.h @@ -1742,3 +1742,4 @@ enum EWinSdk10ModeBits { }; #define PENDING_OUTPUT_N_BYTES (((TWinSdk10File*)fp)->_ptr - ((TWinSdk10File*)fp)->_base) +#define M4_GNU_OPTION "--gnu" diff --git a/contrib/tools/bison/lib/config.h b/contrib/tools/bison/lib/config.h index 1614a4f2b65..ec0b9be8937 100644 --- a/contrib/tools/bison/lib/config.h +++ b/contrib/tools/bison/lib/config.h @@ -7,3 +7,7 @@ #else # include "config-linux.h" #endif + +#if defined(_musl_) +# include "config-musl.h" +#endif diff --git a/contrib/tools/bison/lib/configmake-linux.h b/contrib/tools/bison/lib/configmake-linux.h index 75ea1d7d03a..510a36f3e8a 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 736cfb1bc69..3efbed28dfd 100644 --- a/contrib/tools/bison/lib/configmake-win.h +++ b/contrib/tools/bison/lib/configmake-win.h @@ -1 +1,3 @@ /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ + +#define LOCALEDIR "C:\\Windows" diff --git a/contrib/tools/bison/lib/timevar.c b/contrib/tools/bison/lib/timevar.c index f6a91f4014c..59a649885af 100644 --- a/contrib/tools/bison/lib/timevar.c +++ b/contrib/tools/bison/lib/timevar.c @@ -22,18 +22,12 @@ #if IN_GCC -#include "system.h" +#error #include "system.h" #include "intl.h" #include "rtl.h" #else -#if defined(_musl_) - #define HAVE_SYS_TIMES_H 1 - #define HAVE_STRUCT_TMS 1 - #define HAVE_CLOCK_T 1 -#endif - /* This source file is taken from the GCC source code, with slight modifications that are under control of the IN_GCC preprocessor variable. The !IN_GCC part of this file is specific to Bison. */ diff --git a/contrib/tools/bison/src/files.c b/contrib/tools/bison/src/files.c index 6d4af3dd53c..d0e61df611f 100644 --- a/contrib/tools/bison/src/files.c +++ b/contrib/tools/bison/src/files.c @@ -161,7 +161,6 @@ compute_exts_from_gf (const char *ext) if (STREQ (ext, ".y")) { src_extension = xstrdup (language->src_extension); - /* header_extension = xstrdup (language->header_extension); */ header_extension = xstrdup(".h"); } else diff --git a/contrib/tools/bison/src/getargs.c b/contrib/tools/bison/src/getargs.c index d63bc7f9f5d..adeaf8756d9 100644 --- a/contrib/tools/bison/src/getargs.c +++ b/contrib/tools/bison/src/getargs.c @@ -476,8 +476,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 +696,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 ()); diff --git a/contrib/tools/bison/src/output.c b/contrib/tools/bison/src/output.c index 9f08095c6b9..b5f098ce549 100644 --- a/contrib/tools/bison/src/output.c +++ b/contrib/tools/bison/src/output.c @@ -563,8 +563,6 @@ muscles_output (FILE *out) | Call the skeleton parser. | `---------------------------*/ -#define M4_GNU_OPTION "--gnu" - static void output_skeleton (void) { |