3
0
gettext-runtime/gettext-0.12.1-sigfpe.patch
Dirk Mueller 9efda21c11 replace with upstream patch
- Use %autosetup
- Add reproducible-jar.patch to use a constant jar mtime
  for bit-reproducible builds

OBS-URL: https://build.opensuse.org/package/show/Base:System/gettext-runtime?expand=0&rev=200
2024-07-18 08:43:30 +00:00

48 lines
1.5 KiB
Diff

Index: gettext-runtime/intl/dcigettext.c
===================================================================
--- a/gettext-runtime/intl/dcigettext.c.orig 2010-06-06 14:49:57.000000000 +0200
+++ b/gettext-runtime/intl/dcigettext.c 2010-12-20 18:47:11.543133542 +0100
@@ -68,20 +68,7 @@ extern int errno;
#endif
#include <locale.h>
-
-#ifdef _LIBC
- /* Guess whether integer division by zero raises signal SIGFPE.
- Set to 1 only if you know for sure. In case of doubt, set to 0. */
-# if defined __alpha__ || defined __arm__ || defined __i386__ \
- || defined __m68k__ || defined __s390__
-# define INTDIV0_RAISES_SIGFPE 1
-# else
-# define INTDIV0_RAISES_SIGFPE 0
-# endif
-#endif
-#if !INTDIV0_RAISES_SIGFPE
-# include <signal.h>
-#endif
+#include <signal.h>
#if defined HAVE_SYS_PARAM_H || defined _LIBC
# include <sys/param.h>
Index: gettext-runtime/intl/eval-plural.h
===================================================================
--- a/gettext-runtime/intl/eval-plural.h.orig 2010-06-06 14:49:57.000000000 +0200
+++ b/gettext-runtime/intl/eval-plural.h 2010-12-20 18:48:36.928872823 +0100
@@ -62,16 +62,12 @@ plural_eval (const struct expression *pe
case mult:
return leftarg * rightarg;
case divide:
-#if !INTDIV0_RAISES_SIGFPE
if (rightarg == 0)
raise (SIGFPE);
-#endif
return leftarg / rightarg;
case module:
-#if !INTDIV0_RAISES_SIGFPE
if (rightarg == 0)
raise (SIGFPE);
-#endif
return leftarg % rightarg;
case plus:
return leftarg + rightarg;