Gentoo Archives: gentoo-commits

From: "Anthony G. Basile (blueness)" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/texlive/2012/texlive-core: 130_all_remove_define_abs.patch
Date: Tue, 28 Apr 2015 14:35:47
Message-Id: 20150428103046.CBBE69A0@oystercatcher.gentoo.org
1 blueness 15/04/28 10:30:45
2
3 Modified: 130_all_remove_define_abs.patch
4 Log:
5 Fix removal of macro definition of abs(). Bug #510770.
6
7 Revision Changes Path
8 1.2 src/patchsets/texlive/2012/texlive-core/130_all_remove_define_abs.patch
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/texlive/2012/texlive-core/130_all_remove_define_abs.patch?rev=1.2&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/texlive/2012/texlive-core/130_all_remove_define_abs.patch?rev=1.2&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo/src/patchsets/texlive/2012/texlive-core/130_all_remove_define_abs.patch?r1=1.1&r2=1.2
13
14 Index: 130_all_remove_define_abs.patch
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo/src/patchsets/texlive/2012/texlive-core/130_all_remove_define_abs.patch,v
17 retrieving revision 1.1
18 retrieving revision 1.2
19 diff -u -r1.1 -r1.2
20 --- 130_all_remove_define_abs.patch 28 Feb 2015 16:48:16 -0000 1.1
21 +++ 130_all_remove_define_abs.patch 28 Apr 2015 10:30:45 -0000 1.2
22 @@ -1,24 +1,28 @@
23 -utils/pmx/pmx-2.6.18/libf2c/f2c.h: remove unnecesary macro for abs()
24 +utils/pmx/pmx-2.7.0/libf2c/f2c.h: remove unnecesary macro for abs()
25
26 On POSIX systems, abs() is a function provided by your C Standard library,
27 so we don't need to define it as a macro. It is dangerous to do so because
28 if f2c.h is included before stdlib.h, then then macro breaks the function
29 prototype.
30
31 -We just remove it. See
32 +See
33
34 https://bugs.gentoo.org/show_bug.cgi?id=510770
35
36 +Signed-off-by: Felix Janda <felix.janda@××××××.de>
37 Signed-off-by: Anthony G. Basile <blueness@g.o>
38
39 -diff -Naur texlive-20120701-source.orig/utils/pmx/pmx-2.6.18/libf2c/f2c.h texlive-20120701-source/utils/pmx/pmx-2.6.18/libf2c/f2c.h
40 ---- texlive-20120701-source.orig/utils/pmx/pmx-2.6.18/libf2c/f2c.h 2012-05-20 10:47:27.000000000 +0000
41 -+++ texlive-20120701-source/utils/pmx/pmx-2.6.18/libf2c/f2c.h 2014-05-15 17:16:37.030402773 +0000
42 -@@ -157,7 +157,6 @@
43 +diff -ur a/texlive-20120701-source/utils/pmx/pmx-2.6.18/libf2c/f2c.h b/texlive-20120701-source/utils/pmx/pmx-2.6.18/libf2c/f2c.h
44 +--- a/texlive-20120701-source/utils/pmx/pmx-2.6.18/libf2c/f2c.h 2012-05-20 12:47:27.000000000 -0200
45 ++++ b/texlive-20120701-source/utils/pmx/pmx-2.6.18/libf2c/f2c.h 2015-04-11 17:10:01.710633750 -0200
46 +@@ -157,8 +157,8 @@
47 };
48 typedef struct Namelist Namelist;
49
50 -#define abs(x) ((x) >= 0 ? (x) : -(x))
51 - #define dabs(x) (doublereal)abs(x)
52 +-#define dabs(x) (doublereal)abs(x)
53 ++extern int abs(int x);
54 ++#define dabs(x) ((doublereal)((x) >= 0 ? (x) : -(x)))
55 #define min(a,b) ((a) <= (b) ? (a) : (b))
56 #define max(a,b) ((a) >= (b) ? (a) : (b))
57 + #define dmin(a,b) (doublereal)min(a,b)