From 4ec26e11ca9b01f4deb241d2dafc5a4dfb490420 Mon Sep 17 00:00:00 2001 From: Peter Verthez Date: Sun, 27 Oct 2002 09:17:02 +0000 Subject: [PATCH] Workaround for gcc compiler versions that don't have __builtin_expect yet. --- iconv/glibc/ANSI_Z39.47.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/iconv/glibc/ANSI_Z39.47.c b/iconv/glibc/ANSI_Z39.47.c index 761bf04..c553a90 100644 --- a/iconv/glibc/ANSI_Z39.47.c +++ b/iconv/glibc/ANSI_Z39.47.c @@ -36,6 +36,16 @@ #include #include "ANSI_Z39.47-tables.h" +/* From /usr/include/linux/compiler.h out of GCC 2.96+: */ +/* Somewhere in the middle of the GCC 2.96 development cycle, we implemented + a mechanism by which the user can annotate likely branch directions and + expect the blocks to be reordered appropriately. Define __builtin_expect + to nothing for earlier compilers. */ + +#if __GNUC__ == 2 && __GNUC_MINOR__ < 96 +#define __builtin_expect(x, expected_value) (x) +#endif + /* Omit first half of table: assume identity mapping (ASCII) */ static const uint32_t to_ucs4[128] = TABLE_TO_UCS4_BASIC; -- 2.30.2