This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug libc/420] New: memmem.c fix to permit use in gnulib
- From: "simon at josefsson dot org" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 1 Oct 2004 22:12:29 -0000
- Subject: [Bug libc/420] New: memmem.c fix to permit use in gnulib
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
The following patch would make it possible to share memmem.c between gnulib and
GLIBC.
2004-10-02 Simon Josefsson <jas@extundo.com>
* sysdeps/generic/memmem.c [!_LIBC]: Define __builtin_expect, to
make the file usable inside gnulib.
Index: memmem.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/generic/memmem.c,v
retrieving revision 1.12
diff -u -p -r1.12 memmem.c
--- memmem.c 6 Jul 2001 04:55:49 -0000 1.12
+++ memmem.c 1 Oct 2004 22:10:39 -0000
@@ -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. */
--
Summary: memmem.c fix to permit use in gnulib
Product: glibc
Version: unspecified
Status: NEW
Severity: enhancement
Priority: P2
Component: libc
AssignedTo: gotom at debian dot or dot jp
ReportedBy: simon at josefsson dot org
CC: glibc-bugs at sources dot redhat dot com
http://sources.redhat.com/bugzilla/show_bug.cgi?id=420
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.