This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/17585] locale memmem namespace


https://sourceware.org/bugzilla/show_bug.cgi?id=17585

--- Comment #1 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  9975e3d37d8585b41db075321bade3495cf58cdb (commit)
      from  c4eae75271734f820a7477dbce33f8752af6f003 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9975e3d37d8585b41db075321bade3495cf58cdb

commit 9975e3d37d8585b41db075321bade3495cf58cdb
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed Nov 12 22:41:03 2014 +0000

    Fix locale memmem namespace (bug 17585).

    Locale code, brought in by ISO C functions, calls memmem, which is not
    an ISO C function.  This isn't an ISO C conformance bug, because all
    mem* names are reserved, but glibc practice is not to rely on that
    reservation (thus, memmem is only declared in string.h if __USE_GNU
    even though ISO C would allow it to be declared unconditionally, for
    example).  This patch changes that code to use __memmem.

    Note: there are uses of memmem elsewhere in glibc that I didn't
    change, although it may turn out some of those also need to use
    __memmem.

    Tested for x86_64 (testsuite, and that disassembly of installed shared
    libraries is unchanged by this patch).

        [BZ #17585]
        * string/memmem.c [!_LIBC] (__memmem): Define to memmem.
        (memmem): Rename to __memmem and define as weak alias of
        __memmem.  Use libc_hidden_weak.
        (__memmem): Use libc_hidden_def.
        * include/string.h (__memmem): Declare.  Use libc_hidden_proto.
        * locale/findlocale.c (valid_locale_name): Use __memmem instead of
        memmem.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog           |    9 +++++++++
 NEWS                |    2 +-
 include/string.h    |    2 ++
 locale/findlocale.c |    4 ++--
 string/memmem.c     |    9 ++++++---
 5 files changed, 20 insertions(+), 6 deletions(-)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]