Gentoo Archives: gentoo-commits

From: "Arfrever Frehtes Taifersar Arahesis (arfrever)" <arfrever@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-admin/eselect-python/files: eselect-python-20090824-old-glibc.patch
Date: Wed, 02 Sep 2009 12:20:17
Message-Id: E1Mitdh-0003Xl-F5@stork.gentoo.org
1 arfrever 09/09/02 17:28:57
2
3 Added: eselect-python-20090824-old-glibc.patch
4 Log:
5 Fix building with old versions of sys-libs/glibc.
6 (Portage version: 14176-svn/cvs/Linux x86_64)
7
8 Revision Changes Path
9 1.1 app-admin/eselect-python/files/eselect-python-20090824-old-glibc.patch
10
11 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect-python/files/eselect-python-20090824-old-glibc.patch?rev=1.1&view=markup
12 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-admin/eselect-python/files/eselect-python-20090824-old-glibc.patch?rev=1.1&content-type=text/plain
13
14 Index: eselect-python-20090824-old-glibc.patch
15 ===================================================================
16 --- configure.ac
17 +++ configure.ac
18 @@ -7,8 +7,26 @@
19 AC_PATH_PROG(INSTALL, install)
20 MKDIR="${MKDIR:-${INSTALL} -d}"
21
22 +AC_USE_SYSTEM_EXTENSIONS
23 +
24 # strndup() was introduced in POSIX.1-2008.
25 -AC_CHECK_FUNCS([strndup])
26 +AC_MSG_CHECKING([for strndup])
27 +old_CFLAGS="${CFLAGS}"
28 +CFLAGS="${CFLAGS} -Wall -Werror -Wextra"
29 +AC_LINK_IFELSE(
30 +[#include <string.h>
31 +int main()
32 +{
33 + strndup("", 0);
34 + return 0;
35 +}], [have_strndup="1"], [have_strndup="0"])
36 +if test "${have_strndup}" = "1"; then
37 + AC_MSG_RESULT([yes])
38 + AC_DEFINE([HAVE_STRNDUP], [1], [Define to 1 if you have the 'strndup' function.])
39 +else
40 + AC_MSG_RESULT([no])
41 +fi
42 +CFLAGS="${old_CFLAGS}"
43
44 AC_SUBST([ASFLAGS])
45 AC_SUBST([MKDIR])