aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikle Kolyada <zlogene@gentoo.org>2021-04-02 19:39:25 +0300
committerMikle Kolyada <zlogene@gentoo.org>2021-04-02 19:39:25 +0300
commitc16718077011876e531ca9d5ff6fdeaf55175038 (patch)
tree6bd971bc8a7820df65027fc417e7d621f985b66f /2021/patchea/0005-utils-pmx-pmx-src-libf2c-f2c.h-remove-unnecesary-mac.patch
parentmap CC-BY-4.0 license (diff)
downloadtex-c16718077011876e531ca9d5ff6fdeaf55175038.tar.gz
tex-c16718077011876e531ca9d5ff6fdeaf55175038.tar.bz2
tex-c16718077011876e531ca9d5ff6fdeaf55175038.zip
commit patches for texlive 2021
Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
Diffstat (limited to '2021/patchea/0005-utils-pmx-pmx-src-libf2c-f2c.h-remove-unnecesary-mac.patch')
-rw-r--r--2021/patchea/0005-utils-pmx-pmx-src-libf2c-f2c.h-remove-unnecesary-mac.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/2021/patchea/0005-utils-pmx-pmx-src-libf2c-f2c.h-remove-unnecesary-mac.patch b/2021/patchea/0005-utils-pmx-pmx-src-libf2c-f2c.h-remove-unnecesary-mac.patch
new file mode 100644
index 0000000..015bba9
--- /dev/null
+++ b/2021/patchea/0005-utils-pmx-pmx-src-libf2c-f2c.h-remove-unnecesary-mac.patch
@@ -0,0 +1,40 @@
+From 166153198502454a8373e941b80c21ede38ddf3f Mon Sep 17 00:00:00 2001
+From: Mikle Kolyada <zlogene@gentoo.org>
+Date: Sun, 2 Jun 2019 14:38:31 +0300
+Subject: [PATCH 5/6] utils/pmx/pmx-src/libf2c/f2c.h: remove unnecesary macro
+ for abs()
+
+On POSIX systems, abs() is a function provided by your C Standard library,
+so we don't need to define it as a macro. It is dangerous to do so because
+if f2c.h is included before stdlib.h, then then macro breaks the function
+prototype.
+
+See
+
+https://bugs.gentoo.org/show_bug.cgi?id=510770
+
+Signed-off-by: Felix Janda <felix.janda@posteo.de>
+Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
+Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
+---
+ utils/pmx/pmx-src/libf2c/f2c.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/utils/pmx/pmx-src/libf2c/f2c.h b/utils/pmx/pmx-src/libf2c/f2c.h
+index a8d13f6b..22c439c6 100644
+--- a/utils/pmx/pmx-src/libf2c/f2c.h
++++ b/utils/pmx/pmx-src/libf2c/f2c.h
+@@ -162,8 +162,8 @@ struct Namelist {
+ };
+ typedef struct Namelist Namelist;
+
+-#define abs(x) ((x) >= 0 ? (x) : -(x))
+-#define dabs(x) (doublereal)abs(x)
++extern int abs(int x);
++#define dabs(x) ((doublereal)((x) >= 0 ? (x) : -(x)))
+ #undef min
+ #undef max
+ #define min(a,b) ((a) <= (b) ? (a) : (b))
+--
+2.21.0
+