aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorthegeorg <thegeorg@yandex-team.com>2024-10-16 11:55:53 +0300
committerthegeorg <thegeorg@yandex-team.com>2024-10-16 12:08:38 +0300
commitb3b4a0b9681eb0981f9958a426c95a53f79169a7 (patch)
treec619c20fd7c08ca48fe0847014592f2de37f1253
parent06315bfc9a9c00a74cf70cd35d65c959bd036f7c (diff)
downloadydb-b3b4a0b9681eb0981f9958a426c95a53f79169a7.tar.gz
Revert more custom patches from contrib/tools/m4
commit_hash:ad6c09ab078187b788f7aa46b038a2098cd0ea60
-rw-r--r--contrib/tools/m4/lib/c-strcasecmp.c4
-rw-r--r--contrib/tools/m4/lib/c-strncasecmp.c4
-rw-r--r--contrib/tools/m4/lib/clean-temp.c2
-rw-r--r--contrib/tools/m4/lib/closein.c2
-rw-r--r--contrib/tools/m4/lib/malloca.h2
-rw-r--r--contrib/tools/m4/lib/obstack.c26
-rw-r--r--contrib/tools/m4/lib/obstack.h4
-rw-r--r--contrib/tools/m4/lib/tempname.c2
-rw-r--r--contrib/tools/m4/lib/tmpdir.c2
-rw-r--r--contrib/tools/m4/src/m4.h1
-rw-r--r--contrib/tools/m4/src/symtab.c6
11 files changed, 26 insertions, 29 deletions
diff --git a/contrib/tools/m4/lib/c-strcasecmp.c b/contrib/tools/m4/lib/c-strcasecmp.c
index cd4e4d49cb..ef85f0e67d 100644
--- a/contrib/tools/m4/lib/c-strcasecmp.c
+++ b/contrib/tools/m4/lib/c-strcasecmp.c
@@ -26,8 +26,8 @@
int
c_strcasecmp (const char *s1, const char *s2)
{
- const unsigned char *p1 = (const unsigned char *) s1;
- const unsigned char *p2 = (const unsigned char *) s2;
+ register const unsigned char *p1 = (const unsigned char *) s1;
+ register const unsigned char *p2 = (const unsigned char *) s2;
unsigned char c1, c2;
if (p1 == p2)
diff --git a/contrib/tools/m4/lib/c-strncasecmp.c b/contrib/tools/m4/lib/c-strncasecmp.c
index 053c70a73a..04404b00cd 100644
--- a/contrib/tools/m4/lib/c-strncasecmp.c
+++ b/contrib/tools/m4/lib/c-strncasecmp.c
@@ -26,8 +26,8 @@
int
c_strncasecmp (const char *s1, const char *s2, size_t n)
{
- const unsigned char *p1 = (const unsigned char *) s1;
- const unsigned char *p2 = (const unsigned char *) s2;
+ register const unsigned char *p1 = (const unsigned char *) s1;
+ register const unsigned char *p2 = (const unsigned char *) s2;
unsigned char c1, c2;
if (p1 == p2 || n == 0)
diff --git a/contrib/tools/m4/lib/clean-temp.c b/contrib/tools/m4/lib/clean-temp.c
index 2961114168..1053312ecb 100644
--- a/contrib/tools/m4/lib/clean-temp.c
+++ b/contrib/tools/m4/lib/clean-temp.c
@@ -26,7 +26,7 @@
#include <fcntl.h>
#include <limits.h>
#include <stdbool.h>
-#include "stdlib--.h"
+#include <stdlib.h>
#include <string.h>
#include <unistd.h>
diff --git a/contrib/tools/m4/lib/closein.c b/contrib/tools/m4/lib/closein.c
index c9bf73781f..20d5035eec 100644
--- a/contrib/tools/m4/lib/closein.c
+++ b/contrib/tools/m4/lib/closein.c
@@ -21,7 +21,7 @@
#include <errno.h>
#include <stdbool.h>
-#include "stdio--.h"
+#include <stdio.h>
#include <unistd.h>
#include "gettext.h"
diff --git a/contrib/tools/m4/lib/malloca.h b/contrib/tools/m4/lib/malloca.h
index 8ec4465dc7..6fbe45eab6 100644
--- a/contrib/tools/m4/lib/malloca.h
+++ b/contrib/tools/m4/lib/malloca.h
@@ -18,7 +18,7 @@
#ifndef _MALLOCA_H
#define _MALLOCA_H
-#include "palloca.h"
+#include <alloca.h>
#include <stddef.h>
#include <stdlib.h>
diff --git a/contrib/tools/m4/lib/obstack.c b/contrib/tools/m4/lib/obstack.c
index 9b2883e4ac..d915449def 100644
--- a/contrib/tools/m4/lib/obstack.c
+++ b/contrib/tools/m4/lib/obstack.c
@@ -143,7 +143,7 @@ _obstack_begin (struct obstack *h,
void *(*chunkfun) (long),
void (*freefun) (void *))
{
- struct _obstack_chunk *chunk; /* points to new chunk */
+ register struct _obstack_chunk *chunk; /* points to new chunk */
if (alignment == 0)
alignment = DEFAULT_ALIGNMENT;
@@ -190,7 +190,7 @@ _obstack_begin_1 (struct obstack *h, int size, int alignment,
void (*freefun) (void *, void *),
void *arg)
{
- struct _obstack_chunk *chunk; /* points to new chunk */
+ register struct _obstack_chunk *chunk; /* points to new chunk */
if (alignment == 0)
alignment = DEFAULT_ALIGNMENT;
@@ -241,11 +241,11 @@ _obstack_begin_1 (struct obstack *h, int size, int alignment,
void
_obstack_newchunk (struct obstack *h, int length)
{
- struct _obstack_chunk *old_chunk = h->chunk;
- struct _obstack_chunk *new_chunk;
- long new_size;
- long obj_size = h->next_free - h->object_base;
- long i;
+ register struct _obstack_chunk *old_chunk = h->chunk;
+ register struct _obstack_chunk *new_chunk;
+ register long new_size;
+ register long obj_size = h->next_free - h->object_base;
+ register long i;
long already;
char *object_base;
@@ -318,8 +318,8 @@ int _obstack_allocated_p (struct obstack *h, void *obj);
int
_obstack_allocated_p (struct obstack *h, void *obj)
{
- struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
- struct _obstack_chunk *plp; /* point to previous chunk if any */
+ register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
+ register struct _obstack_chunk *plp; /* point to previous chunk if any */
lp = (h)->chunk;
/* We use >= rather than > since the object cannot be exactly at
@@ -341,8 +341,8 @@ _obstack_allocated_p (struct obstack *h, void *obj)
void
__obstack_free (struct obstack *h, void *obj)
{
- struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
- struct _obstack_chunk *plp; /* point to previous chunk if any */
+ register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
+ register struct _obstack_chunk *plp; /* point to previous chunk if any */
lp = h->chunk;
/* We use >= because there cannot be an object at the beginning of a chunk.
@@ -377,8 +377,8 @@ strong_alias (obstack_free, _obstack_free)
int
_obstack_memory_used (struct obstack *h)
{
- struct _obstack_chunk* lp;
- int nbytes = 0;
+ register struct _obstack_chunk* lp;
+ register int nbytes = 0;
for (lp = h->chunk; lp != 0; lp = lp->prev)
{
diff --git a/contrib/tools/m4/lib/obstack.h b/contrib/tools/m4/lib/obstack.h
index 046fc58546..7cf98edbd2 100644
--- a/contrib/tools/m4/lib/obstack.h
+++ b/contrib/tools/m4/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/m4/lib/tempname.c b/contrib/tools/m4/lib/tempname.c
index 9975449a89..087b79b31f 100644
--- a/contrib/tools/m4/lib/tempname.c
+++ b/contrib/tools/m4/lib/tempname.c
@@ -54,7 +54,7 @@
#include <fcntl.h>
#include <sys/time.h>
#include <stdint.h>
-#include "unistd--.h"
+#include <unistd.h>
#include <sys/stat.h>
diff --git a/contrib/tools/m4/lib/tmpdir.c b/contrib/tools/m4/lib/tmpdir.c
index 1b3fb023a0..97fc3ff888 100644
--- a/contrib/tools/m4/lib/tmpdir.c
+++ b/contrib/tools/m4/lib/tmpdir.c
@@ -23,7 +23,7 @@
#include "tmpdir.h"
#include <stdbool.h>
-#include "stdlib--.h"
+#include <stdlib.h>
#include <string.h>
#include <errno.h>
diff --git a/contrib/tools/m4/src/m4.h b/contrib/tools/m4/src/m4.h
index eb2a96784f..96e549eb76 100644
--- a/contrib/tools/m4/src/m4.h
+++ b/contrib/tools/m4/src/m4.h
@@ -28,6 +28,7 @@
#include <ctype.h>
#include <errno.h>
#include <limits.h>
+#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <sys/stat.h>
diff --git a/contrib/tools/m4/src/symtab.c b/contrib/tools/m4/src/symtab.c
index 7448c272cc..fe37bee694 100644
--- a/contrib/tools/m4/src/symtab.c
+++ b/contrib/tools/m4/src/symtab.c
@@ -123,10 +123,10 @@ symtab_init (void)
static size_t M4_GNUC_PURE
hash (const char *s)
{
- size_t val = 0;
+ register size_t val = 0;
- const char *ptr = s;
- char ch;
+ register const char *ptr = s;
+ register char ch;
while ((ch = *ptr++) != '\0')
val = (val << 7) + (val >> (sizeof (val) * CHAR_BIT - 7)) + ch;