aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.com>2024-06-16 02:30:08 +0300
committerthegeorg <thegeorg@yandex-team.com>2024-06-16 02:40:02 +0300
commitf788ebdc078291fe91af02bfa003bc77d6071751 (patch)
treee46b62f86e81248cf8e8374c7e18670b3a89014b /contrib/tools
parentc45dfbe0ef86ef3d8f91d1547bb16880d87eba4f (diff)
downloadydb-f788ebdc078291fe91af02bfa003bc77d6071751.tar.gz
Sync some bison sources with 3.0 upstream
dbe435b110a9abbac764542e7c2364458b0f4f4c
Diffstat (limited to 'contrib/tools')
-rw-r--r--contrib/tools/bison/README-alpha30
-rw-r--r--contrib/tools/bison/lib/config-osx.h3
-rw-r--r--contrib/tools/bison/lib/config.h10
-rw-r--r--contrib/tools/bison/lib/fpending.c4
-rw-r--r--contrib/tools/bison/lib/fpending.h9
-rw-r--r--contrib/tools/bison/lib/obstack.h4
-rw-r--r--contrib/tools/bison/lib/obstack_printf.c2
-rw-r--r--contrib/tools/bison/lib/stpcpy.c2
-rw-r--r--contrib/tools/bison/lib/ya.make2
9 files changed, 17 insertions, 49 deletions
diff --git a/contrib/tools/bison/README-alpha b/contrib/tools/bison/README-alpha
deleted file mode 100644
index cf065eed34..0000000000
--- a/contrib/tools/bison/README-alpha
+++ /dev/null
@@ -1,30 +0,0 @@
--*- text -*-
-
-This is a test release of this package. Using it more or less
-implicitly signs you up to help us find whatever problems you report.
-
-The documentation still needs more work. Suggestions welcome.
-Patches even more welcome.
-
-Please send comments and problem reports about this test release to
-<bug-bison@gnu.org>. This program will get better only if you report
-the problems you encounter.
-
------
-
-Copyright (C) 2002, 2004, 2009-2013 Free Software Foundation, Inc.
-
-This file is part of GNU Bison.
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/contrib/tools/bison/lib/config-osx.h b/contrib/tools/bison/lib/config-osx.h
new file mode 100644
index 0000000000..59bffc235a
--- /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 cfa92dfb9e..1614a4f2b6 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 1bc4568923..e917f4f15f 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 4eca3f18e1..bf40d3732e 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 046fc58546..7cf98edbd2 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 291dcd52a4..6e34cc1b34 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 01b70c3b79..8d7dfb07a9 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 1cfc9e742e..fe836e8ed7 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