Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 396902 Details for
Bug 510770
app-text/texlive-core: should not define a macro for abs()
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch against SVN head for upstream.
use-system-abs.patch (text/plain), 3.53 KB, created by
Anthony Basile
on 2015-02-18 23:36:57 UTC
(
hide
)
Description:
Patch against SVN head for upstream.
Filename:
MIME Type:
Creator:
Anthony Basile
Created:
2015-02-18 23:36:57 UTC
Size:
3.53 KB
patch
obsolete
>utils/pmx/pmx-2.7.0/libf2c/f2c.h: define abs() macro only if not provided by C Standard Lib. > >The following macro > > #define abs(x) ((x) >= 0 ? (x) : -(x)) > >in defined utils/pmx/pmx-2.7.0/libf2c/f2c.h. However, abs() is a POSIX function >prototyped in stdlib.h. So if f2c.h is pulled in before stdlib.h in any code, >then the protoype is munged by the macro. This happens when building pmx >with recent versions of uClibc. > >We correct this by falling back on defining abs() as a macro only if its not >available as a function. > >Signed-off-by: Anthony G. Basile <blueness@gentoo.org> > >diff -Naur source.orig/utils/pmx/config.h.in source/utils/pmx/config.h.in >--- source.orig/utils/pmx/config.h.in 1969-12-31 19:00:00.000000000 -0500 >+++ source/utils/pmx/config.h.in 2015-02-18 16:30:44.635003304 -0500 >@@ -0,0 +1,61 @@ >+/* config.h.in. Generated from configure.ac by autoheader. */ >+ >+/* Define to 1 if you have the `abs' function. */ >+#undef HAVE_ABS >+ >+/* Define to 1 if you have the <inttypes.h> header file. */ >+#undef HAVE_INTTYPES_H >+ >+/* Define to 1 if you have the <memory.h> header file. */ >+#undef HAVE_MEMORY_H >+ >+/* Define to 1 if you have the <stdint.h> header file. */ >+#undef HAVE_STDINT_H >+ >+/* Define to 1 if you have the <stdlib.h> header file. */ >+#undef HAVE_STDLIB_H >+ >+/* Define to 1 if you have the <strings.h> header file. */ >+#undef HAVE_STRINGS_H >+ >+/* Define to 1 if you have the <string.h> header file. */ >+#undef HAVE_STRING_H >+ >+/* Define to 1 if you have the <sys/stat.h> header file. */ >+#undef HAVE_SYS_STAT_H >+ >+/* Define to 1 if you have the <sys/types.h> header file. */ >+#undef HAVE_SYS_TYPES_H >+ >+/* Define to 1 if you have the <unistd.h> header file. */ >+#undef HAVE_UNISTD_H >+ >+/* Name of package */ >+#undef PACKAGE >+ >+/* Define to the address where bug reports for this package should be sent. */ >+#undef PACKAGE_BUGREPORT >+ >+/* Define to the full name of this package. */ >+#undef PACKAGE_NAME >+ >+/* Define to the full name and version of this package. */ >+#undef PACKAGE_STRING >+ >+/* Define to the one symbol short name of this package. */ >+#undef PACKAGE_TARNAME >+ >+/* Define to the home page for this package. */ >+#undef PACKAGE_URL >+ >+/* Define to the version of this package. */ >+#undef PACKAGE_VERSION >+ >+/* The size of `long long', as computed by sizeof. */ >+#undef SIZEOF_LONG_LONG >+ >+/* Define to 1 if you have the ANSI C header files. */ >+#undef STDC_HEADERS >+ >+/* Version number of package */ >+#undef VERSION >diff -Naur source.orig/utils/pmx/configure.ac source/utils/pmx/configure.ac >--- source.orig/utils/pmx/configure.ac 2014-11-17 07:28:11.000000000 -0500 >+++ source/utils/pmx/configure.ac 2015-02-18 16:30:39.893003633 -0500 >@@ -12,6 +12,7 @@ > AC_CONFIG_SRCDIR([pmx-]pmx_version[/pmxab.c]) > AC_CONFIG_AUX_DIR([../../build-aux]) > AC_CONFIG_MACRO_DIR([../../m4]) >+AC_CONFIG_HEADERS([config.h]) > > KPSE_BASIC([pmx]) > >@@ -32,6 +33,7 @@ > AC_PROG_LN_S > AC_PROG_MAKE_SET > AC_PROG_RANLIB >+AC_CHECK_FUNCS([abs]) > > AC_SEARCH_LIBS([sqrt], [m]) > >diff -Naur source.orig/utils/pmx/pmx-2.7.0/libf2c/f2c.h source/utils/pmx/pmx-2.7.0/libf2c/f2c.h >--- source.orig/utils/pmx/pmx-2.7.0/libf2c/f2c.h 2013-01-18 02:59:22.000000000 -0500 >+++ source/utils/pmx/pmx-2.7.0/libf2c/f2c.h 2015-02-18 16:32:58.491994029 -0500 >@@ -7,6 +7,8 @@ > #ifndef F2C_INCLUDE > #define F2C_INCLUDE > >+#include "config.h" >+ > typedef long int integer; > typedef unsigned long int uinteger; > typedef char *address; >@@ -162,7 +164,9 @@ > }; > typedef struct Namelist Namelist; > >+#ifndef HAVE_ABS > #define abs(x) ((x) >= 0 ? (x) : -(x)) >+#endif > #define dabs(x) (doublereal)abs(x) > #undef min > #undef max
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 510770
:
396902
|
396904
|
397674
|
397676
|
400996
|
401048