From: Peter Verthez Date: Sun, 27 Oct 2002 09:17:02 +0000 (+0000) Subject: Workaround for gcc compiler versions that don't have __builtin_expect yet. X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=4ec26e11ca9b01f4deb241d2dafc5a4dfb490420;p=gedcom-parse.git Workaround for gcc compiler versions that don't have __builtin_expect yet. --- 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;