Skip to content

Commit 2df4b12

Browse files
committed
Revert more patches applied to contrib/tools/m4
commit_hash:fb87ade017a656215b6a71fc4504fb2c07c3b370
1 parent 77bb438 commit 2df4b12

File tree

6 files changed

+2
-282
lines changed

6 files changed

+2
-282
lines changed

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ typedef struct sigaltstack stack_t;
5252
#endif
5353
#ifndef SIGSTKSZ
5454
# define SIGSTKSZ 16384
55-
#elif defined __USE_DYNAMIC_STACK_SIZE
56-
/* Redefining SIGSTKSZ here as dynamic stack size is not supported in this version of bison */
57-
# undef SIGSTKSZ
58-
# define SIGSTKSZ 16384
5955
#elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
6056
/* libsigsegv 2.6 through 2.8 have a bug where some architectures use
6157
more than the Linux default of an 8k alternate stack when deciding
@@ -76,7 +72,7 @@ typedef struct sigaltstack stack_t;
7672
#include <unistd.h>
7773

7874
#if HAVE_LIBSIGSEGV
79-
# include <sigsegv.h>
75+
# error #include <sigsegv.h>
8076
#endif
8177

8278
#include "c-stack.h"
@@ -327,10 +323,7 @@ c_stack_action (void (*action) (int))
327323
int
328324
c_stack_action (void (*action) (int) __attribute__ ((unused)))
329325
{
330-
#if (defined _MSC_VER) && (_MSC_VER < 1800)
331-
#else
332326
errno = ENOTSUP;
333-
#endif
334327
return -1;
335328
}
336329

contrib/tools/m4/lib/sigsegv.h

Lines changed: 0 additions & 243 deletions
This file was deleted.

contrib/tools/m4/lib/vasnprintf.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
# include <config.h>
5555
#endif
5656
#ifndef IN_LIBINTL
57-
# include "palloca.h"
57+
# include <alloca.h>
5858
#endif
5959

6060
/* Specification. */
@@ -5575,10 +5575,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
55755575
if (buf_malloced != NULL)
55765576
free (buf_malloced);
55775577
CLEANUP ();
5578-
#if (defined _MSC_VER) && (_MSC_VER < 1800)
5579-
#else
55805578
errno = EOVERFLOW;
5581-
#endif
55825579
return NULL;
55835580
#endif
55845581

contrib/tools/m4/lib/vasprintf.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@ vasprintf (char **resultp, const char *format, va_list args)
4040
if (length > INT_MAX)
4141
{
4242
free (result);
43-
#if (defined _MSC_VER) && (_MSC_VER < 1800)
44-
#else
4543
errno = EOVERFLOW;
46-
#endif
4744
return -1;
4845
}
4946

contrib/tools/m4/lib/xstrndup.c

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,25 +21,8 @@
2121
#include "xstrndup.h"
2222

2323
#include <string.h>
24-
#include <stdlib.h>
25-
2624
#include "xalloc.h"
2725

28-
#if defined(_MSC_VER)
29-
static char *
30-
strndup(char const *s, size_t n)
31-
{
32-
size_t len = strnlen(s, n);
33-
char *new = malloc(len + 1);
34-
35-
if (new == NULL)
36-
return NULL;
37-
38-
new[len] = '\0';
39-
return memcpy(new, s, len);
40-
}
41-
#endif
42-
4326
/* Return a newly allocated copy of at most N bytes of STRING.
4427
In other words, return a copy of the initial segment of length N of
4528
STRING. */

contrib/tools/m4/lib/xvasprintf.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,7 @@ xstrcat (size_t argcount, va_list args)
5353
vasprintf(). */
5454
if (totalsize == SIZE_MAX || totalsize > INT_MAX)
5555
{
56-
#if (defined _MSC_VER) && (_MSC_VER < 1800)
57-
#else
5856
errno = EOVERFLOW;
59-
#endif
6057
return NULL;
6158
}
6259

@@ -75,10 +72,6 @@ xstrcat (size_t argcount, va_list args)
7572
return result;
7673
}
7774

78-
#if defined(_MSC_VER)
79-
int vasprintf(char **resultp, const char *format, va_list args);
80-
#endif
81-
8275
char *
8376
xvasprintf (const char *format, va_list args)
8477
{

0 commit comments

Comments
 (0)