diff options
author | thegeorg <[email protected]> | 2024-06-16 02:30:08 +0300 |
---|---|---|
committer | thegeorg <[email protected]> | 2024-06-16 02:40:02 +0300 |
commit | f788ebdc078291fe91af02bfa003bc77d6071751 (patch) | |
tree | e46b62f86e81248cf8e8374c7e18670b3a89014b /contrib/tools/bison/lib | |
parent | c45dfbe0ef86ef3d8f91d1547bb16880d87eba4f (diff) |
Sync some bison sources with 3.0 upstream
dbe435b110a9abbac764542e7c2364458b0f4f4c
Diffstat (limited to 'contrib/tools/bison/lib')
-rw-r--r-- | contrib/tools/bison/lib/config-osx.h | 3 | ||||
-rw-r--r-- | contrib/tools/bison/lib/config.h | 10 | ||||
-rw-r--r-- | contrib/tools/bison/lib/fpending.c | 4 | ||||
-rw-r--r-- | contrib/tools/bison/lib/fpending.h | 9 | ||||
-rw-r--r-- | contrib/tools/bison/lib/obstack.h | 4 | ||||
-rw-r--r-- | contrib/tools/bison/lib/obstack_printf.c | 2 | ||||
-rw-r--r-- | contrib/tools/bison/lib/stpcpy.c | 2 | ||||
-rw-r--r-- | contrib/tools/bison/lib/ya.make | 2 |
8 files changed, 17 insertions, 19 deletions
diff --git a/contrib/tools/bison/lib/config-osx.h b/contrib/tools/bison/lib/config-osx.h new file mode 100644 index 00000000000..59bffc235a5 --- /dev/null +++ b/contrib/tools/bison/lib/config-osx.h @@ -0,0 +1,3 @@ +#include "config-linux.h" + +#define PENDING_OUTPUT_N_BYTES 0 diff --git a/contrib/tools/bison/lib/config.h b/contrib/tools/bison/lib/config.h index cfa92dfb9ef..1614a4f2b65 100644 --- a/contrib/tools/bison/lib/config.h +++ b/contrib/tools/bison/lib/config.h @@ -1,5 +1,9 @@ -#ifdef _MSC_VER - #include "config-win.h" +#pragma once + +#if defined(__APPLE__) +# include "config-osx.h" +#elif defined(_MSC_VER) +# include "config-win.h" #else - #include "config-linux.h" +# include "config-linux.h" #endif diff --git a/contrib/tools/bison/lib/fpending.c b/contrib/tools/bison/lib/fpending.c index 1bc4568923a..e917f4f15f6 100644 --- a/contrib/tools/bison/lib/fpending.c +++ b/contrib/tools/bison/lib/fpending.c @@ -26,9 +26,5 @@ size_t __fpending (FILE *fp) { -#if defined(PENDING_OUTPUT_N_BYTES) return PENDING_OUTPUT_N_BYTES; -#endif - - return 0; } diff --git a/contrib/tools/bison/lib/fpending.h b/contrib/tools/bison/lib/fpending.h index 4eca3f18e17..bf40d3732e7 100644 --- a/contrib/tools/bison/lib/fpending.h +++ b/contrib/tools/bison/lib/fpending.h @@ -20,10 +20,11 @@ #include <stddef.h> #include <stdio.h> -#if HAVE_STDIO_EXT_H -# include <stdio_ext.h> -#endif -#ifndef __fpending +#if HAVE_DECL___FPENDING +# if HAVE_STDIO_EXT_H +# include <stdio_ext.h> +# endif +#else size_t __fpending (FILE *); #endif diff --git a/contrib/tools/bison/lib/obstack.h b/contrib/tools/bison/lib/obstack.h index 046fc58546f..7cf98edbd2c 100644 --- a/contrib/tools/bison/lib/obstack.h +++ b/contrib/tools/bison/lib/obstack.h @@ -511,8 +511,4 @@ __extension__ \ } /* C++ */ #endif -#if !defined(obstack_printf) -int obstack_printf(struct obstack *obs, const char *format, ...); -#endif - #endif /* obstack.h */ diff --git a/contrib/tools/bison/lib/obstack_printf.c b/contrib/tools/bison/lib/obstack_printf.c index 291dcd52a47..6e34cc1b346 100644 --- a/contrib/tools/bison/lib/obstack_printf.c +++ b/contrib/tools/bison/lib/obstack_printf.c @@ -26,8 +26,6 @@ #include <stdarg.h> #include <stdlib.h> -int obstack_vprintf(struct obstack *obs, const char *format, va_list args); - /* Grow an obstack with formatted output. Return the number of bytes added to OBS. No trailing nul byte is added, and the object should be closed with obstack_finish before use. diff --git a/contrib/tools/bison/lib/stpcpy.c b/contrib/tools/bison/lib/stpcpy.c index 01b70c3b791..8d7dfb07a9a 100644 --- a/contrib/tools/bison/lib/stpcpy.c +++ b/contrib/tools/bison/lib/stpcpy.c @@ -23,7 +23,7 @@ #include <string.h> #undef __stpcpy -#if defined(_LIBC) || (defined(__MACH__) && defined(stpcpy)) +#ifdef _LIBC # undef stpcpy #endif diff --git a/contrib/tools/bison/lib/ya.make b/contrib/tools/bison/lib/ya.make index 1cfc9e742e5..fe836e8ed75 100644 --- a/contrib/tools/bison/lib/ya.make +++ b/contrib/tools/bison/lib/ya.make @@ -81,7 +81,6 @@ SRCS( quotearg.c sig-handler.c spawn-pipe.c - stpcpy.c stripslash.c timevar.c unistd.c @@ -121,6 +120,7 @@ IF (OS_WINDOWS) raise.c sigaction.c sigprocmask.c + stpcpy.c strndup.c waitpid.c wcwidth.c |