[Fakeroot-commits] [SCM] fakeroot branch, upstream, updated. 08ed00124d8b6b445d3b91a9aa15eec638b02f05
Clint Adams
schizo at debian.org
Sun Nov 15 03:17:24 UTC 2009
The following commit has been merged in the upstream branch:
commit 6b1da06f61aa63823ed5ab49776e2854aed5bdb5
Author: Clint Adams <schizo at debian.org>
Date: Sun Dec 2 21:15:10 2007 +0000
Apply patch from Andrew Benham to handle platforms without __builtin_expect support in the compiler. closes: #453303.
git-archimport-id: fakeroot at packages.debian.org--fakeroot/fakeroot--main--0.0--patch-146
diff --git a/configure.ac b/configure.ac
index 5880327..f6ac2c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10,6 +10,10 @@ AC_PROG_MAKE_SET
LT_INIT
LT_LANG(C)
+AH_BOTTOM([#if ! HAVE_BUILTIN_EXPECT
+#define __builtin_expect(x, expected_value) (x)
+#endif])
+
AC_ARG_WITH([ipc],
AS_HELP_STRING([--with-ipc@<:@=IPCTYPE@:>@],
[method of IPC to use: either sysv (default) or tcp]),
@@ -417,6 +421,13 @@ AC_CHECK_FUNCS(strdup strstr getresuid setresuid getresgid setresgid setfsuid se
AC_CHECK_DECLS([setenv, unsetenv])
AC_REPLACE_FUNCS([setenv])
+dnl Checks for __builtin_expect
+AC_TRY_LINK(
+ [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }],
+ [],
+ [AC_DEFINE([HAVE_BUILTIN_EXPECT], 1,
+ [Define to 1 if the compiler understands __builtin_expect.])])
+
dnl kludge
AH_VERBATIM([WRAP_STAT],
[/* Stuff. */
--
fakeroot
More information about the Fakeroot-commits
mailing list