Accepting request 909988 from Base:System
- gnulib-c-stack.patch: Fix AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC configure check (forwarded request 909987 from Andreas_Schwab) OBS-URL: https://build.opensuse.org/request/show/909988 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/grep?expand=0&rev=78
This commit is contained in:
commit
2b4051f1b3
170
gnulib-c-stack.patch
Normal file
170
gnulib-c-stack.patch
Normal file
@ -0,0 +1,170 @@
|
||||
Index: grep-3.6/configure
|
||||
===================================================================
|
||||
--- grep-3.6.orig/configure
|
||||
+++ grep-3.6/configure
|
||||
@@ -8603,13 +8603,11 @@ else
|
||||
# include <sys/time.h>
|
||||
# include <sys/resource.h>
|
||||
#endif
|
||||
- #ifndef SIGSTKSZ
|
||||
- # define SIGSTKSZ 16384
|
||||
- #endif
|
||||
+ #define alt_SIGSTKSZ 16384
|
||||
|
||||
static union
|
||||
{
|
||||
- char buffer[2 * SIGSTKSZ];
|
||||
+ char buffer[2 * alt_SIGSTKSZ];
|
||||
long double ld;
|
||||
long u;
|
||||
void *p;
|
||||
@@ -8630,8 +8628,8 @@ else
|
||||
|
||||
st.ss_flags = 0;
|
||||
/* Use the midpoint to avoid Irix sigaltstack bug. */
|
||||
- st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
|
||||
- st.ss_size = SIGSTKSZ;
|
||||
+ st.ss_sp = alternate_signal_stack.buffer + alt_SIGSTKSZ;
|
||||
+ st.ss_size = alt_SIGSTKSZ;
|
||||
r = sigaltstack (&st, 0);
|
||||
if (r != 0)
|
||||
return 1;
|
||||
@@ -8721,9 +8719,7 @@ else
|
||||
#if HAVE_SYS_SIGNAL_H
|
||||
# include <sys/signal.h>
|
||||
#endif
|
||||
-#ifndef SIGSTKSZ
|
||||
-# define SIGSTKSZ 16384
|
||||
-#endif
|
||||
+#define alt_SIGSTKSZ 16384
|
||||
volatile char *stack_lower_bound;
|
||||
volatile char *stack_upper_bound;
|
||||
static void check_stack_location (volatile char *addr)
|
||||
@@ -8740,12 +8736,12 @@ static void stackoverflow_handler (int s
|
||||
}
|
||||
int main ()
|
||||
{
|
||||
- char mystack[2 * SIGSTKSZ];
|
||||
+ char mystack[2 * alt_SIGSTKSZ];
|
||||
stack_t altstack;
|
||||
struct sigaction action;
|
||||
/* Install the alternate stack. */
|
||||
- altstack.ss_sp = mystack + SIGSTKSZ;
|
||||
- altstack.ss_size = SIGSTKSZ;
|
||||
+ altstack.ss_sp = mystack + alt_SIGSTKSZ;
|
||||
+ altstack.ss_size = alt_SIGSTKSZ;
|
||||
stack_lower_bound = (char *) altstack.ss_sp;
|
||||
stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1;
|
||||
altstack.ss_flags = 0; /* no SS_DISABLE */
|
||||
@@ -8809,13 +8805,11 @@ else
|
||||
# include <sys/time.h>
|
||||
# include <sys/resource.h>
|
||||
#endif
|
||||
- #ifndef SIGSTKSZ
|
||||
- # define SIGSTKSZ 16384
|
||||
- #endif
|
||||
+ #define alt_SIGSTKSZ 16384
|
||||
|
||||
static union
|
||||
{
|
||||
- char buffer[2 * SIGSTKSZ];
|
||||
+ char buffer[2 * alt_SIGSTKSZ];
|
||||
long double ld;
|
||||
long u;
|
||||
void *p;
|
||||
@@ -8865,8 +8859,8 @@ else
|
||||
|
||||
st.ss_flags = 0;
|
||||
/* Use the midpoint to avoid Irix sigaltstack bug. */
|
||||
- st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
|
||||
- st.ss_size = SIGSTKSZ;
|
||||
+ st.ss_sp = alternate_signal_stack.buffer + alt_SIGSTKSZ;
|
||||
+ st.ss_size = alt_SIGSTKSZ;
|
||||
r = sigaltstack (&st, 0);
|
||||
if (r != 0)
|
||||
return 1;
|
||||
Index: grep-3.6/m4/c-stack.m4
|
||||
===================================================================
|
||||
--- grep-3.6.orig/m4/c-stack.m4
|
||||
+++ grep-3.6/m4/c-stack.m4
|
||||
@@ -44,13 +44,11 @@ AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEUR
|
||||
# include <sys/time.h>
|
||||
# include <sys/resource.h>
|
||||
#endif
|
||||
- #ifndef SIGSTKSZ
|
||||
- # define SIGSTKSZ 16384
|
||||
- #endif
|
||||
+ #define alt_SIGSTKSZ 16384
|
||||
|
||||
static union
|
||||
{
|
||||
- char buffer[2 * SIGSTKSZ];
|
||||
+ char buffer[2 * alt_SIGSTKSZ];
|
||||
long double ld;
|
||||
long u;
|
||||
void *p;
|
||||
@@ -71,8 +69,8 @@ AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEUR
|
||||
|
||||
st.ss_flags = 0;
|
||||
/* Use the midpoint to avoid Irix sigaltstack bug. */
|
||||
- st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
|
||||
- st.ss_size = SIGSTKSZ;
|
||||
+ st.ss_sp = alternate_signal_stack.buffer + alt_SIGSTKSZ;
|
||||
+ st.ss_size = alt_SIGSTKSZ;
|
||||
r = sigaltstack (&st, 0);
|
||||
if (r != 0)
|
||||
return 1;
|
||||
@@ -149,9 +147,7 @@ AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEUR
|
||||
#if HAVE_SYS_SIGNAL_H
|
||||
# include <sys/signal.h>
|
||||
#endif
|
||||
-#ifndef SIGSTKSZ
|
||||
-# define SIGSTKSZ 16384
|
||||
-#endif
|
||||
+#define alt_SIGSTKSZ 16384
|
||||
volatile char *stack_lower_bound;
|
||||
volatile char *stack_upper_bound;
|
||||
static void check_stack_location (volatile char *addr)
|
||||
@@ -168,12 +164,12 @@ static void stackoverflow_handler (int s
|
||||
}
|
||||
int main ()
|
||||
{
|
||||
- char mystack[2 * SIGSTKSZ];
|
||||
+ char mystack[2 * alt_SIGSTKSZ];
|
||||
stack_t altstack;
|
||||
struct sigaction action;
|
||||
/* Install the alternate stack. */
|
||||
- altstack.ss_sp = mystack + SIGSTKSZ;
|
||||
- altstack.ss_size = SIGSTKSZ;
|
||||
+ altstack.ss_sp = mystack + alt_SIGSTKSZ;
|
||||
+ altstack.ss_size = alt_SIGSTKSZ;
|
||||
stack_lower_bound = (char *) altstack.ss_sp;
|
||||
stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1;
|
||||
altstack.ss_flags = 0; /* no SS_DISABLE */
|
||||
@@ -223,13 +219,11 @@ int main ()
|
||||
# include <sys/time.h>
|
||||
# include <sys/resource.h>
|
||||
#endif
|
||||
- #ifndef SIGSTKSZ
|
||||
- # define SIGSTKSZ 16384
|
||||
- #endif
|
||||
+ #define alt_SIGSTKSZ 16384
|
||||
|
||||
static union
|
||||
{
|
||||
- char buffer[2 * SIGSTKSZ];
|
||||
+ char buffer[2 * alt_SIGSTKSZ];
|
||||
long double ld;
|
||||
long u;
|
||||
void *p;
|
||||
@@ -279,8 +273,8 @@ int main ()
|
||||
|
||||
st.ss_flags = 0;
|
||||
/* Use the midpoint to avoid Irix sigaltstack bug. */
|
||||
- st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ;
|
||||
- st.ss_size = SIGSTKSZ;
|
||||
+ st.ss_sp = alternate_signal_stack.buffer + alt_SIGSTKSZ;
|
||||
+ st.ss_size = alt_SIGSTKSZ;
|
||||
r = sigaltstack (&st, 0);
|
||||
if (r != 0)
|
||||
return 1;
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 3 12:17:24 UTC 2021 - Andreas Schwab <schwab@suse.de>
|
||||
|
||||
- gnulib-c-stack.patch: Fix AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC configure
|
||||
check
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Nov 28 09:48:12 UTC 2020 - Andreas Stieger <andreas.stieger@gmx.de>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package grep
|
||||
#
|
||||
# Copyright (c) 2020 SUSE LLC
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -29,6 +29,7 @@ Source3: https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=gr
|
||||
Source4: profile.sh
|
||||
Source5: %{name}-rpmlintrc
|
||||
Patch0: werror-return-type.patch
|
||||
Patch1: gnulib-c-stack.patch
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: makeinfo
|
||||
BuildRequires: pcre-devel
|
||||
@ -43,6 +44,8 @@ match to a specified pattern. By default, grep prints the matching lines.
|
||||
%prep
|
||||
%autosetup -p1
|
||||
|
||||
touch aclocal.m4 configure Makefile.in config.hin
|
||||
|
||||
%build
|
||||
%configure \
|
||||
--disable-silent-rules \
|
||||
|
Loading…
Reference in New Issue
Block a user