about summary refs log tree commit diff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2004-10-01 22:49:36 +0000
committerRoland McGrath <roland@gnu.org>2004-10-01 22:49:36 +0000
commit290855f36b15fe306c281794a0ec56f56959f94c (patch)
tree1be6369631354e4238c360091fb67721832f7ea4 /sysdeps/generic
parentf7fa2b1951287b71711228e1fa6ddf97982f1efd (diff)
downloadglibc-290855f36b15fe306c281794a0ec56f56959f94c.tar.gz
glibc-290855f36b15fe306c281794a0ec56f56959f94c.tar.xz
glibc-290855f36b15fe306c281794a0ec56f56959f94c.zip
[BZ #420]
2004-10-02  Simon Josefsson  <jas@extundo.com>
	[BZ #420]
	* sysdeps/generic/memmem.c [!_LIBC]: Define __builtin_expect, to
	make the file usable inside gnulib.
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/memmem.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sysdeps/generic/memmem.c b/sysdeps/generic/memmem.c
index 9e27548dd5..c40462104a 100644
--- a/sysdeps/generic/memmem.c
+++ b/sysdeps/generic/memmem.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,94,96,97,98,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,92,93,94,96,97,98,2000,2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -19,6 +19,10 @@
 #include <stddef.h>
 #include <string.h>
 
+#ifndef _LIBC
+# define __builtin_expect(expr, val)   (expr)
+#endif
+
 #undef memmem
 
 /* Return the first occurrence of NEEDLE in HAYSTACK.  */