Skip to content

Commit b3b4a0b

Browse files
committed
Revert more custom patches from contrib/tools/m4
commit_hash:ad6c09ab078187b788f7aa46b038a2098cd0ea60
1 parent 06315bf commit b3b4a0b

File tree

11 files changed

+26
-29
lines changed

11 files changed

+26
-29
lines changed

contrib/tools/m4/lib/c-strcasecmp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
int
2727
c_strcasecmp (const char *s1, const char *s2)
2828
{
29-
const unsigned char *p1 = (const unsigned char *) s1;
30-
const unsigned char *p2 = (const unsigned char *) s2;
29+
register const unsigned char *p1 = (const unsigned char *) s1;
30+
register const unsigned char *p2 = (const unsigned char *) s2;
3131
unsigned char c1, c2;
3232

3333
if (p1 == p2)

contrib/tools/m4/lib/c-strncasecmp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
int
2727
c_strncasecmp (const char *s1, const char *s2, size_t n)
2828
{
29-
const unsigned char *p1 = (const unsigned char *) s1;
30-
const unsigned char *p2 = (const unsigned char *) s2;
29+
register const unsigned char *p1 = (const unsigned char *) s1;
30+
register const unsigned char *p2 = (const unsigned char *) s2;
3131
unsigned char c1, c2;
3232

3333
if (p1 == p2 || n == 0)

contrib/tools/m4/lib/clean-temp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <fcntl.h>
2727
#include <limits.h>
2828
#include <stdbool.h>
29-
#include "stdlib--.h"
29+
#include <stdlib.h>
3030
#include <string.h>
3131
#include <unistd.h>
3232

contrib/tools/m4/lib/closein.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#include <errno.h>
2323
#include <stdbool.h>
24-
#include "stdio--.h"
24+
#include <stdio.h>
2525
#include <unistd.h>
2626

2727
#include "gettext.h"

contrib/tools/m4/lib/malloca.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#ifndef _MALLOCA_H
1919
#define _MALLOCA_H
2020

21-
#include "palloca.h"
21+
#include <alloca.h>
2222
#include <stddef.h>
2323
#include <stdlib.h>
2424

contrib/tools/m4/lib/obstack.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ _obstack_begin (struct obstack *h,
143143
void *(*chunkfun) (long),
144144
void (*freefun) (void *))
145145
{
146-
struct _obstack_chunk *chunk; /* points to new chunk */
146+
register struct _obstack_chunk *chunk; /* points to new chunk */
147147

148148
if (alignment == 0)
149149
alignment = DEFAULT_ALIGNMENT;
@@ -190,7 +190,7 @@ _obstack_begin_1 (struct obstack *h, int size, int alignment,
190190
void (*freefun) (void *, void *),
191191
void *arg)
192192
{
193-
struct _obstack_chunk *chunk; /* points to new chunk */
193+
register struct _obstack_chunk *chunk; /* points to new chunk */
194194

195195
if (alignment == 0)
196196
alignment = DEFAULT_ALIGNMENT;
@@ -241,11 +241,11 @@ _obstack_begin_1 (struct obstack *h, int size, int alignment,
241241
void
242242
_obstack_newchunk (struct obstack *h, int length)
243243
{
244-
struct _obstack_chunk *old_chunk = h->chunk;
245-
struct _obstack_chunk *new_chunk;
246-
long new_size;
247-
long obj_size = h->next_free - h->object_base;
248-
long i;
244+
register struct _obstack_chunk *old_chunk = h->chunk;
245+
register struct _obstack_chunk *new_chunk;
246+
register long new_size;
247+
register long obj_size = h->next_free - h->object_base;
248+
register long i;
249249
long already;
250250
char *object_base;
251251

@@ -318,8 +318,8 @@ int _obstack_allocated_p (struct obstack *h, void *obj);
318318
int
319319
_obstack_allocated_p (struct obstack *h, void *obj)
320320
{
321-
struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
322-
struct _obstack_chunk *plp; /* point to previous chunk if any */
321+
register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
322+
register struct _obstack_chunk *plp; /* point to previous chunk if any */
323323

324324
lp = (h)->chunk;
325325
/* We use >= rather than > since the object cannot be exactly at
@@ -341,8 +341,8 @@ _obstack_allocated_p (struct obstack *h, void *obj)
341341
void
342342
__obstack_free (struct obstack *h, void *obj)
343343
{
344-
struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
345-
struct _obstack_chunk *plp; /* point to previous chunk if any */
344+
register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
345+
register struct _obstack_chunk *plp; /* point to previous chunk if any */
346346

347347
lp = h->chunk;
348348
/* We use >= because there cannot be an object at the beginning of a chunk.
@@ -377,8 +377,8 @@ strong_alias (obstack_free, _obstack_free)
377377
int
378378
_obstack_memory_used (struct obstack *h)
379379
{
380-
struct _obstack_chunk* lp;
381-
int nbytes = 0;
380+
register struct _obstack_chunk* lp;
381+
register int nbytes = 0;
382382

383383
for (lp = h->chunk; lp != 0; lp = lp->prev)
384384
{

contrib/tools/m4/lib/obstack.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,4 @@ __extension__ \
511511
} /* C++ */
512512
#endif
513513

514-
#if !defined(obstack_printf)
515-
int obstack_printf(struct obstack *obs, const char *format, ...);
516-
#endif
517-
518514
#endif /* obstack.h */

contrib/tools/m4/lib/tempname.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
#include <fcntl.h>
5555
#include <sys/time.h>
5656
#include <stdint.h>
57-
#include "unistd--.h"
57+
#include <unistd.h>
5858

5959
#include <sys/stat.h>
6060

contrib/tools/m4/lib/tmpdir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "tmpdir.h"
2424

2525
#include <stdbool.h>
26-
#include "stdlib--.h"
26+
#include <stdlib.h>
2727
#include <string.h>
2828

2929
#include <errno.h>

contrib/tools/m4/src/m4.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <ctype.h>
2929
#include <errno.h>
3030
#include <limits.h>
31+
#include <stdbool.h>
3132
#include <stdint.h>
3233
#include <string.h>
3334
#include <sys/stat.h>

0 commit comments

Comments
 (0)