[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r8108 - in /trunk: libc/ libc/argp/ libc/bits/ libc/crypt/ libc/ctype/ libc/dirent/ libc/elf/ libc/include/ libc/io/ libc/io...
- To: commits@xxxxxxxxxx
- Subject: [commits] r8108 - in /trunk: libc/ libc/argp/ libc/bits/ libc/crypt/ libc/ctype/ libc/dirent/ libc/elf/ libc/include/ libc/io/ libc/io...
- From: joseph@xxxxxxxxxx
- Date: Sun, 15 Mar 2009 15:53:55 -0000
Author: joseph
Date: Sun Mar 15 08:53:55 2009
New Revision: 8108
Log:
Merge changes between r7922 and r8107 from /fsf/trunk.
Added:
trunk/libc/localedata/locales/nan_TW@latin
- copied unchanged from r8107, fsf/trunk/libc/localedata/locales/nan_TW@latin
trunk/libc/nptl_db/db-symbols.awk
- copied unchanged from r8107, fsf/trunk/libc/nptl_db/db-symbols.awk
trunk/libc/nptl_db/db-symbols.h
- copied unchanged from r8107, fsf/trunk/libc/nptl_db/db-symbols.h
trunk/libc/stdio-common/psiginfo-data.h
- copied unchanged from r8107, fsf/trunk/libc/stdio-common/psiginfo-data.h
trunk/libc/stdio-common/psiginfo-define.h
- copied unchanged from r8107, fsf/trunk/libc/stdio-common/psiginfo-define.h
trunk/libc/stdio-common/psiginfo.c
- copied unchanged from r8107, fsf/trunk/libc/stdio-common/psiginfo.c
trunk/libc/stdlib/at_quick_exit.c
- copied unchanged from r8107, fsf/trunk/libc/stdlib/at_quick_exit.c
trunk/libc/stdlib/cxa_at_quick_exit.c
- copied unchanged from r8107, fsf/trunk/libc/stdlib/cxa_at_quick_exit.c
trunk/libc/stdlib/quick_exit.c
- copied unchanged from r8107, fsf/trunk/libc/stdlib/quick_exit.c
trunk/libc/string/tst-svc2.c
- copied unchanged from r8107, fsf/trunk/libc/string/tst-svc2.c
trunk/libc/sysdeps/powerpc/powerpc32/power7/
- copied from r8107, fsf/trunk/libc/sysdeps/powerpc/powerpc32/power7/
trunk/libc/sysdeps/powerpc/powerpc64/power7/
- copied from r8107, fsf/trunk/libc/sysdeps/powerpc/powerpc64/power7/
trunk/libc/sysdeps/unix/sysv/linux/fallocate.c
- copied unchanged from r8107, fsf/trunk/libc/sysdeps/unix/sysv/linux/fallocate.c
trunk/libc/sysdeps/unix/sysv/linux/fallocate64.c
- copied unchanged from r8107, fsf/trunk/libc/sysdeps/unix/sysv/linux/fallocate64.c
trunk/libc/sysdeps/unix/sysv/linux/i386/fallocate.c
- copied unchanged from r8107, fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/fallocate.c
trunk/libc/sysdeps/unix/sysv/linux/i386/fallocate64.c
- copied unchanged from r8107, fsf/trunk/libc/sysdeps/unix/sysv/linux/i386/fallocate64.c
trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/power7/
- copied from r8107, fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/power7/
trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power7/
- copied from r8107, fsf/trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/power7/
trunk/libc/sysdeps/unix/sysv/linux/wordsize-64/fallocate.c
- copied unchanged from r8107, fsf/trunk/libc/sysdeps/unix/sysv/linux/wordsize-64/fallocate.c
trunk/libc/sysdeps/unix/sysv/linux/wordsize-64/fallocate64.c
- copied unchanged from r8107, fsf/trunk/libc/sysdeps/unix/sysv/linux/wordsize-64/fallocate64.c
trunk/libc/sysdeps/x86_64/dl-runtime.c
- copied unchanged from r8107, fsf/trunk/libc/sysdeps/x86_64/dl-runtime.c
trunk/libc/sysdeps/x86_64/multiarch/
- copied from r8107, fsf/trunk/libc/sysdeps/x86_64/multiarch/
Removed:
trunk/libc/README.template
Modified:
trunk/libc/ChangeLog
trunk/libc/Makeconfig
trunk/libc/Makefile
trunk/libc/NEWS
trunk/libc/README
trunk/libc/argp/argp.h
trunk/libc/bits/confname.h
trunk/libc/config.h.in
trunk/libc/config.make.in
trunk/libc/configure
trunk/libc/configure.in
trunk/libc/crypt/sha256test.c
trunk/libc/ctype/ctype.h
trunk/libc/dirent/dirent.h
trunk/libc/elf/dl-runtime.c
trunk/libc/elf/dl-sysdep.c
trunk/libc/elf/do-lookup.h
trunk/libc/elf/elf.h
trunk/libc/elf/sprof.c
trunk/libc/include/features.h
trunk/libc/include/libc-symbols.h
trunk/libc/include/stdio.h
trunk/libc/io/fcntl.h
trunk/libc/io/sys/stat.h
trunk/libc/libio/fmemopen.c
trunk/libc/libio/stdio.h
trunk/libc/locale/iso-639.def
trunk/libc/locale/langinfo.h
trunk/libc/locale/locale.h
trunk/libc/locale/xlocale.h
trunk/libc/localedata/ChangeLog
trunk/libc/localedata/SUPPORTED
trunk/libc/malloc/Makefile
trunk/libc/malloc/arena.c
trunk/libc/malloc/hooks.c
trunk/libc/malloc/malloc.c
trunk/libc/malloc/malloc.h
trunk/libc/malloc/obstack.h
trunk/libc/misc/sys/cdefs.h
trunk/libc/nis/rpcsvc/nislib.h
trunk/libc/nptl/ChangeLog
trunk/libc/nptl/init.c
trunk/libc/nptl/pthread_create.c
trunk/libc/nptl/sysdeps/pthread/pthread.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
trunk/libc/nptl/sysdeps/unix/sysv/linux/sh/lowlevellock.S
trunk/libc/nptl/sysdeps/unix/sysv/linux/sparc/lowlevellock.h
trunk/libc/nptl_db/ChangeLog
trunk/libc/nptl_db/Makefile
trunk/libc/nptl_db/td_symbol_list.c
trunk/libc/nscd/aicache.c
trunk/libc/nscd/cache.c
trunk/libc/nscd/connections.c
trunk/libc/nscd/grpcache.c
trunk/libc/nscd/hstcache.c
trunk/libc/nscd/initgrcache.c
trunk/libc/nscd/mem.c
trunk/libc/nscd/nscd.h
trunk/libc/nscd/pwdcache.c
trunk/libc/nscd/servicescache.c
trunk/libc/po/bg.po
trunk/libc/po/cs.po
trunk/libc/po/fi.po
trunk/libc/po/id.po
trunk/libc/po/ko.po
trunk/libc/po/nl.po
trunk/libc/po/pl.po
trunk/libc/po/ru.po
trunk/libc/po/sv.po
trunk/libc/po/vi.po
trunk/libc/posix/Versions
trunk/libc/posix/getconf.c
trunk/libc/posix/getopt.c
trunk/libc/posix/getopt.h
trunk/libc/posix/getopt1.c
trunk/libc/posix/getopt_int.h
trunk/libc/posix/spawn.h
trunk/libc/posix/tst-sysconf.c
trunk/libc/posix/unistd.h
trunk/libc/resolv/arpa/nameser.h
trunk/libc/resolv/netdb.h
trunk/libc/resolv/resolv.h
trunk/libc/shadow/lckpwdf.c
trunk/libc/signal/signal.h
trunk/libc/soft-fp/double.h
trunk/libc/stdio-common/Makefile
trunk/libc/stdio-common/Versions
trunk/libc/stdlib/Makefile
trunk/libc/stdlib/Versions
trunk/libc/stdlib/cxa_atexit.c
trunk/libc/stdlib/cxa_finalize.c
trunk/libc/stdlib/exit.c
trunk/libc/stdlib/exit.h
trunk/libc/stdlib/monetary.h
trunk/libc/stdlib/on_exit.c
trunk/libc/stdlib/stdlib.h
trunk/libc/string/Makefile
trunk/libc/string/string.h
trunk/libc/string/strings.h
trunk/libc/string/strverscmp.c
trunk/libc/sunrpc/rpc/clnt.h
trunk/libc/sunrpc/rpc/pmap_clnt.h
trunk/libc/sunrpc/rpc/svc.h
trunk/libc/sunrpc/rpc/xdr.h
trunk/libc/sysdeps/i386/bits/link.h
trunk/libc/sysdeps/i386/dl-machine.h
trunk/libc/sysdeps/ia64/bits/link.h
trunk/libc/sysdeps/mach/hurd/bits/posix_opt.h
trunk/libc/sysdeps/posix/sysconf.c
trunk/libc/sysdeps/powerpc/bits/link.h
trunk/libc/sysdeps/powerpc/fpu/fenv_libc.h
trunk/libc/sysdeps/powerpc/fpu/tst-setcontext-fpscr.c
trunk/libc/sysdeps/s390/bits/link.h
trunk/libc/sysdeps/sh/bits/link.h
trunk/libc/sysdeps/sparc/bits/link.h
trunk/libc/sysdeps/unix/sysv/linux/Makefile
trunk/libc/sysdeps/unix/sysv/linux/Versions
trunk/libc/sysdeps/unix/sysv/linux/bits/posix_opt.h
trunk/libc/sysdeps/unix/sysv/linux/bits/stat.h
trunk/libc/sysdeps/unix/sysv/linux/getsysstats.c
trunk/libc/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
trunk/libc/sysdeps/unix/sysv/linux/i386/sys/io.h
trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/fcntl.h
trunk/libc/sysdeps/unix/sysv/linux/ia64/bits/stat.h
trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h
trunk/libc/sysdeps/unix/sysv/linux/powerpc/bits/stat.h
trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S
trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S
trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S
trunk/libc/sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S
trunk/libc/sysdeps/unix/sysv/linux/s390/bits/fcntl.h
trunk/libc/sysdeps/unix/sysv/linux/s390/bits/stat.h
trunk/libc/sysdeps/unix/sysv/linux/sh/bits/fcntl.h
trunk/libc/sysdeps/unix/sysv/linux/sh/sys/procfs.h
trunk/libc/sysdeps/unix/sysv/linux/sh/sys/user.h
trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/fcntl.h
trunk/libc/sysdeps/unix/sysv/linux/sparc/bits/stat.h
trunk/libc/sysdeps/unix/sysv/linux/sparc/getsysstats.c
trunk/libc/sysdeps/unix/sysv/linux/sparc/sys/eventfd.h
trunk/libc/sysdeps/unix/sysv/linux/sys/eventfd.h
trunk/libc/sysdeps/unix/sysv/linux/sysconf.c
trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h
trunk/libc/sysdeps/unix/sysv/linux/x86_64/bits/stat.h
trunk/libc/sysdeps/unix/sysv/linux/x86_64/sys/io.h
trunk/libc/sysdeps/x86_64/bits/link.h
trunk/libc/sysdeps/x86_64/cacheinfo.c
trunk/libc/sysdeps/x86_64/dl-machine.h
trunk/libc/sysdeps/x86_64/dl-trampoline.S
trunk/libc/time/sys/time.h
trunk/libc/time/time.h
trunk/libc/time/tst-posixtz.c
trunk/libc/time/tzset.c
trunk/libc/wcsmbs/wchar.h
trunk/libc/wctype/wctype.h
trunk/ports/ChangeLog.arm
trunk/ports/ChangeLog.hppa
trunk/ports/ChangeLog.m68k
trunk/ports/ChangeLog.mips
trunk/ports/sysdeps/hppa/dl-machine.h
trunk/ports/sysdeps/unix/sysv/linux/arm/bits/fcntl.h
trunk/ports/sysdeps/unix/sysv/linux/hppa/Versions
trunk/ports/sysdeps/unix/sysv/linux/hppa/nptl/bits/pthreadtypes.h
trunk/ports/sysdeps/unix/sysv/linux/hppa/nptl/lowlevellock.h
trunk/ports/sysdeps/unix/sysv/linux/hppa/nptl/unwind-forcedunwind.c
trunk/ports/sysdeps/unix/sysv/linux/hppa/nptl/unwind-resume.c
trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/fcntl.h
trunk/ports/sysdeps/unix/sysv/linux/m68k/bits/stat.h
trunk/ports/sysdeps/unix/sysv/linux/mips/bits/fcntl.h
trunk/ports/sysdeps/unix/sysv/linux/mips/bits/stat.h
Modified: trunk/libc/ChangeLog
==============================================================================
--- trunk/libc/ChangeLog (original)
+++ trunk/libc/ChangeLog Sun Mar 15 08:53:55 2009
@@ -1,3 +1,417 @@
+2009-03-14 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * crypt/sha256test.c (main): Perform 100,000 'a' test in a second way.
+
+ * elf/dl-runtime.c (reloc_offset): Define.
+ (reloc_index): Define.
+ (_dl_fixup): Rename reloc_offset parameter to reloc_arg.
+ (_dl_fixup_profile): Likewise. Use reloc_index instead of
+ computing index from reloc_offset.
+ (_dl_call_pltexit): Likewise.
+ * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_resolve): Just pass
+ the relocation index to _dl_fixup.
+ (_dl_runtime_profile): Likewise for _dl_fixup_profile and
+ _dl_call_pltexit.
+ * sysdeps/x86_64/dl-runtime.c: New file.
+
+ [BZ #9893]
+ * sysdeps/x86_64/dl-trampoline.S (_dl_runtime_profile): Fix
+ alignement of La_x86_64_regs. Store xmm parameters.
+ Patch mostly by Jiri Olsa <olsajiri@xxxxxxxxx>.
+
+ [BZ #9913]
+ * string/strverscmp.c (__strverscmp): Fix case of different digits
+ in fractional part of string.
+ Patch by Jingyu Liu <jyliu@xxxxxxxxxxxx>.
+ * string/Makefile (tests): Add tst-svc2.
+ * string/tst-svc2.c: New file.
+
+ * string/strverscmp.c (__strverscmp): Optimize size of tables.
+
+ * locale/iso-639.def: Add Min Nan.
+
+2009-03-11 Carlos Eduardo Seo <cseo@xxxxxxxxxxxxxxxxxx>
+
+ [BZ #9948]
+ * elf/dl-sysdep.c (_dl_show_auxv): Add support for AT_BASE_PLATFORM.
+
+2009-03-14 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * elf/dl-sysdep.c (auxvars): Compress data structure.
+
+ * sysdeps/i386/dl-machine.h (elf_machine_rel): Implement
+ STT_GNU_IFUNC handling.
+ (elf_machine_rela): Likewise.
+
+2009-03-13 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * config.h.in (USE_MULTIARCH): Define.
+ * configure.in: Handle --enable-multi-arch.
+ * elf/dl-runtime.c (_dl_fixup): Handle STT_GNU_IFUNC.
+ (_dl_fixup_profile): Likewise.
+ * elf/do-lookup.c (dl_lookup_x): Likewise.
+ * sysdeps/x86_64/dl-machine.h: Handle STT_GNU_IFUNC.
+ * elf/elf.h (STT_GNU_IFUNC): Define.
+ * include/libc-symbols.h (libc_ifunc): Define.
+ * sysdeps/x86_64/cacheinfo.c: If USE_MULTIARCH is defined, use the
+ framework in init-arch.h to get CPUID values.
+ * sysdeps/x86_64/multiarch/Makefile: New file.
+ * sysdeps/x86_64/multiarch/init-arch.c: New file.
+ * sysdeps/x86_64/multiarch/init-arch.h: New file.
+ * sysdeps/x86_64/multiarch/sched_cpucount.c: New file.
+
+ * config.make.in (experimental-malloc): Define.
+ * configure.in: Handle --enable-experimental-malloc.
+ * malloc/Makefile: Handle experimental-malloc flag.
+ * malloc/malloc.c: Implement PER_THREAD and ATOMIC_FASTBINS features.
+ * malloc/arena.c: Likewise.
+ * malloc/hooks.c: Likewise.
+ * malloc/malloc.h: Define M_ARENA_TEST and M_ARENA_MAX.
+
+2009-03-11 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/x86_64/dl-machine.h (elf_machine_rela): Add branch
+ prediction. A few size optimizations.
+
+2009-03-10 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * time/tzset.c: Optimize a bit for size.
+
+2009-03-10 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * include/stdio.h (fmemopen): Add libc_hidden_proto.
+ * libio/fmemopen.c (fmemopen): Add libc_hidden_def.
+
+ * elf/sprof.c: Avoid warning about multi-line comment.
+
+2009-03-10 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * time/tzset.c (__tzset_parse_tz): Use correct string when parsing
+ DST name.
+ * time/tst-posixtz.c: Add tests for quoted timezone names.
+
+2009-03-10 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * posix/unistd.h (_POSIX_VERSION, _POSIX2_VERSION, _POSIX2_C_BIND,
+ _POSIX2_C_DEV, _POSIX2_SW_DEV, _POSIX2_LOCALEDEF): Define to
+ 200809L instead of 200112L.
+ (_XOPEN_VERSION): For __USE_XOPEN2K8 define to 700.
+ * posix/tst-sysconf.c (STDVER): Define to 200809L instead of 200112L.
+
+ * stdlib/quick_exit.c (quick_exit): Pass &__quick_exit_funcs
+ instead of __quick_exit_funcs to __run_exit_handlers.
+ * stdlib/at_quick_exit.c (at_quick_exit): Add attribute_hidden.
+ * stdlib/exit.h (__run_exit_handlers): Add noreturn attribute.
+ (__cxa_at_quick_exit): Remove attribute_hidden.
+ * stdlib/exit.c (exit): Pass &__exit_funcs instead of __exit_funcs
+ to __run_exit_handlers.
+ * stdlib/cxa_at_quick_exit.c (__cxa_at_quick_exit): Remove
+ attribute_hidden.
+
+2009-03-10 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * po/id.po: Update from translation team.
+
+2009-02-18 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/setcontext.S: Use
+ .machine push; .machine "power6" and .machine pop around mtfsf
+ insns outside of _ARCH_PWR6 define.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/swapcontext.S: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/setcontext-common.S:
+ Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/swapcontext-common.S:
+ Likewise.
+ * sysdeps/powerpc/fpu/tst-setcontext-fpscr.c (_SET_DI_FPSCR): Likewise.
+ * sysdeps/powerpc/fpu/fenv_libc.h (fesetenv_register,
+ relax_fenv_state): Likewise.
+
+2009-03-08 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * stdlib/Makefile (routines): Add quick_exit, at_quick_exit, and
+ cxa_at_quick_exit.
+ (static-only-routines): Add at_quick_exit.
+ * stdlib/Versions: Export quick_exit and __cxa_at_quick_exit for
+ GLIBC_2.10.
+ * stdlib/quick_exit.c: New file.
+ * stdlib/at_quick_exit.c: New file.
+ * stdlib/cxa_at_quick_exit.c: New file.
+ * stdlib/cxa_atexit.c (__cxa_atexit): Move body to new function. Call
+ it appropriately.
+ (__internal_atexit): New function.
+ (__new_exitfn): Now takes parameter to point to the list to use.
+ * stdlib/cxa_finalize.c: Remove quick_exit handlers, don't call them.
+ * stdlib/exit.c (__run_exit_handlers): New function. Split from...
+ (exit): ...here. Just call __run_exit_handlers appropriately.
+ * stdlib/exit.h: Declare __quick_exit_funcs, __run_exit_handlers,
+ __internal_atexit, __cxa_at_quick_exit. Adjust __new_exitfn.
+ * stdlib/on_exit.c: Adjust call to __new_exitfn.
+ * stdlib/stdlib.h: Declare at_quick_exit and quick_exit.
+
+ * po/id.po: Update from translation team.
+
+2009-03-07 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * po/ru.po: Update from translation team.
+
+2009-03-04 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * po/nl.po: Update from translation team.
+
+2009-03-03 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h: Declare fallocate{,64}.
+ * sysdeps/unix/sysv/linux/sparc/bits/fcntl.h: Likewise.
+ * sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise.
+ * sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise.
+ * sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Likewise.
+
+ * po/pl.po: Update from translation team.
+
+2009-03-02 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #7083]
+ * sysdeps/unix/sysv/linux/fallocate.c: New file.
+ * sysdeps/unix/sysv/linux/fallocate64.c: New file.
+ * sysdeps/unix/sysv/linux/wordsize-64/fallocate64.c: New file.
+ * sysdeps/unix/sysv/linux/wordsize-64/fallocate.c: New file.
+ * sysdeps/unix/sysv/linux/i386/fallocate64.c: New file.
+ * sysdeps/unix/sysv/linux/i386/fallocate.c: New file.
+ * sysdeps/unix/sysv/linux/Versions: Export fallocate and fallocate64
+ for GLIBC_2.10.
+ * sysdeps/unix/sysv/linux/Makefile [subdir=io] (sysdep_routines):
+ Add fallocate and fallocate64.
+
+ * io/fcntl.h: Pretty printing.
+
+2009-03-02 Richard Guenther <rguenther@xxxxxxx>
+
+ * misc/sys/cdefs.h (__extern_always_inline): Add __artificial__
+ attribute also for non-C99 inline semantics variant.
+
+2009-02-12 Carlos Eduardo Seo <cseo@xxxxxxxxxxxxxxxxxx>
+
+ * sysdeps/powerpc/powerpc32/power7/fpu/Implies: New file.
+ * sysdeps/powerpc/powerpc32/power7/Implies: Likewise.
+ * sysdeps/powerpc/powerpc64/power7/fpu/Implies: Likewise.
+ * sysdeps/powerpc/powerpc64/power7/Implies: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc32/power7/fpu/Implies:
+ Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/power7/fpu/Implies:
+ Likewise.
+
+2009-03-02 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * po/cs.po: Update from translation team.
+
+2009-02-28 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * po/bg.po: Update from translation team.
+ * po/sv.po: Likewise.
+ * po/fi.po: Likewise.
+ * po/vi.po: Likewise.
+
+2009-02-27 Roland McGrath <roland@xxxxxxxxxx>
+
+ * Makeconfig (%.v.i): Depend on Makeconfig.
+ Exclude % lines from initial #-comment removal.
+
+2009-02-27 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * po/ko.po: Update from translation team.
+
+2009-02-26 Roland McGrath <roland@xxxxxxxxxx>
+
+ * shadow/lckpwdf.c (__lckpwdf): Move FLAGS inside block using it,
+ avoids unused warning.
+
+2009-02-26 Andrew Stubbs <ams@xxxxxxxxxxxxxxxx>
+ SUGIOKA Toshinobu <sugioka@xxxxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/sh/sys/procfs.h: Don't include signal.h,
+ sys/ucontext.h and asm/elf.h. Include sys/user.h.
+ * sysdeps/unix/sysv/linux/sh/sys/user.h: Don't include features.h
+ and asm/user.h. Include asm/ptrace.h.
+ (PTRACE_GETREGS, PTRACE_SETREGS, PTRACE_GETFPREGS,
+ PTRACE_SETFPREGS, PTRACE_GETFDPIC, PTRACE_GETFDPIC_EXEC,
+ PTRACE_GETFDPIC_INTERP, PTRACE_GETDSPREGS, PTRACE_SETDSPREGS):
+ Undefine.
+ (start_thread): Don't undefine.
+ (elf_greg_t, ELF_NGREG, elf_fpregset_t, user_fpu_struct, user):
+ Define.
+
+2009-02-26 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * wctype/wctype.h: The *_l functions are in POSIX 2008.
+ * wcsmbs/wchar.h: mbsnrtowcs, open_wmemstream, wcpcpy, wcpncpy,
+ wcscasecmp, wcsdup, wcsncasecmp, wcsnlen, wcsnrtombs,
+ wcscasecmp_l, wcsncasecmp_l, wcscoll_l, and wcsxfrm_l.
+ * sysdeps/mach/hurd/bits/posix_opt.h: Reset value of macros from
+ 200112L to 200809L.
+ * sysdeps/unix/sysv/linux/bits/posix_opt.h: Likewise.
+ * posix/getconf.c (vars): Add _SC_THREAD_ROBUST_PRIO_INHERIT and
+ _SC_THREAD_ROBUST_PRIO_PROTECT entries.
+ * bits/confname.h: Add _SC_THREAD_ROBUST_PRIO_INHERIT and
+ _SC_THREAD_ROBUST_PRIO_PROTECT.
+ * posix/unistd.h: fexecve is in POSIX 2008.
+ * time/time.h: strftime_l is in POSIX 2008.
+ * io/sys/stat.h: futimens is in POSIX 2008.
+ * string/strings.h: strcasecmp_l and strncasecmp_l are in POSIX 2008.
+ * string/string.h: stpcpy, stpncpy, strndup, strnlen, strsignal,
+ strcoll_l, strerror_l, and strxfrm_l are in POSIX 2008.
+ * stdlib/stdlib.h: mkdtemp is in POSIX 2008.
+ * libio/stdio.h: dprintf, fmemopen, getdelim, getline,
+ open_memstream, and vdprintf are in POSIX 2008.
+
+2009-02-25 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * include/features.h: Define macros for XPG7/POSIX 2008.
+ * ctype/ctype.h: The *_l functions are in POSIX 2008.
+ * dirent/dirent.h: alphasort, dirfd, scandir, and fdopendir are in
+ POSIX 2008.
+ * locale/langinfo.h: nl_langinfo_l is in POSIX 2008.
+ * locale/xlocale.h: Define locale_t type.
+ * locale/locale.h: duplocale, freelocale, newlocale, uselocale are
+ in POSIX 2008. Don't define locale_t here.
+ * stdlib/monetary.h: strfmon_l is in POSIX 2008.
+ * sysdeps/unix/sysv/linux/bits/stat.h: Protect UTIME_NOW and
+ UTIME_OMIT only with __USE_ATFILE.
+ * signal/signal.h: Declare psignal and psiginfo for POSIX 2008.
+ * stdio-common/psiginfo.c: New file.
+ * stdio-common/psiginfo-data.h: New file.
+ * stdio-common/psiginfo-define.h: New file.
+ * stdio-common/Makefile (routines): Add psiginfo.
+ * stdio-common/Versions: Export psiginfo for GLIBC_2.10.
+ * sysdeps/unix/sysv/linux/ia64/bits/stat.h: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/bits/stat.h: Likewise.
+ * sysdeps/unix/sysv/linux/s390/bits/stat.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/bits/stat.h: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/bits/stat.h: Likewise.
+ * io/sys/stat.h: Move mknodat definition into same conditional as
+ mknod.
+ * time/sys/time.h: futimesat is not among the functions accepted
+ into the POSIX standard.
+
+ * include/features.h: If no feature selection given and we select
+ by default a POSIX mode, also define __USE_POSIX_IMPLICITLY.
+ * posix/Versions: Export __posix_getopt.
+ * posix/getopt.c (_getopt_initialize): Take additional parameter.
+ Use it to alternatively initialize __posixly_correct.
+ (_getopt_internal_r): Take addition parameter. Pass on to
+ _getopt_initialize.
+ (_getopt_internal): Take addition parameter. Pass on to
+ _getopt_internal_r.
+ (getopt): Pass additional zero to _getopt_internal.
+ (__posix_getopt): New function.
+ * posix/getopt.h: Add redirection for getopt.
+ * posix/getopt1.c (getopt_long): Pass additional zero to
+ _getopt_internal.
+ (getopt_long_only): Likewise.
+ (_getopt_long_r): Pass additional zero to _getopt_internal_r.
+ (_getopt_long_only_r): Likewise.
+ * posix/getopt_int.h: Adjust declarations of _getopt_internal and
+ _getopt_internal_r.
+
+2009-02-24 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * bits/confname.h: Define _SC_TRACE_EVENT_NAME_MAX, _SC_TRACE_NAME_MAX,
+ _SC_TRACE_SYS_MAX, _SC_TRACE_USER_EVENT_MAX, _SC_XOPEN_STREAMS.
+ * sysdeps/posix/sysconf.c (__sysconf): Handle
+ _SC_TRACE_EVENT_NAME_MAX, _SC_TRACE_NAME_MAX, _SC_TRACE_SYS_MAX,
+ _SC_TRACE_USER_EVENT_MAX, _SC_XOPEN_STREAMS.
+
+2009-02-24 Roland McGrath <roland@xxxxxxxxxx>
+
+ [BZ #9895]
+ * README.template: Reworded not to use substituted version number.
+ Renamed to ...
+ * README: ... here (no longer generated).
+ * Makefile (README): Target removed.
+
+2009-02-24 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/sysconf.c (__sysconf):
+ /proc/sys/kernel/rtsig_max doesn't exist anymore, use getrlimit
+ instead.
+
+ * io/sys/stat.h: The lstat functions have been mandatory since 2001.
+
+ * time/tzset.c (tzset_internal): Correct parsing of TZ envvar.
+
+2009-02-22 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * po/bg.po: Update from translation team.
+
+2009-02-16 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * stdlib/monetary.h: Uglify function parameter names.
+ * sunrpc/rpc/pmap_clnt.h: Likewise.
+ * sunrpc/rpc/svc.h: Likewise.
+ * sunrpc/rpc/xdr.h: Likewise.
+ * sunrpc/rpc/clnt.h: Likewise.
+ * resolv/netdb.h: Likewise.
+ * resolv/arpa/nameser.h: Likewise.
+ * resolv/resolv.h: Likewise.
+ * argp/argp.h: Likewise.
+ * locale/langinfo.h: Likewise.
+ * io/sys/stat.h: Likewise.
+ * posix/spawn.h: Likewise.
+ * nis/rpcsvc/nislib.h: Likewise.
+ * malloc/obstack.h: Likewise.
+ * sysdeps/ia64/bits/link.h: Likewise.
+ * sysdeps/i386/bits/link.h: Likewise.
+ * sysdeps/s390/bits/link.h: Likewise.
+ * sysdeps/powerpc/bits/link.h: Likewise.
+ * sysdeps/x86_64/bits/link.h: Likewise.
+ * sysdeps/sparc/bits/link.h: Likewise.
+ * sysdeps/sh/bits/link.h: Likewise.
+ * sysdeps/unix/sysv/linux/i386/sys/io.h: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/sys/io.h: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sys/eventfd.h: Likewise.
+ * sysdeps/unix/sysv/linux/sys/eventfd.h: Likewise.
+
+2008-12-01 Fredrik Unger <fred@xxxxxxx>
+
+ * soft-fp/double.h [_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_SEMIRAW_D,
+ FP_UNPACK_SEMIRAW_DP): Use _FP_UNPACK_RAW_1 instead of
+ _FP_UNPACK_RAW_2, fix up first argument.
+
+2009-02-15 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * sysdeps/unix/sysv/linux/getsysstats.c (next_line): New function.
+ (GET_NPROCS_PARSER): Change parameters and use next_line.
+ (__get_nprocs): Rewrite to not use stdio routines.
+ * sysdeps/unix/sysv/linux/sparc/getsysstats.c (GET_NPROCS_PARSER):
+ Change parameters and use next_line.
+
+2009-02-13 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #5381]
+ * nscd/nscd.h: Remove definitions and declarations for mem_in_flight.
+ Change mempool_alloc prototype.
+ * nscd/mem.c (gc): Don't handle mem_in_flight.
+ (mempool_alloc): Third parameter now only indicates whether this is the
+ first call (to allocate data) or not. If it is, get db rdlock.
+ Release it on error. Don't handle mem_in_flight.
+ * nscd/aicache.c (addhstaiX): Mark he parameter as const.
+ Adjust third parameter of mempool_alloc calls.
+ Nothing to do here in case mempool_alloc fails.
+ Avoid local variable shadowing parameter. No need to get db rdlock
+ before calling cache_add.
+ * nscd/cache.c (cache_add): Adjust call to mempool_alloc. There is
+ no mem_in_flight array anymore.
+ * nscd/connections.c: Remove definition and handling of mem_in_flight.
+ * nscd/grpcache.c (cache_addgr): Adjust third parameter of
+ mempool_alloc calls. Mark he parameter as const. Nothing to do here
+ in case mempool_alloc fails. No need to get db rdlock before calling
+ cache_add.
+ * nscd/hstcache.c (cache_addhst): Likewise.
+ * nscd/initgrcache.c (addinitgroupsX): Likewise.
+ * nscd/servicescache.c (cache_addserv): Likewise.
+ * nscd/pwdcache.c (cache_addpw): Likewise. Remove some debugging code.
+
2009-02-11 Ulrich Drepper <drepper@xxxxxxxxxx>
* po/lt.po: Update from translation team.
Modified: trunk/libc/Makeconfig
==============================================================================
--- trunk/libc/Makeconfig (original)
+++ trunk/libc/Makeconfig Sun Mar 15 08:53:55 2009
@@ -801,9 +801,9 @@
# `FOO.v', and along with that `FOO.v.i' should be given dependencies
# listing both its input files, and any header files that it may reference
# (but no commands).
-%.v.i: $(common-objpfx)config.h
- sed 's/#.*$$//;/^[ ]*$$/d;s/^[ ]*%/#/' \
- $(filter-out FORCE %.h,$^) \
+%.v.i: $(common-objpfx)config.h $(..)Makeconfig
+ sed '/^[ ]*%/!s/#.*$$//;/^[ ]*$$/d;s/^[ ]*%/#/' \
+ $(filter-out FORCE %.h $(..)Makeconfig,$^) \
| $(CC) -E -undef $(CPPFLAGS) -x assembler-with-cpp - \
> $@T
mv -f $@T $@
Modified: trunk/libc/Makefile
==============================================================================
--- trunk/libc/Makefile (original)
+++ trunk/libc/Makefile Sun Mar 15 08:53:55 2009
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2002,2003,2004,2005,2006,2008
+# Copyright (C) 1991-2002,2003,2004,2005,2006,2008,2009
# Free Software Foundation, Inc.
# This file is part of the GNU C Library.
@@ -372,15 +372,6 @@
generated := $(generated) stubs.h
-README: README.template version.h
- -rm -f $@
- sed -e 's/RELEASE/$(release)/' -e 's/VERSION/$(version)/' < $< > $@
-# Make it unwritable so I won't change it by mistake.
- chmod 444 $@
-ifeq ($(with-cvs),yes)
- test ! -d CVS || cvs $(CVSOPTS) commit -m'Remade for $(release)-$(version)' $@
-endif
-
files-for-dist := README FAQ INSTALL NOTES configure
tag-of-stem = glibc-$(subst .,_,$*)
Modified: trunk/libc/NEWS
==============================================================================
--- trunk/libc/NEWS (original)
+++ trunk/libc/NEWS Sun Mar 15 08:53:55 2009
@@ -1,4 +1,4 @@
-GNU C Library NEWS -- history of user-visible changes. 2009-1-30
+GNU C Library NEWS -- history of user-visible changes. 2009-3-14
Copyright (C) 1992-2008, 2009 Free Software Foundation, Inc.
See the end for copying conditions.
@@ -7,10 +7,24 @@
Version 2.10
-* New Linux interface: accept4
+* New Linux interfaces: accept4, fallocate, fallocate64.
* Correct declarations of string function when used in C++ code. This
could lead to compile error for invalid C++ code.
+
+* XPG7/POSIX 2008 compilation environment. Many GNU-specific functions are
+ now in POSIX.
+
+* New POSIX 2008 interface: psiginfo
+ Implemented by Ulrich Drepper.
+
+* New ISO C++1x interfaces: quick_exit, at_quick_exit
+ Implemented by Ulrich Drepper.
+
+* Support for selecting between multiple function definitions at runtime
+ using STT_GNU_IFUNC symbols. Implemented by Ulrich Drepper.
+
+* New locale: nan_TW@latin
Version 2.9
Modified: trunk/libc/README
==============================================================================
--- trunk/libc/README (original)
+++ trunk/libc/README Sun Mar 15 08:53:55 2009
@@ -26,7 +26,8 @@
---
-This directory contains the version 2.7 release of the GNU C Library.
+This directory contains the sources of the GNU C Library.
+See the file "version.h" for what release version you have.
The GNU C Library is the standard system C library for all GNU systems,
and is an important part of what makes up a GNU system. It provides the
@@ -80,7 +81,7 @@
The code for other CPU configurations supported by volunteers outside of
the core glibc maintenance effort is contained in the separate `ports'
-add-on. You can find glibc-ports-2.7 distributed separately in the
+add-on. You can find glibc-ports-VERSION distributed separately in the
same place where you got the main glibc distribution files.
Currently these configurations are known to work using the `ports' add-on:
Modified: trunk/libc/argp/argp.h
==============================================================================
--- trunk/libc/argp/argp.h (original)
+++ trunk/libc/argp/argp.h Sun Mar 15 08:53:55 2009
@@ -1,5 +1,5 @@
/* Hierarchial argument parsing, layered over getopt.
- Copyright (C) 1995-1999, 2003, 2004, 2005, 2006, 2007
+ Copyright (C) 1995-1999, 2003, 2004, 2005, 2006, 2007, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <miles@xxxxxxxxxxxxxx>.
@@ -150,8 +150,8 @@
struct argp_child; /* " */
/* The type of a pointer to an argp parsing function. */
-typedef error_t (*argp_parser_t) (int key, char *arg,
- struct argp_state *state);
+typedef error_t (*argp_parser_t) (int __key, char *__arg,
+ struct argp_state *__state);
/* What to return for unrecognized keys. For special ARGP_KEY_ keys, such
returns will simply be ignored. For user keys, this error will be turned
Modified: trunk/libc/bits/confname.h
==============================================================================
--- trunk/libc/bits/confname.h (original)
+++ trunk/libc/bits/confname.h Sun Mar 15 08:53:55 2009
@@ -509,6 +509,26 @@
#define _SC_V7_LP64_OFF64 _SC_V7_LP64_OFF64
_SC_V7_LPBIG_OFFBIG,
#define _SC_V7_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG
+
+ _SC_SS_REPL_MAX,
+#define _SC_SS_REPL_MAX _SC_SS_REPL_MAX
+
+ _SC_TRACE_EVENT_NAME_MAX,
+#define _SC_TRACE_EVENT_NAME_MAX _SC_TRACE_EVENT_NAME_MAX
+ _SC_TRACE_NAME_MAX,
+#define _SC_TRACE_NAME_MAX _SC_TRACE_NAME_MAX
+ _SC_TRACE_SYS_MAX,
+#define _SC_TRACE_SYS_MAX _SC_TRACE_SYS_MAX
+ _SC_TRACE_USER_EVENT_MAX,
+#define _SC_TRACE_USER_EVENT_MAX _SC_TRACE_USER_EVENT_MAX
+
+ _SC_XOPEN_STREAMS,
+#define _SC_XOPEN_STREAMS _SC_XOPEN_STREAMS
+
+ _SC_THREAD_ROBUST_PRIO_INHERIT,
+#define _SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_INHERIT
+ _SC_THREAD_ROBUST_PRIO_PROTECT,
+#define _SC_THREAD_ROBUST_PRIO_PROTECT _SC_THREAD_ROBUST_PRIO_PROTECT
};
/* Values for the NAME argument to `confstr'. */
Modified: trunk/libc/config.h.in
==============================================================================
--- trunk/libc/config.h.in (original)
+++ trunk/libc/config.h.in Sun Mar 15 08:53:55 2009
@@ -194,6 +194,9 @@
/* Bug reporting address. */
#undef REPORT_BUGS_TO
+
+/* Define if multi-arch DSOs should be generated. */
+#undef USE_MULTIARCH
/*
*/
Modified: trunk/libc/config.make.in
==============================================================================
--- trunk/libc/config.make.in (original)
+++ trunk/libc/config.make.in Sun Mar 15 08:53:55 2009
@@ -70,6 +70,7 @@
oldest-abi = @oldest_abi@
no-whole-archive = @no_whole_archive@
exceptions = @exceptions@
+multi-arch = @multi_arch@
mach-interface-list = @mach_interface_list@
@@ -77,6 +78,8 @@
have-ksh = @libc_cv_have_ksh@
sizeof-long-double = @sizeof_long_double@
+
+experimental-malloc = @experimental_malloc@
# Configuration options.
build-static = @static@
Modified: trunk/libc/configure
==============================================================================
--- trunk/libc/configure (original)
+++ trunk/libc/configure Sun Mar 15 08:53:55 2009
@@ -313,7 +313,7 @@
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons add_on_subdirs base_machine submachine sysnames sysdeps_add_ons INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR NM OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES CXX_SYSINCLUDES libc_cv_gcc_static_libgcc BASH_SHELL libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_cc_with_libunwind libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie libc_cv_hashstyle fno_unit_at_a_time libc_cv_ssp libc_cv_gnu89_inline libc_cv_have_initfini no_whole_archive exceptions libc_cv_cc_submachine LIBGD have_libaudit have_libcap have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind libc_cv_cpp_asm_debuginfo use_ldconfig ldd_rewrite_script elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings PKGVERSION REPORT_BUGS_TO REPORT_BUGS_TEXI multi_arch experimental_malloc build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons add_on_subdirs base_machine submachine sysnames sysdeps_add_ons INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR NM OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES CXX_SYSINCLUDES libc_cv_gcc_static_libgcc BASH_SHELL libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_cc_with_libunwind libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie libc_cv_hashstyle fno_unit_at_a_time libc_cv_ssp libc_cv_gnu89_inline libc_cv_have_initfini no_whole_archive exceptions libc_cv_cc_submachine LIBGD have_libaudit have_libcap have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind libc_cv_cpp_asm_debuginfo use_ldconfig ldd_rewrite_script elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -887,6 +887,10 @@
--enable-kernel=VERSION compile for compatibility with kernel not older than
VERSION
--enable-all-warnings enable all useful warnings gcc can issue
+ --enable-multi-arch enable single DSO with optimizations for multiple
+ architectures
+ --enable-experimental-malloc
+ enable experimental malloc features
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -1752,6 +1756,29 @@
cat >>confdefs.h <<_ACEOF
#define REPORT_BUGS_TO "$REPORT_BUGS_TO"
_ACEOF
+
+
+# Check whether --enable-multi-arch or --disable-multi-arch was given.
+if test "${enable_multi_arch+set}" = set; then
+ enableval="$enable_multi_arch"
+ multi_arch=$enableval
+else
+ multi_arch=no
+fi;
+if test x"$multi_arch" = xyes; then
+ cat >>confdefs.h <<\_ACEOF
+#define USE_MULTIARCH 1
+_ACEOF
+
+ multi_arch_d=/multiarch
+fi
+
+
+# Check whether --enable-experimental-malloc or --disable-experimental-malloc was given.
+if test "${enable_experimental_malloc+set}" = set; then
+ enableval="$enable_experimental_malloc"
+ experimental_malloc=$enableval
+fi;
# Make sure we can run config.sub.
@@ -2181,7 +2208,7 @@
test "$v" = / && continue
for o in /$ostry ''; do
test "$o" = / && continue
- for m in $mach ''; do
+ for m in $multi_arch_d $mach ''; do
for d in $add_ons_pfx ''; do
for a in $add_ons_sfx ''; do
if test -n "$m0$m0sub$b$v$o$m$msub"; then
@@ -5242,6 +5269,37 @@
#define ASM_TYPE_DIRECTIVE_PREFIX ${libc_cv_asm_type_prefix}
_ACEOF
+fi
+
+# For the multi-arch option we need support in the assembler.
+if test "$multi_arch" = yes; then
+ if test "x$libc_cv_asm_type_prefix" != xno; then
+echo "$as_me:$LINENO: checking for assembler gnu_indirect_function symbol type support" >&5
+echo $ECHO_N "checking for assembler gnu_indirect_function symbol type support... $ECHO_C" >&6
+if test "${libc_cv_asm_gnu_indirect_function+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat > conftest.s <<EOF
+.type foo,%gnu_indirect_function
+EOF
+if ${CC-cc} -c $ASFLAGS conftest.s 1>&5 2>&5;
+then
+ libc_cv_asm_gnu_indirect_function=yes
+else
+ libc_cv_asm_gnu_indirect_function=no
+fi
+rm -f conftest*
+fi
+echo "$as_me:$LINENO: result: $libc_cv_asm_gnu_indirect_function" >&5
+echo "${ECHO_T}$libc_cv_asm_gnu_indirect_function" >&6
+ else
+ libc_cv_asm_gnu_indirect_function=no
+ fi
+ if test x"$libc_cv_asm_gnu_indirect_function" != xyes; then
+ { { echo "$as_me:$LINENO: error: --enable-multi-arch support requires assembler and linker support" >&5
+echo "$as_me: error: --enable-multi-arch support requires assembler and linker support" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
fi
echo "$as_me:$LINENO: checking for .symver assembler directive" >&5
@@ -8565,6 +8623,8 @@
s,@PKGVERSION@,$PKGVERSION,;t t
s,@REPORT_BUGS_TO@,$REPORT_BUGS_TO,;t t
s,@REPORT_BUGS_TEXI@,$REPORT_BUGS_TEXI,;t t
+s,@multi_arch@,$multi_arch,;t t
+s,@experimental_malloc@,$experimental_malloc,;t t
s,@build@,$build,;t t
s,@build_cpu@,$build_cpu,;t t
s,@build_vendor@,$build_vendor,;t t
Modified: trunk/libc/configure.in
==============================================================================
--- trunk/libc/configure.in (original)
+++ trunk/libc/configure.in Sun Mar 15 08:53:55 2009
@@ -258,6 +258,24 @@
ACX_BUGURL([http://www.eglibc.org/issues/])
AC_DEFINE_UNQUOTED([PKGVERSION], ["$PKGVERSION"], [Additional package description])
AC_DEFINE_UNQUOTED([REPORT_BUGS_TO], ["$REPORT_BUGS_TO"], [Bug reporting address])
+
+AC_ARG_ENABLE([multi-arch],
+ AC_HELP_STRING([--enable-multi-arch],
+ [enable single DSO with optimizations for multiple architectures]),
+ [multi_arch=$enableval],
+ [multi_arch=no])
+if test x"$multi_arch" = xyes; then
+ AC_DEFINE(USE_MULTIARCH)
+ multi_arch_d=/multiarch
+fi
+AC_SUBST(multi_arch)
+
+AC_ARG_ENABLE([experimental-malloc],
+ AC_HELP_STRING([--enable-experimental-malloc],
+ [enable experimental malloc features]),
+ [experimental_malloc=$enableval],
+ [])
+AC_SUBST(experimental_malloc)
AC_CANONICAL_HOST
@@ -613,7 +631,7 @@
test "$v" = / && continue
for o in /$ostry ''; do
test "$o" = / && continue
- for m in $mach ''; do
+ for m in $multi_arch_d $mach ''; do
for d in $add_ons_pfx ''; do
for a in $add_ons_sfx ''; do
if test -n "$m0$m0sub$b$v$o$m$msub"; then
@@ -1165,6 +1183,29 @@
AC_DEFINE_UNQUOTED(ASM_TYPE_DIRECTIVE_PREFIX, ${libc_cv_asm_type_prefix})
fi
+# For the multi-arch option we need support in the assembler.
+if test "$multi_arch" = yes; then
+ if test "x$libc_cv_asm_type_prefix" != xno; then
+AC_CACHE_CHECK([for assembler gnu_indirect_function symbol type support],
+ libc_cv_asm_gnu_indirect_function, [dnl
+cat > conftest.s <<EOF
+.type foo,%gnu_indirect_function
+EOF
+if ${CC-cc} -c $ASFLAGS conftest.s 1>&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD;
+then
+ libc_cv_asm_gnu_indirect_function=yes
+else
+ libc_cv_asm_gnu_indirect_function=no
+fi
+rm -f conftest*])
+ else
+ libc_cv_asm_gnu_indirect_function=no
+ fi
+ if test x"$libc_cv_asm_gnu_indirect_function" != xyes; then
+ AC_MSG_ERROR([--enable-multi-arch support requires assembler and linker support])
+ fi
+fi
+
AC_CACHE_CHECK(for .symver assembler directive, libc_cv_asm_symver_directive,
[cat > conftest.s <<EOF
${libc_cv_dot_text}
Modified: trunk/libc/crypt/sha256test.c
==============================================================================
--- trunk/libc/crypt/sha256test.c (original)
+++ trunk/libc/crypt/sha256test.c Sun Mar 15 08:53:55 2009
@@ -84,7 +84,17 @@
"\xf1\x80\x9a\x48\xa4\x97\x20\x0e\x04\x6d\x39\xcc\xc7\x11\x2c\xd0";
if (memcmp (expected, sum, 32) != 0)
{
- printf ("test %d failed\n", cnt);
+ printf ("test %d failed\n", cnt++);
+ result = 1;
+ }
+
+ __sha256_init_ctx (&ctx);
+ for (int i = 0; i < 100000; ++i)
+ __sha256_process_bytes (buf, 10, &ctx);
+ __sha256_finish_ctx (&ctx, sum);
+ if (memcmp (expected, sum, 32) != 0)
+ {
+ printf ("test %d failed\n", cnt++);
result = 1;
}
Modified: trunk/libc/ctype/ctype.h
==============================================================================
--- trunk/libc/ctype/ctype.h (original)
+++ trunk/libc/ctype/ctype.h Sun Mar 15 08:53:55 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,95,96,97,98,99,2001,2002,2004,2007,2008
+/* Copyright (C) 1991,92,93,95,96,97,98,99,2001,2002,2004,2007,2008,2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -216,7 +216,7 @@
#endif /* Not __NO_CTYPE. */
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K8
/* The concept of one static locale per category is not very well
thought out. Many applications will need to process its data using
information from several different locales. Another application is
@@ -292,7 +292,7 @@
# define __isblank_l(c,l) __isctype_l((c), _ISblank, (l))
-# if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN
+# if defined __USE_SVID || defined __USE_MISC
# define __isascii_l(c,l) ((l), __isascii (c))
# define __toascii_l(c,l) ((l), __toascii (c))
# endif
@@ -311,14 +311,14 @@
# define isblank_l(c,l) __isblank_l ((c), (l))
-# if defined __USE_SVID || defined __USE_MISC || defined __USE_XOPEN
+# if defined __USE_SVID || defined __USE_MISC
# define isascii_l(c,l) __isascii_l ((c), (l))
# define toascii_l(c,l) __toascii_l ((c), (l))
# endif
# endif /* Not __NO_CTYPE. */
-#endif /* Use GNU. */
+#endif /* Use POSIX 2008. */
__END_DECLS
Modified: trunk/libc/dirent/dirent.h
==============================================================================
--- trunk/libc/dirent/dirent.h (original)
+++ trunk/libc/dirent/dirent.h Sun Mar 15 08:53:55 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2000, 2003-2005, 2009 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
@@ -134,7 +134,7 @@
marked with __THROW. */
extern DIR *opendir (__const char *__name) __nonnull ((1));
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K8
/* Same as opendir, but open the stream on the file descriptor FD.
This function is a possible cancellation point and therefore not
@@ -218,7 +218,7 @@
extern long int telldir (DIR *__dirp) __THROW __nonnull ((1));
#endif
-#if defined __USE_BSD || defined __USE_MISC
+#if defined __USE_BSD || defined __USE_MISC || defined __XOPEN_2K8
/* Return the file descriptor used by DIRP. */
extern int dirfd (DIR *__dirp) __THROW __nonnull ((1));
@@ -227,15 +227,17 @@
# define dirfd(dirp) _DIR_dirfd (dirp)
# endif
-# ifndef MAXNAMLEN
+# if defined __USE_BSD || defined __USE_MISC
+# ifndef MAXNAMLEN
/* Get the definitions of the POSIX.1 limits. */
# include <bits/posix1_lim.h>
/* `MAXNAMLEN' is the BSD name for what POSIX calls `NAME_MAX'. */
-# ifdef NAME_MAX
-# define MAXNAMLEN NAME_MAX
-# else
-# define MAXNAMLEN 255
+# ifdef NAME_MAX
+# define MAXNAMLEN NAME_MAX
+# else
+# define MAXNAMLEN 255
+# endif
# endif
# endif
@@ -294,57 +296,59 @@
__THROW __attribute_pure__ __nonnull ((1, 2));
# endif
-# ifdef __USE_GNU
-/* Function to compare two `struct dirent's by name & version. */
-# ifndef __USE_FILE_OFFSET64
-extern int versionsort (__const void *__e1, __const void *__e2)
- __THROW __attribute_pure__ __nonnull ((1, 2));
-# else
-# ifdef __REDIRECT
-extern int __REDIRECT_NTH (versionsort,
- (__const void *__e1, __const void *__e2),
- versionsort64)
- __attribute_pure__ __nonnull ((1, 2));
-# else
-# define versionsort versionsort64
-# endif
-# endif
-
-# ifdef __USE_LARGEFILE64
-extern int versionsort64 (__const void *__e1, __const void *__e2)
- __THROW __attribute_pure__ __nonnull ((1, 2));
-# endif
-# endif
-
+
+# if defined __USE_BSD || defined __USE_MISC
/* Read directory entries from FD into BUF, reading at most NBYTES.
Reading starts at offset *BASEP, and *BASEP is updated with the new
position after reading. Returns the number of bytes read; zero when at
end of directory; or -1 for errors. */
-# ifndef __USE_FILE_OFFSET64
+# ifndef __USE_FILE_OFFSET64
extern __ssize_t getdirentries (int __fd, char *__restrict __buf,
size_t __nbytes,
__off_t *__restrict __basep)
__THROW __nonnull ((2, 4));
-# else
-# ifdef __REDIRECT
+# else
+# ifdef __REDIRECT
extern __ssize_t __REDIRECT_NTH (getdirentries,
(int __fd, char *__restrict __buf,
size_t __nbytes,
__off64_t *__restrict __basep),
getdirentries64) __nonnull ((2, 4));
-# else
-# define getdirentries getdirentries64
-# endif
-# endif
-
-# ifdef __USE_LARGEFILE64
+# else
+# define getdirentries getdirentries64
+# endif
+# endif
+
+# ifdef __USE_LARGEFILE64
extern __ssize_t getdirentries64 (int __fd, char *__restrict __buf,
size_t __nbytes,
__off64_t *__restrict __basep)
__THROW __nonnull ((2, 4));
-# endif
-
-#endif /* Use BSD or misc. */
+# endif
+# endif /* Use BSD or misc. */
+#endif /* Use BSD or misc or XPG7. */
+
+#ifdef __USE_GNU
+/* Function to compare two `struct dirent's by name & version. */
+# ifndef __USE_FILE_OFFSET64
+extern int versionsort (__const void *__e1, __const void *__e2)
+ __THROW __attribute_pure__ __nonnull ((1, 2));
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT_NTH (versionsort,
+ (__const void *__e1, __const void *__e2),
+ versionsort64)
+ __attribute_pure__ __nonnull ((1, 2));
+# else
+# define versionsort versionsort64
+# endif
+# endif
+
+# ifdef __USE_LARGEFILE64
+extern int versionsort64 (__const void *__e1, __const void *__e2)
+ __THROW __attribute_pure__ __nonnull ((1, 2));
+# endif
+#endif /* Use GNU. */
__END_DECLS
Modified: trunk/libc/elf/dl-runtime.c
==============================================================================
--- trunk/libc/elf/dl-runtime.c (original)
+++ trunk/libc/elf/dl-runtime.c Sun Mar 15 08:53:55 2009
@@ -1,5 +1,5 @@
/* On-demand PLT fixup for shared objects.
- Copyright (C) 1995-2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1995-2006, 2007, 2008, 2009 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
@@ -45,6 +45,12 @@
#ifndef ARCH_FIXUP_ATTRIBUTE
# define ARCH_FIXUP_ATTRIBUTE
#endif
+
+#ifndef reloc_offset
+# define reloc_offset reloc_arg
+# define reloc_index reloc_arg / sizeof (PLTREL)
+#endif
+
/* This function is called through a special trampoline from the PLT the
@@ -63,7 +69,7 @@
# endif
/* GKM FIXME: Fix trampoline to pass bounds so we can do
without the `__unbounded' qualifier. */
- struct link_map *__unbounded l, ElfW(Word) reloc_offset)
+ struct link_map *__unbounded l, ElfW(Word) reloc_arg)
{
const ElfW(Sym) *const symtab
= (const void *) D_PTR (l, l_info[DT_SYMTAB]);
@@ -130,6 +136,9 @@
/* And now perhaps the relocation addend. */
value = elf_machine_plt_value (l, reloc, value);
+ if (__builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0))
+ value = ((DL_FIXUP_VALUE_TYPE (*) (void)) value) ();
+
/* Finally, fix up the plt itself. */
if (__builtin_expect (GLRO(dl_bind_not), 0))
return value;
@@ -139,22 +148,20 @@
#endif
#if !defined PROF && !defined ELF_MACHINE_NO_PLT && !__BOUNDED_POINTERS__
-
DL_FIXUP_VALUE_TYPE
__attribute ((noinline)) ARCH_FIXUP_ATTRIBUTE
_dl_profile_fixup (
#ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
ELF_MACHINE_RUNTIME_FIXUP_ARGS,
#endif
- struct link_map *l, ElfW(Word) reloc_offset,
+ struct link_map *l, ElfW(Word) reloc_arg,
ElfW(Addr) retaddr, void *regs, long int *framesizep)
{
void (*mcount_fct) (ElfW(Addr), ElfW(Addr)) = INTUSE(_dl_mcount);
/* This is the address in the array where we store the result of previous
relocations. */
- struct reloc_result *reloc_result
- = &l->l_reloc_result[reloc_offset / sizeof (PLTREL)];
+ struct reloc_result *reloc_result = &l->l_reloc_result[reloc_index];
DL_FIXUP_VALUE_TYPE *resultp = &reloc_result->addr;
DL_FIXUP_VALUE_TYPE value = *resultp;
@@ -215,12 +222,21 @@
defsym != NULL
? LOOKUP_VALUE_ADDRESS (result)
+ defsym->st_value : 0);
+
+ if (__builtin_expect (ELFW(ST_TYPE) (defsym->st_info)
+ == STT_GNU_IFUNC, 0))
+ value = ((DL_FIXUP_VALUE_TYPE (*) (void)) value) ();
}
else
{
/* We already found the symbol. The module (and therefore its load
address) is also known. */
value = DL_FIXUP_MAKE_VALUE (l, l->l_addr + refsym->st_value);
+
+ if (__builtin_expect (ELFW(ST_TYPE) (refsym->st_info)
+ == STT_GNU_IFUNC, 0))
+ value = ((DL_FIXUP_VALUE_TYPE (*) (void)) value) ();
+
result = l;
}
/* And now perhaps the relocation addend. */
@@ -403,7 +419,7 @@
#include <stdio.h>
void
ARCH_FIXUP_ATTRIBUTE
-_dl_call_pltexit (struct link_map *l, ElfW(Word) reloc_offset,
+_dl_call_pltexit (struct link_map *l, ElfW(Word) reloc_arg,
const void *inregs, void *outregs)
{
#ifdef SHARED
@@ -411,8 +427,7 @@
relocations. */
// XXX Maybe the bound information must be stored on the stack since
// XXX with bind_not a new value could have been stored in the meantime.
- struct reloc_result *reloc_result
- = &l->l_reloc_result[reloc_offset / sizeof (PLTREL)];
+ struct reloc_result *reloc_result = &l->l_reloc_result[reloc_index];
ElfW(Sym) *defsym = ((ElfW(Sym) *) D_PTR (reloc_result->bound,
l_info[DT_SYMTAB])
+ reloc_result->boundndx);
Modified: trunk/libc/elf/dl-sysdep.c
==============================================================================
--- trunk/libc/elf/dl-sysdep.c (original)
+++ trunk/libc/elf/dl-sysdep.c Sun Mar 15 08:53:55 2009
@@ -269,36 +269,37 @@
{
static const struct
{
- const char label[20];
- enum { unknown = 0, dec, hex, str, ignore } form;
+ const char label[17];
+ enum { unknown = 0, dec, hex, str, ignore } form : 8;
} auxvars[] =
{
- [AT_EXECFD - 2] = { "AT_EXECFD: ", dec },
- [AT_EXECFN - 2] = { "AT_EXECFN: ", str },
- [AT_PHDR - 2] = { "AT_PHDR: 0x", hex },
- [AT_PHENT - 2] = { "AT_PHENT: ", dec },
- [AT_PHNUM - 2] = { "AT_PHNUM: ", dec },
- [AT_PAGESZ - 2] = { "AT_PAGESZ: ", dec },
- [AT_BASE - 2] = { "AT_BASE: 0x", hex },
- [AT_FLAGS - 2] = { "AT_FLAGS: 0x", hex },
- [AT_ENTRY - 2] = { "AT_ENTRY: 0x", hex },
- [AT_NOTELF - 2] = { "AT_NOTELF: ", hex },
- [AT_UID - 2] = { "AT_UID: ", dec },
- [AT_EUID - 2] = { "AT_EUID: ", dec },
- [AT_GID - 2] = { "AT_GID: ", dec },
- [AT_EGID - 2] = { "AT_EGID: ", dec },
- [AT_PLATFORM - 2] = { "AT_PLATFORM: ", str },
- [AT_HWCAP - 2] = { "AT_HWCAP: ", hex },
- [AT_CLKTCK - 2] = { "AT_CLKTCK: ", dec },
- [AT_FPUCW - 2] = { "AT_FPUCW: ", hex },
- [AT_DCACHEBSIZE - 2] = { "AT_DCACHEBSIZE: 0x", hex },
- [AT_ICACHEBSIZE - 2] = { "AT_ICACHEBSIZE: 0x", hex },
- [AT_UCACHEBSIZE - 2] = { "AT_UCACHEBSIZE: 0x", hex },
- [AT_IGNOREPPC - 2] = { "AT_IGNOREPPC", ignore },
- [AT_SECURE - 2] = { "AT_SECURE: ", dec },
- [AT_SYSINFO - 2] = { "AT_SYSINFO: 0x", hex },
- [AT_SYSINFO_EHDR - 2] = { "AT_SYSINFO_EHDR: 0x", hex },
- [AT_RANDOM - 2] = { "AT_RANDOM: 0x", hex },
+ [AT_EXECFD - 2] = { "EXECFD: ", dec },
+ [AT_EXECFN - 2] = { "EXECFN: ", str },
+ [AT_PHDR - 2] = { "PHDR: 0x", hex },
+ [AT_PHENT - 2] = { "PHENT: ", dec },
+ [AT_PHNUM - 2] = { "PHNUM: ", dec },
+ [AT_PAGESZ - 2] = { "PAGESZ: ", dec },
+ [AT_BASE - 2] = { "BASE: 0x", hex },
+ [AT_FLAGS - 2] = { "FLAGS: 0x", hex },
+ [AT_ENTRY - 2] = { "ENTRY: 0x", hex },
+ [AT_NOTELF - 2] = { "NOTELF: ", hex },
+ [AT_UID - 2] = { "UID: ", dec },
+ [AT_EUID - 2] = { "EUID: ", dec },
+ [AT_GID - 2] = { "GID: ", dec },
+ [AT_EGID - 2] = { "EGID: ", dec },
+ [AT_PLATFORM - 2] = { "PLATFORM: ", str },
+ [AT_HWCAP - 2] = { "HWCAP: ", hex },
+ [AT_CLKTCK - 2] = { "CLKTCK: ", dec },
+ [AT_FPUCW - 2] = { "FPUCW: ", hex },
+ [AT_DCACHEBSIZE - 2] = { "DCACHEBSIZE: 0x", hex },
+ [AT_ICACHEBSIZE - 2] = { "ICACHEBSIZE: 0x", hex },
+ [AT_UCACHEBSIZE - 2] = { "UCACHEBSIZE: 0x", hex },
+ [AT_IGNOREPPC - 2] = { "IGNOREPPC", ignore },
+ [AT_SECURE - 2] = { "SECURE: ", dec },
+ [AT_BASE_PLATFORM - 2] = { "BASE_PLATFORM:", str },
+ [AT_SYSINFO - 2] = { "SYSINFO: 0x", hex },
+ [AT_SYSINFO_EHDR - 2] = { "SYSINFO_EHDR: 0x", hex },
+ [AT_RANDOM - 2] = { "RANDOM: 0x", hex },
};
unsigned int idx = (unsigned int) (av->a_type - 2);
@@ -327,7 +328,7 @@
val = _itoa ((unsigned long int) av->a_un.a_val,
buf + sizeof buf - 1, 16, 0);
- _dl_printf ("%s%s\n", auxvars[idx].label, val);
+ _dl_printf ("AT_%s%s\n", auxvars[idx].label, val);
continue;
}
Modified: trunk/libc/elf/do-lookup.h
==============================================================================
--- trunk/libc/elf/do-lookup.h (original)
+++ trunk/libc/elf/do-lookup.h Sun Mar 15 08:53:55 2009
@@ -1,5 +1,5 @@
/* Look up a symbol in the loaded objects.
- Copyright (C) 1995-2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+ Copyright (C) 1995-2007, 2008 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
@@ -88,10 +88,12 @@
if (__builtin_expect (ELFW(ST_TYPE) (sym->st_info) > STT_FUNC
&& ELFW(ST_TYPE) (sym->st_info) != STT_COMMON
- && ELFW(ST_TYPE) (sym->st_info) != STT_TLS, 0))
- /* Ignore all but STT_NOTYPE, STT_OBJECT, STT_FUNC, and STT_COMMON
- entries (and STT_TLS if TLS is supported) since these
- are no code/data definitions. */
+ && ELFW(ST_TYPE) (sym->st_info) != STT_TLS
+ && ELFW(ST_TYPE) (sym->st_info) != STT_GNU_IFUNC,
+ 0))
+ /* Ignore all but STT_NOTYPE, STT_OBJECT, STT_FUNC, STT_COMMON,
+ STT_TLS, and STT_GNU_IFUNC since these are no code/data
+ definitions. */
return NULL;
if (sym != ref && strcmp (strtab + sym->st_name, undef_name))
Modified: trunk/libc/elf/elf.h
==============================================================================
--- trunk/libc/elf/elf.h (original)
+++ trunk/libc/elf/elf.h Sun Mar 15 08:53:55 2009
@@ -459,6 +459,7 @@
#define STT_TLS 6 /* Symbol is thread-local data object*/
#define STT_NUM 7 /* Number of defined types. */
#define STT_LOOS 10 /* Start of OS-specific */
+#define STT_GNU_IFUNC 10 /* Symbol is indirect code object */
#define STT_HIOS 12 /* End of OS-specific */
#define STT_LOPROC 13 /* Start of processor-specific */
#define STT_HIPROC 15 /* End of processor-specific */
Modified: trunk/libc/elf/sprof.c
==============================================================================
--- trunk/libc/elf/sprof.c (original)
+++ trunk/libc/elf/sprof.c Sun Mar 15 08:53:55 2009
@@ -87,7 +87,7 @@
/* Short description of program. */
static const char doc[] = N_("Read and display shared object profiling data.");
-//For bug reporting instructions, please see:\n \
+//For bug reporting instructions, please see:\n
//<http://www.gnu.org/software/libc/bugs.html>.\n");
/* Strings for arguments in help texts. */
Modified: trunk/libc/include/features.h
==============================================================================
--- trunk/libc/include/features.h (original)
+++ trunk/libc/include/features.h Sun Mar 15 08:53:55 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1992,1993,1995-2006,2007 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1993,1995-2006,2007,2009 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
@@ -29,9 +29,10 @@
if >=199309L, add IEEE Std 1003.1b-1993;
if >=199506L, add IEEE Std 1003.1c-1995;
if >=200112L, all of IEEE 1003.1-2004
+ if >=200809L, all of IEEE 1003.1-2008
_XOPEN_SOURCE Includes POSIX and XPG things. Set to 500 if
Single Unix conformance is wanted, to 600 for the
- upcoming sixth revision.
+ sixth revision, to 700 for the seventh revision.
_XOPEN_SOURCE_EXTENDED XPG things and X/Open Unix extensions.
_LARGEFILE_SOURCE Some more functions for correct standard I/O.
_LARGEFILE64_SOURCE Additional functionality from LFS for large files.
@@ -65,6 +66,7 @@
__USE_XOPEN_EXTENDED Define X/Open Unix things.
__USE_UNIX98 Define Single Unix V2 things.
__USE_XOPEN2K Define XPG6 things.
+ __USE_XOPEN2K8 Define XPG7 things.
__USE_LARGEFILE Define correct standard I/O things.
__USE_LARGEFILE64 Define LFS things with separate names.
__USE_FILE_OFFSET64 Define 64bit interface as default.
@@ -100,6 +102,7 @@
#undef __USE_XOPEN_EXTENDED
#undef __USE_UNIX98
#undef __USE_XOPEN2K
+#undef __USE_XOPEN2K8
#undef __USE_LARGEFILE
#undef __USE_LARGEFILE64
#undef __USE_FILE_OFFSET64
@@ -152,9 +155,9 @@
# undef _POSIX_SOURCE
# define _POSIX_SOURCE 1
# undef _POSIX_C_SOURCE
-# define _POSIX_C_SOURCE 200112L
+# define _POSIX_C_SOURCE 200809L
# undef _XOPEN_SOURCE
-# define _XOPEN_SOURCE 600
+# define _XOPEN_SOURCE 700
# undef _XOPEN_SOURCE_EXTENDED
# define _XOPEN_SOURCE_EXTENDED 1
# undef _LARGEFILE64_SOURCE
@@ -201,9 +204,12 @@
# define _POSIX_C_SOURCE 2
# elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 600
# define _POSIX_C_SOURCE 199506L
+# elif defined _XOPEN_SOURCE && (_XOPEN_SOURCE - 0) < 700
+# define _POSIX_C_SOURCE 200112L
# else
-# define _POSIX_C_SOURCE 200112L
-# endif
+# define _POSIX_C_SOURCE 200809L
+# endif
+# define __USE_POSIX_IMPLICITLY 1
#endif
#if defined _POSIX_SOURCE || _POSIX_C_SOURCE >= 1 || defined _XOPEN_SOURCE
@@ -224,6 +230,12 @@
#if (_POSIX_C_SOURCE - 0) >= 200112L
# define __USE_XOPEN2K 1
+#endif
+
+#if (_POSIX_C_SOURCE - 0) >= 200809L
+# define __USE_XOPEN2K8 1
+# undef _ATFILE_SOURCE
+# define _ATFILE_SOURCE 1
#endif
#ifdef _XOPEN_SOURCE
@@ -234,6 +246,9 @@
# undef _LARGEFILE_SOURCE
# define _LARGEFILE_SOURCE 1
# if (_XOPEN_SOURCE - 0) >= 600
+# if (_XOPEN_SOURCE - 0) >= 700
+# define __USE_XOPEN2K8 1
+# endif
# define __USE_XOPEN2K 1
# undef __USE_ISOC99
# define __USE_ISOC99 1
Modified: trunk/libc/include/libc-symbols.h
==============================================================================
--- trunk/libc/include/libc-symbols.h (original)
+++ trunk/libc/include/libc-symbols.h Sun Mar 15 08:53:55 2009
@@ -1,7 +1,6 @@
/* Support macros for making weak and strong aliases for symbols,
and for using symbol sets and linker warnings with GNU ld.
- Copyright (C) 1995-1998,2000-2003,2004,2005,2006
- Free Software Foundation, Inc.
+ Copyright (C) 1995-1998, 2000-2006, 2008 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
@@ -835,4 +834,15 @@
# define compat_data_section .section ".data.compat", "aw";
#endif
+/* Marker used for indirection function symbols. */
+#define libc_ifunc(name, expr) \
+ extern void *name##_ifunc (void) __asm__ (#name); \
+ void *name##_ifunc (void) \
+ { \
+ INIT_ARCH (); \
+ __typeof (name) *res = expr; \
+ return res; \
+ } \
+ __asm__ (".type " #name ", %gnu_indirect_function");
+
#endif /* libc-symbols.h */
Modified: trunk/libc/include/stdio.h
==============================================================================
--- trunk/libc/include/stdio.h (original)
+++ trunk/libc/include/stdio.h Sun Mar 15 08:53:55 2009
@@ -152,6 +152,7 @@
libc_hidden_proto (fwrite_unlocked)
libc_hidden_proto (fgets_unlocked)
libc_hidden_proto (fputs_unlocked)
+libc_hidden_proto (fmemopen)
libc_hidden_proto (open_memstream)
libc_hidden_proto (__libc_fatal)
libc_hidden_proto (__vsprintf_chk)
Modified: trunk/libc/io/fcntl.h
==============================================================================
--- trunk/libc/io/fcntl.h (original)
+++ trunk/libc/io/fcntl.h Sun Mar 15 08:53:55 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1992,1994-2001,2003,2004,2005,2006,2007
+/* Copyright (C) 1991,1992,1994-2001,2003,2004,2005,2006,2007, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -158,11 +158,11 @@
# ifndef __USE_FILE_OFFSET64
extern int lockf (int __fd, int __cmd, __off_t __len);
# else
-# ifdef __REDIRECT
+# ifdef __REDIRECT
extern int __REDIRECT (lockf, (int __fd, int __cmd, __off64_t __len), lockf64);
-# else
-# define lockf lockf64
-# endif
+# else
+# define lockf lockf64
+# endif
# endif
# ifdef __USE_LARGEFILE64
extern int lockf64 (int __fd, int __cmd, __off64_t __len);
@@ -176,13 +176,13 @@
extern int posix_fadvise (int __fd, __off_t __offset, __off_t __len,
int __advise) __THROW;
# else
-# ifdef __REDIRECT_NTH
+ # ifdef __REDIRECT_NTH
extern int __REDIRECT_NTH (posix_fadvise, (int __fd, __off64_t __offset,
__off64_t __len, int __advise),
posix_fadvise64);
-# else
-# define posix_fadvise posix_fadvise64
-# endif
+# else
+# define posix_fadvise posix_fadvise64
+# endif
# endif
# ifdef __USE_LARGEFILE64
extern int posix_fadvise64 (int __fd, __off64_t __offset, __off64_t __len,
@@ -197,13 +197,13 @@
# ifndef __USE_FILE_OFFSET64
extern int posix_fallocate (int __fd, __off_t __offset, __off_t __len);
# else
-# ifdef __REDIRECT
+ # ifdef __REDIRECT
extern int __REDIRECT (posix_fallocate, (int __fd, __off64_t __offset,
__off64_t __len),
posix_fallocate64);
-# else
-# define posix_fallocate posix_fallocate64
-# endif
+# else
+# define posix_fallocate posix_fallocate64
+# endif
# endif
# ifdef __USE_LARGEFILE64
extern int posix_fallocate64 (int __fd, __off64_t __offset, __off64_t __len);
Modified: trunk/libc/io/sys/stat.h
==============================================================================
--- trunk/libc/io/sys/stat.h (original)
+++ trunk/libc/io/sys/stat.h Sun Mar 15 08:53:55 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995-2004, 2005, 2006, 2007
+/* Copyright (C) 1991, 1992, 1995-2004, 2005, 2006, 2007, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -254,7 +254,7 @@
__THROW __nonnull ((2, 3));
#endif
-#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
+#if defined __USE_BSD || defined __USE_XOPEN_EXTENDED || defined __USE_XOPEN2K
# ifndef __USE_FILE_OFFSET64
/* Get file attributes about FILE and put them in BUF.
If FILE is a symbolic link, do not follow it. */
@@ -298,7 +298,8 @@
#ifdef __USE_ATFILE
/* Set file access permissions of FILE relative to
the directory FD is open on. */
-extern int fchmodat (int __fd, __const char *__file, __mode_t mode, int __flag)
+extern int fchmodat (int __fd, __const char *__file, __mode_t __mode,
+ int __flag)
__THROW __nonnull ((2)) __wur;
#endif /* Use ATFILE. */
@@ -332,14 +333,14 @@
#if defined __USE_MISC || defined __USE_BSD || defined __USE_XOPEN_EXTENDED
extern int mknod (__const char *__path, __mode_t __mode, __dev_t __dev)
__THROW __nonnull ((1));
-#endif
-
-#ifdef __USE_ATFILE
+
+# ifdef __USE_ATFILE
/* Like mknod, create a new device file with permission bits MODE and
device number DEV. But interpret relative PATH names relative to
the directory associated with FD. */
extern int mknodat (int __fd, __const char *__path, __mode_t __mode,
__dev_t __dev) __THROW __nonnull ((2));
+# endif
#endif
@@ -364,8 +365,7 @@
__THROW __nonnull ((2));
#endif
-#ifdef __USE_GNU
-/* XXX This will change to the macro for the next 2008 POSIX revision. */
+#ifdef __USE_XOPEN2K8
/* Set file access and modification times of the file associated with FD. */
extern int futimens (int __fd, __const struct timespec __times[2]) __THROW;
#endif
Modified: trunk/libc/libio/fmemopen.c
==============================================================================
--- trunk/libc/libio/fmemopen.c (original)
+++ trunk/libc/libio/fmemopen.c Sun Mar 15 08:53:55 2009
@@ -1,5 +1,6 @@
/* Fmemopen implementation.
- Copyright (C) 2000, 2002, 2005, 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002, 2005, 2006, 2008, 2009
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Hanno Mueller, kontakt@xxxxxxxx, 2000.
@@ -258,3 +259,4 @@
return _IO_fopencookie (c, mode, iof);
}
+libc_hidden_def (fmemopen)
Modified: trunk/libc/libio/stdio.h
==============================================================================
--- trunk/libc/libio/stdio.h (original)
+++ trunk/libc/libio/stdio.h Sun Mar 15 08:53:55 2009
@@ -1,5 +1,5 @@
/* Define ISO C stdio on top of C++ iostreams.
- Copyright (C) 1991, 1994-2007, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1994-2007, 2008, 2009 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
@@ -289,7 +289,9 @@
extern FILE *fopencookie (void *__restrict __magic_cookie,
__const char *__restrict __modes,
_IO_cookie_io_functions_t __io_funcs) __THROW __wur;
-
+#endif
+
+#ifdef __USE_XOPEN2K8
/* Create a new stream that refers to a memory buffer. */
extern FILE *fmemopen (void *__s, size_t __len, __const char *__modes)
__THROW __wur;
@@ -380,7 +382,9 @@
extern int asprintf (char **__restrict __ptr,
__const char *__restrict __fmt, ...)
__THROW __attribute__ ((__format__ (__printf__, 2, 3))) __wur;
-
+#endif
+
+#ifdef __USE_XOPEN2K8
/* Write formatted output to a file descriptor.
These functions are not part of POSIX and therefore no official
@@ -620,7 +624,7 @@
#endif
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K8
/* Read up to (and including) a DELIMITER from STREAM into *LINEPTR
(and null-terminate it). *LINEPTR is a pointer returned from malloc (or
NULL), pointing to *N characters of space. It is realloc'd as
Modified: trunk/libc/locale/iso-639.def
==============================================================================
--- trunk/libc/locale/iso-639.def (original)
+++ trunk/libc/locale/iso-639.def Sun Mar 15 08:53:55 2009
@@ -303,6 +303,7 @@
DEFINE_LANGUAGE_CODE3 ("Mende", men, men)
DEFINE_LANGUAGE_CODE3 ("Mi'kmaq; Micmac", mic, mic)
DEFINE_LANGUAGE_CODE3 ("Minangkabau", min, min)
+DEFINE_LANGUAGE_CODE3 ("Min Nan", nan, nan)
DEFINE_LANGUAGE_CODE3 ("Mirandese", mwl, mwl)
DEFINE_LANGUAGE_CODE3 ("Miscellaneous languages", mis, mis)
DEFINE_LANGUAGE_CODE3 ("Mohawk", moh, moh)
Modified: trunk/libc/locale/langinfo.h
==============================================================================
--- trunk/libc/locale/langinfo.h (original)
+++ trunk/libc/locale/langinfo.h Sun Mar 15 08:53:55 2009
@@ -1,5 +1,5 @@
/* Access to locale-dependent parameters.
- Copyright (C) 1995-2002,2003,2004,2005 Free Software Foundation, Inc.
+ Copyright (C) 1995-2002,2003,2004,2005,2009 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
@@ -582,7 +582,7 @@
extern char *nl_langinfo (nl_item __item) __THROW;
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K
/* This interface is for the extended locale model. See <locale.h> for
more information. */
@@ -590,7 +590,7 @@
# include <xlocale.h>
/* Just like nl_langinfo but get the information from the locale object L. */
-extern char *nl_langinfo_l (nl_item __item, __locale_t l);
+extern char *nl_langinfo_l (nl_item __item, __locale_t __l);
#endif
__END_DECLS
Modified: trunk/libc/locale/locale.h
==============================================================================
--- trunk/libc/locale/locale.h (original)
+++ trunk/libc/locale/locale.h Sun Mar 15 08:53:55 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,1992,1995-2002,2007 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1992,1995-2002,2007,2009 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
@@ -130,7 +130,7 @@
__END_NAMESPACE_STD
-#ifdef __USE_GNU
+#ifdef __USE_XOPEN2K
/* The concept of one static locale per category is not very well
thought out. Many applications will need to process its data using
information from several different locales. Another application is
@@ -144,8 +144,6 @@
/* Get locale datatype definition. */
# include <xlocale.h>
-
-typedef __locale_t locale_t;
/* Return a reference to a data structure representing a set of locale
datasets. Unlike for the CATEGORY parameter for `setlocale' the
Modified: trunk/libc/locale/xlocale.h
==============================================================================
--- trunk/libc/locale/xlocale.h (original)
+++ trunk/libc/locale/xlocale.h Sun Mar 15 08:53:55 2009
@@ -1,5 +1,5 @@
/* Definition of locale datatype.
- Copyright (C) 1997,2000,02 Free Software Foundation, Inc.
+ Copyright (C) 1997,2000,2002,2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@xxxxxxxxxx>, 1997.
@@ -39,4 +39,7 @@
const char *__names[13];
} *__locale_t;
+/* POSIX 2008 makes locale_t official. */
+typedef __locale_t locale_t;
+
#endif /* xlocale.h */
Modified: trunk/libc/localedata/ChangeLog
==============================================================================
--- trunk/libc/localedata/ChangeLog (original)
+++ trunk/libc/localedata/ChangeLog Sun Mar 15 08:53:55 2009
@@ -1,3 +1,10 @@
+2009-03-14 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #9916]
+ * SUPPORTED (SUPPORTED-LOCALES): Add nan_TW@latin.
+ * locales/nan_TW@latin: New file.
+ Contributed by Arne Goetje.
+
2009-02-11 Ulrich Drepper <drepper@xxxxxxxxxx>
* locales/iso14651_t1_common: Add rules for sorting Malayalam.
Modified: trunk/libc/localedata/SUPPORTED
==============================================================================
--- trunk/libc/localedata/SUPPORTED (original)
+++ trunk/libc/localedata/SUPPORTED Sun Mar 15 08:53:55 2009
@@ -287,6 +287,7 @@
ms_MY/ISO-8859-1 \
mt_MT.UTF-8/UTF-8 \
mt_MT/ISO-8859-3 \
+nan_TW@latin/UTF-8 \
nb_NO.UTF-8/UTF-8 \
nb_NO/ISO-8859-1 \
nds_DE/UTF-8 \
Modified: trunk/libc/malloc/Makefile
==============================================================================
--- trunk/libc/malloc/Makefile (original)
+++ trunk/libc/malloc/Makefile Sun Mar 15 08:53:55 2009
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007
+# Copyright (C) 1991-1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2009
# Free Software Foundation, Inc.
# This file is part of the GNU C Library.
@@ -124,6 +124,9 @@
tst-mcheck-ENV = MALLOC_CHECK_=3
+ifeq ($(experimental-malloc),yes)
+CPPFLAGS-malloc.c += -DPER_THREAD -DATOMIC_FASTBINS
+endif
# Uncomment this for test releases. For public releases it is too expensive.
#CPPFLAGS-malloc.o += -DMALLOC_DEBUG=1
Modified: trunk/libc/malloc/arena.c
==============================================================================
--- trunk/libc/malloc/arena.c (original)
+++ trunk/libc/malloc/arena.c Sun Mar 15 08:53:55 2009
@@ -1,5 +1,5 @@
/* Malloc implementation for multiple threads without lock contention.
- Copyright (C) 2001,2002,2003,2004,2005,2006,2007
+ Copyright (C) 2001,2002,2003,2004,2005,2006,2007,2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Wolfram Gloger <wg@xxxxxxxxx>, 2001.
@@ -78,6 +78,10 @@
static tsd_key_t arena_key;
static mutex_t list_lock;
+#ifdef PER_THREAD
+static size_t narenas;
+static mstate free_list;
+#endif
#if THREAD_STATS
static int stat_n_heaps;
@@ -105,13 +109,30 @@
in the new arena. */
#define arena_get(ptr, size) do { \
+ arena_lookup(ptr); \
+ arena_lock(ptr, size); \
+} while(0)
+
+#define arena_lookup(ptr) do { \
Void_t *vptr = NULL; \
ptr = (mstate)tsd_getspecific(arena_key, vptr); \
+} while(0)
+
+#ifdef PER_THREAD
+#define arena_lock(ptr, size) do { \
+ if(ptr) \
+ (void)mutex_lock(&ptr->mutex); \
+ else \
+ ptr = arena_get2(ptr, (size)); \
+} while(0)
+#else
+#define arena_lock(ptr, size) do { \
if(ptr && !mutex_trylock(&ptr->mutex)) { \
THREAD_STAT(++(ptr->stat_lock_direct)); \
} else \
ptr = arena_get2(ptr, (size)); \
} while(0)
+#endif
/* find the heap and corresponding arena for a given ptr */
@@ -219,6 +240,11 @@
}
#endif
+#ifdef ATOMIC_FASTBINS
+ ar_ptr = arena_for_chunk(p);
+ tsd_getspecific(arena_key, vptr);
+ _int_free(ar_ptr, p, vptr == ATFORK_ARENA_PTR);
+#else
ar_ptr = arena_for_chunk(p);
tsd_getspecific(arena_key, vptr);
if(vptr != ATFORK_ARENA_PTR)
@@ -226,6 +252,7 @@
_int_free(ar_ptr, p);
if(vptr != ATFORK_ARENA_PTR)
(void)mutex_unlock(&ar_ptr->mutex);
+#endif
}
@@ -312,8 +339,17 @@
__malloc_hook = save_malloc_hook;
__free_hook = save_free_hook;
#endif
+#ifdef PER_THREAD
+ free_list = NULL;
+#endif
for(ar_ptr = &main_arena;;) {
mutex_init(&ar_ptr->mutex);
+#ifdef PER_THREAD
+ if (ar_ptr != save_arena) {
+ ar_ptr->next_free = free_list;
+ free_list = ar_ptr;
+ }
+#endif
ar_ptr = ar_ptr->next;
if(ar_ptr == &main_arena) break;
}
@@ -377,6 +413,11 @@
mp_.mmap_threshold = DEFAULT_MMAP_THRESHOLD;
mp_.trim_threshold = DEFAULT_TRIM_THRESHOLD;
mp_.pagesize = malloc_getpagesize;
+#ifdef PER_THREAD
+# define NARENAS_FROM_NCORES(n) ((n) * (sizeof(long) == 4 ? 2 : 8))
+ mp_.arena_test = NARENAS_FROM_NCORES (1);
+ narenas = 1;
+#endif
}
@@ -529,9 +570,25 @@
}
break;
case 9:
- if (! secure && memcmp (envline, "MMAP_MAX_", 9) == 0)
- mALLOPt(M_MMAP_MAX, atoi(&envline[10]));
+ if (! secure)
+ {
+ if (memcmp (envline, "MMAP_MAX_", 9) == 0)
+ mALLOPt(M_MMAP_MAX, atoi(&envline[10]));
+#ifdef PER_THREAD
+ else if (memcmp (envline, "ARENA_MAX", 9) == 0)
+ mALLOPt(M_ARENA_MAX, atoi(&envline[10]));
+#endif
+ }
break;
+#ifdef PER_THREAD
+ case 10:
+ if (! secure)
+ {
+ if (memcmp (envline, "ARENA_TEST", 10) == 0)
+ mALLOPt(M_ARENA_TEST, atoi(&envline[11]));
+ }
+ break;
+#endif
case 15:
if (! secure)
{
@@ -875,8 +932,109 @@
top(a) = (mchunkptr)ptr;
set_head(top(a), (((char*)h + h->size) - ptr) | PREV_INUSE);
+ tsd_setspecific(arena_key, (Void_t *)a);
+ mutex_init(&a->mutex);
+ (void)mutex_lock(&a->mutex);
+
+#ifdef PER_THREAD
+ (void)mutex_lock(&list_lock);
+#endif
+
+ /* Add the new arena to the global list. */
+ a->next = main_arena.next;
+ atomic_write_barrier ();
+ main_arena.next = a;
+
+#ifdef PER_THREAD
+ ++narenas;
+
+ (void)mutex_unlock(&list_lock);
+#endif
+
+ THREAD_STAT(++(a->stat_lock_loop));
+
return a;
}
+
+
+#ifdef PER_THREAD
+static mstate
+get_free_list (void)
+{
+ mstate result = free_list;
+ if (result != NULL)
+ {
+ (void)mutex_lock(&list_lock);
+ result = free_list;
+ if (result != NULL)
+ free_list = result->next_free;
+ (void)mutex_unlock(&list_lock);
+
+ if (result != NULL)
+ {
+ (void)mutex_lock(&result->mutex);
+ tsd_setspecific(arena_key, (Void_t *)result);
+ THREAD_STAT(++(result->stat_lock_loop));
+ }
+ }
+
+ return result;
+}
+
+
+static mstate
+reused_arena (void)
+{
+ if (narenas <= mp_.arena_test)
+ return NULL;
+
+ static int narenas_limit;
+ if (narenas_limit == 0)
+ {
+ if (mp_.arena_max != 0)
+ narenas_limit = mp_.arena_max;
+ else
+ {
+ int n = __get_nprocs ();
+
+ if (n >= 1)
+ narenas_limit = NARENAS_FROM_NCORES (n);
+ else
+ /* We have no information about the system. Assume two
+ cores. */
+ narenas_limit = NARENAS_FROM_NCORES (2);
+ }
+ }
+
+ if (narenas < narenas_limit)
+ return NULL;
+
+ mstate result;
+ static mstate next_to_use;
+ if (next_to_use == NULL)
+ next_to_use = &main_arena;
+
+ result = next_to_use;
+ do
+ {
+ if (!mutex_trylock(&result->mutex))
+ goto out;
+
+ result = result->next;
+ }
+ while (result != next_to_use);
+
+ /* No arena available. Wait for the next in line. */
+ (void)mutex_lock(&result->mutex);
+
+ out:
+ tsd_setspecific(arena_key, (Void_t *)result);
+ THREAD_STAT(++(result->stat_lock_loop));
+ next_to_use = result->next;
+
+ return result;
+}
+#endif
static mstate
internal_function
@@ -888,6 +1046,12 @@
{
mstate a;
+#ifdef PER_THREAD
+ if ((a = get_free_list ()) == NULL
+ && (a = reused_arena ()) == NULL)
+ /* Nothing immediately available, so generate a new arena. */
+ a = _int_new_arena(size);
+#else
if(!a_tsd)
a = a_tsd = &main_arena;
else {
@@ -930,23 +1094,30 @@
/* Nothing immediately available, so generate a new arena. */
a = _int_new_arena(size);
- if(a)
+ (void)mutex_unlock(&list_lock);
+#endif
+
+ return a;
+}
+
+#ifdef PER_THREAD
+static void __attribute__ ((section ("__libc_thread_freeres_fn")))
+arena_thread_freeres (void)
+{
+ Void_t *vptr = NULL;
+ mstate a = tsd_getspecific(arena_key, vptr);
+ tsd_setspecific(arena_key, NULL);
+
+ if (a != NULL)
{
- tsd_setspecific(arena_key, (Void_t *)a);
- mutex_init(&a->mutex);
- mutex_lock(&a->mutex); /* remember result */
-
- /* Add the new arena to the global list. */
- a->next = main_arena.next;
- atomic_write_barrier ();
- main_arena.next = a;
-
- THREAD_STAT(++(a->stat_lock_loop));
- }
- (void)mutex_unlock(&list_lock);
-
- return a;
-}
+ (void)mutex_lock(&list_lock);
+ a->next_free = free_list;
+ free_list = a;
+ (void)mutex_unlock(&list_lock);
+ }
+}
+text_set_element (__libc_thread_subfreeres, arena_thread_freeres);
+#endif
#endif /* USE_ARENAS */
Modified: trunk/libc/malloc/hooks.c
==============================================================================
--- trunk/libc/malloc/hooks.c (original)
+++ trunk/libc/malloc/hooks.c Sun Mar 15 08:53:55 2009
@@ -275,17 +275,13 @@
mchunkptr p;
if(!mem) return;
- (void)mutex_lock(&main_arena.mutex);
p = mem2chunk_check(mem, NULL);
if(!p) {
- (void)mutex_unlock(&main_arena.mutex);
-
malloc_printerr(check_action, "free(): invalid pointer", mem);
return;
}
#if HAVE_MMAP
if (chunk_is_mmapped(p)) {
- (void)mutex_unlock(&main_arena.mutex);
munmap_chunk(p);
return;
}
@@ -293,8 +289,13 @@
#if 0 /* Erase freed memory. */
memset(mem, 0, chunksize(p) - (SIZE_SZ+1));
#endif
+#ifdef ATOMIC_FASTBINS
+ _int_free(&main_arena, p, 0);
+#else
+ (void)mutex_lock(&main_arena.mutex);
_int_free(&main_arena, p);
(void)mutex_unlock(&main_arena.mutex);
+#endif
}
static Void_t*
@@ -472,7 +473,11 @@
return;
}
#endif
+#ifdef ATOMIC_FASTBINS
+ _int_free(&main_arena, p, 1);
+#else
_int_free(&main_arena, p);
+#endif
}
# endif /* !defiend NO_STARTER */
@@ -584,7 +589,7 @@
clear_fastchunks(&main_arena);
set_max_fast(DEFAULT_MXFAST);
for (i=0; i<NFASTBINS; ++i)
- main_arena.fastbins[i] = 0;
+ fastbin (&main_arena, i) = 0;
for (i=0; i<BINMAPSIZE; ++i)
main_arena.binmap[i] = 0;
top(&main_arena) = ms->av[2];
Modified: trunk/libc/malloc/malloc.c
==============================================================================
--- trunk/libc/malloc/malloc.c (original)
+++ trunk/libc/malloc/malloc.c Sun Mar 15 08:53:55 2009
@@ -208,7 +208,7 @@
Tuning options that are also dynamically changeable via mallopt:
- DEFAULT_MXFAST 64
+ DEFAULT_MXFAST 64 (for 32bit), 128 (for 64bit)
DEFAULT_TRIM_THRESHOLD 128 * 1024
DEFAULT_TOP_PAD 0
DEFAULT_MMAP_THRESHOLD 128 * 1024
@@ -254,8 +254,12 @@
#include <malloc-machine.h>
#ifdef _LIBC
+#ifdef ATOMIC_FASTBINS
+#include <atomic.h>
+#endif
#include <stdio-common/_itoa.h>
#include <bits/wordsize.h>
+#include <sys/sysinfo.h>
#endif
#ifdef __cplusplus
@@ -321,12 +325,7 @@
or other mallocs available that do this.
*/
-#if MALLOC_DEBUG
#include <assert.h>
-#else
-#undef assert
-#define assert(x) ((void)0)
-#endif
/*
@@ -1308,7 +1307,7 @@
#endif
#ifndef DEFAULT_MXFAST
-#define DEFAULT_MXFAST 64
+#define DEFAULT_MXFAST (64 * SIZE_SZ / 4)
#endif
@@ -1582,7 +1581,11 @@
#if __STD_C
static Void_t* _int_malloc(mstate, size_t);
+#ifdef ATOMIC_FASTBINS
+static void _int_free(mstate, mchunkptr, int);
+#else
static void _int_free(mstate, mchunkptr);
+#endif
static Void_t* _int_realloc(mstate, mchunkptr, INTERNAL_SIZE_T);
static Void_t* _int_memalign(mstate, size_t, size_t);
static Void_t* _int_valloc(mstate, size_t);
@@ -2239,12 +2242,15 @@
*/
typedef struct malloc_chunk* mfastbinptr;
+#define fastbin(ar_ptr, idx) ((ar_ptr)->fastbinsY[idx])
/* offset 2 to use otherwise unindexable first 2 bins */
-#define fastbin_index(sz) ((((unsigned int)(sz)) >> 3) - 2)
+#define fastbin_index(sz) \
+ ((((unsigned int)(sz)) >> (SIZE_SZ == 8 ? 4 : 3)) - 2)
+
/* The maximum fastbin request size we support */
-#define MAX_FAST_SIZE 80
+#define MAX_FAST_SIZE (80 * SIZE_SZ / 4)
#define NFASTBINS (fastbin_index(request2size(MAX_FAST_SIZE))+1)
@@ -2279,8 +2285,13 @@
#define FASTCHUNKS_BIT (1U)
#define have_fastchunks(M) (((M)->flags & FASTCHUNKS_BIT) == 0)
+#ifdef ATOMIC_FASTBINS
+#define clear_fastchunks(M) catomic_or (&(M)->flags, FASTCHUNKS_BIT)
+#define set_fastchunks(M) catomic_and (&(M)->flags, ~FASTCHUNKS_BIT)
+#else
#define clear_fastchunks(M) ((M)->flags |= FASTCHUNKS_BIT)
#define set_fastchunks(M) ((M)->flags &= ~FASTCHUNKS_BIT)
+#endif
/*
NONCONTIGUOUS_BIT indicates that MORECORE does not return contiguous
@@ -2327,7 +2338,7 @@
#endif
/* Fastbins */
- mfastbinptr fastbins[NFASTBINS];
+ mfastbinptr fastbinsY[NFASTBINS];
/* Base of the topmost chunk -- not otherwise kept in a bin */
mchunkptr top;
@@ -2343,6 +2354,11 @@
/* Linked list */
struct malloc_state *next;
+
+#ifdef PER_THREAD
+ /* Linked list for free arenas. */
+ struct malloc_state *next_free;
+#endif
/* Memory allocated from the system in this arena. */
INTERNAL_SIZE_T system_mem;
@@ -2354,6 +2370,10 @@
unsigned long trim_threshold;
INTERNAL_SIZE_T top_pad;
INTERNAL_SIZE_T mmap_threshold;
+#ifdef PER_THREAD
+ INTERNAL_SIZE_T arena_test;
+ INTERNAL_SIZE_T arena_max;
+#endif
/* Memory map support */
int n_mmaps;
@@ -2389,6 +2409,13 @@
/* There is only one instance of the malloc parameters. */
static struct malloc_par mp_;
+
+
+#ifdef PER_THREAD
+/* Non public mallopt parameters. */
+#define M_ARENA_TEST -7
+#define M_ARENA_MAX -8
+#endif
/* Maximum size of memory handled in fastbins. */
@@ -3037,8 +3064,10 @@
/* Precondition: not enough current space to satisfy nb request */
assert((unsigned long)(old_size) < (unsigned long)(nb + MINSIZE));
+#ifndef ATOMIC_FASTBINS
/* Precondition: all fastbins are consolidated */
assert(!have_fastchunks(av));
+#endif
if (av != &main_arena) {
@@ -3084,7 +3113,11 @@
set_head(chunk_at_offset(old_top, old_size), (2*SIZE_SZ)|PREV_INUSE);
set_foot(chunk_at_offset(old_top, old_size), (2*SIZE_SZ));
set_head(old_top, old_size|PREV_INUSE|NON_MAIN_ARENA);
+#ifdef ATOMIC_FASTBINS
+ _int_free(av, old_top, 1);
+#else
_int_free(av, old_top);
+#endif
} else {
set_head(old_top, (old_size + 2*SIZE_SZ)|PREV_INUSE);
set_foot(old_top, (old_size + 2*SIZE_SZ));
@@ -3323,7 +3356,11 @@
/* If possible, release the rest. */
if (old_size >= MINSIZE) {
+#ifdef ATOMIC_FASTBINS
+ _int_free(av, old_top, 1);
+#else
_int_free(av, old_top);
+#endif
}
}
@@ -3545,7 +3582,40 @@
if (__builtin_expect (hook != NULL, 0))
return (*hook)(bytes, RETURN_ADDRESS (0));
- arena_get(ar_ptr, bytes);
+ arena_lookup(ar_ptr);
+#if 0
+ // XXX We need double-word CAS and fastbins must be extended to also
+ // XXX hold a generation counter for each entry.
+ if (ar_ptr) {
+ INTERNAL_SIZE_T nb; /* normalized request size */
+ checked_request2size(bytes, nb);
+ if (nb <= get_max_fast ()) {
+ long int idx = fastbin_index(nb);
+ mfastbinptr* fb = &fastbin (ar_ptr, idx);
+ mchunkptr pp = *fb;
+ mchunkptr v;
+ do
+ {
+ v = pp;
+ if (v == NULL)
+ break;
+ }
+ while ((pp = catomic_compare_and_exchange_val_acq (fb, v->fd, v)) != v);
+ if (v != 0) {
+ if (__builtin_expect (fastbin_index (chunksize (v)) != idx, 0))
+ malloc_printerr (check_action, "malloc(): memory corruption (fast)",
+ chunk2mem (v));
+ check_remalloced_chunk(ar_ptr, v, nb);
+ void *p = chunk2mem(v);
+ if (__builtin_expect (perturb_byte, 0))
+ alloc_perturb (p, bytes);
+ return p;
+ }
+ }
+ }
+#endif
+
+ arena_lock(ar_ptr, bytes);
if(!ar_ptr)
return 0;
victim = _int_malloc(ar_ptr, bytes);
@@ -3612,18 +3682,22 @@
#endif
ar_ptr = arena_for_chunk(p);
-#if THREAD_STATS
+#ifdef ATOMIC_FASTBINS
+ _int_free(ar_ptr, p, 0);
+#else
+# if THREAD_STATS
if(!mutex_trylock(&ar_ptr->mutex))
++(ar_ptr->stat_lock_direct);
else {
(void)mutex_lock(&ar_ptr->mutex);
++(ar_ptr->stat_lock_wait);
}
-#else
+# else
(void)mutex_lock(&ar_ptr->mutex);
-#endif
+# endif
_int_free(ar_ptr, p);
(void)mutex_unlock(&ar_ptr->mutex);
+#endif
}
#ifdef libc_hidden_def
libc_hidden_def (public_fREe)
@@ -3699,7 +3773,7 @@
(void)mutex_lock(&ar_ptr->mutex);
#endif
-#ifndef NO_THREADS
+#if !defined NO_THREADS && !defined PER_THREAD
/* As in malloc(), remember this arena for the next allocation. */
tsd_setspecific(arena_key, (Void_t *)ar_ptr);
#endif
@@ -3717,18 +3791,22 @@
if (newp != NULL)
{
MALLOC_COPY (newp, oldmem, oldsize - SIZE_SZ);
-#if THREAD_STATS
+#ifdef ATOMIC_FASTBINS
+ _int_free(ar_ptr, oldp, 0);
+#else
+# if THREAD_STATS
if(!mutex_trylock(&ar_ptr->mutex))
++(ar_ptr->stat_lock_direct);
else {
(void)mutex_lock(&ar_ptr->mutex);
++(ar_ptr->stat_lock_wait);
}
-#else
+# else
(void)mutex_lock(&ar_ptr->mutex);
-#endif
+# endif
_int_free(ar_ptr, oldp);
(void)mutex_unlock(&ar_ptr->mutex);
+#endif
}
}
@@ -4130,7 +4208,6 @@
INTERNAL_SIZE_T nb; /* normalized request size */
unsigned int idx; /* associated bin index */
mbinptr bin; /* associated bin */
- mfastbinptr* fb; /* associated fastbin */
mchunkptr victim; /* inspected/selected chunk */
INTERNAL_SIZE_T size; /* its size */
@@ -4164,13 +4241,28 @@
*/
if ((unsigned long)(nb) <= (unsigned long)(get_max_fast ())) {
- long int idx = fastbin_index(nb);
- fb = &(av->fastbins[idx]);
- if ( (victim = *fb) != 0) {
+ idx = fastbin_index(nb);
+ mfastbinptr* fb = &fastbin (av, idx);
+#ifdef ATOMIC_FASTBINS
+ mchunkptr pp = *fb;
+ do
+ {
+ victim = pp;
+ if (victim == NULL)
+ break;
+ }
+ while ((pp = catomic_compare_and_exchange_val_acq (fb, victim->fd, victim))
+ != victim);
+#else
+ victim = *fb;
+#endif
+ if (victim != 0) {
if (__builtin_expect (fastbin_index (chunksize (victim)) != idx, 0))
malloc_printerr (check_action, "malloc(): memory corruption (fast)",
chunk2mem (victim));
+#ifndef ATOMIC_FASTBINS
*fb = victim->fd;
+#endif
check_remalloced_chunk(av, victim, nb);
void *p = chunk2mem(victim);
if (__builtin_expect (perturb_byte, 0))
@@ -4560,6 +4652,18 @@
return p;
}
+#ifdef ATOMIC_FASTBINS
+ /* When we are using atomic ops to free fast chunks we can get
+ here for all block sizes. */
+ else if (have_fastchunks(av)) {
+ malloc_consolidate(av);
+ /* restore original bin index */
+ if (in_smallbin_range(nb))
+ idx = smallbin_index(nb);
+ else
+ idx = largebin_index(nb);
+ }
+#else
/*
If there is space available in fastbins, consolidate and retry,
to possibly avoid expanding memory. This can occur only if nb is
@@ -4571,6 +4675,7 @@
malloc_consolidate(av);
idx = smallbin_index(nb); /* restore original bin index */
}
+#endif
/*
Otherwise, relay to handle system-dependent cases
@@ -4589,7 +4694,11 @@
*/
static void
+#ifdef ATOMIC_FASTBINS
+_int_free(mstate av, mchunkptr p, int have_lock)
+#else
_int_free(mstate av, mchunkptr p)
+#endif
{
INTERNAL_SIZE_T size; /* its size */
mfastbinptr* fb; /* associated fastbin */
@@ -4601,6 +4710,9 @@
mchunkptr fwd; /* misc temp for linking */
const char *errstr = NULL;
+#ifdef ATOMIC_FASTBINS
+ int locked = 0;
+#endif
size = chunksize(p);
@@ -4613,6 +4725,10 @@
{
errstr = "free(): invalid pointer";
errout:
+#ifdef ATOMIC_FASTBINS
+ if (! have_lock && locked)
+ (void)mutex_unlock(&av->mutex);
+#endif
malloc_printerr (check_action, errstr, chunk2mem(p));
return;
}
@@ -4649,8 +4765,28 @@
goto errout;
}
+ if (__builtin_expect (perturb_byte, 0))
+ free_perturb (chunk2mem(p), size - SIZE_SZ);
+
set_fastchunks(av);
- fb = &(av->fastbins[fastbin_index(size)]);
+ fb = &fastbin (av, fastbin_index(size));
+
+#ifdef ATOMIC_FASTBINS
+ mchunkptr fd;
+ mchunkptr old = *fb;
+ do
+ {
+ /* Another simple check: make sure the top of the bin is not the
+ record we are going to add (i.e., double free). */
+ if (__builtin_expect (old == p, 0))
+ {
+ errstr = "double free or corruption (fasttop)";
+ goto errout;
+ }
+ p->fd = fd = old;
+ }
+ while ((old = catomic_compare_and_exchange_val_acq (fb, p, fd)) != fd);
+#else
/* Another simple check: make sure the top of the bin is not the
record we are going to add (i.e., double free). */
if (__builtin_expect (*fb == p, 0))
@@ -4659,11 +4795,9 @@
goto errout;
}
- if (__builtin_expect (perturb_byte, 0))
- free_perturb (chunk2mem(p), size - SIZE_SZ);
-
p->fd = *fb;
*fb = p;
+#endif
}
/*
@@ -4671,6 +4805,22 @@
*/
else if (!chunk_is_mmapped(p)) {
+#ifdef ATOMIC_FASTBINS
+ if (! have_lock) {
+# if THREAD_STATS
+ if(!mutex_trylock(&av->mutex))
+ ++(av->stat_lock_direct);
+ else {
+ (void)mutex_lock(&av->mutex);
+ ++(av->stat_lock_wait);
+ }
+# else
+ (void)mutex_lock(&av->mutex);
+# endif
+ locked = 1;
+ }
+#endif
+
nextchunk = chunk_at_offset(p, size);
/* Lightweight tests: check whether the block is already the
@@ -4794,6 +4944,12 @@
}
}
+#ifdef ATOMIC_FASTBINS
+ if (! have_lock) {
+ assert (locked);
+ (void)mutex_unlock(&av->mutex);
+ }
+#endif
}
/*
If the chunk was allocated via mmap, release via munmap(). Note
@@ -4869,15 +5025,21 @@
because, except for the main arena, all the others might have
blocks in the high fast bins. It's not worth it anyway, just
search all bins all the time. */
- maxfb = &(av->fastbins[fastbin_index(get_max_fast ())]);
-#else
- maxfb = &(av->fastbins[NFASTBINS - 1]);
-#endif
- fb = &(av->fastbins[0]);
+ maxfb = &fastbin (av, fastbin_index(get_max_fast ()));
+#else
+ maxfb = &fastbin (av, NFASTBINS - 1);
+#endif
+ fb = &fastbin (av, 0);
do {
- if ( (p = *fb) != 0) {
- *fb = 0;
-
+#ifdef ATOMIC_FASTBINS
+ p = atomic_exchange_acq (fb, 0);
+#else
+ p = *fb;
+#endif
+ if (p != 0) {
+#ifndef ATOMIC_FASTBINS
+ *fb = 0;
+#endif
do {
check_inuse_chunk(av, p);
nextp = p->fd;
@@ -5070,7 +5232,11 @@
}
}
+#ifdef ATOMIC_FASTBINS
+ _int_free(av, oldp, 1);
+#else
_int_free(av, oldp);
+#endif
check_inuse_chunk(av, newp);
return chunk2mem(newp);
}
@@ -5094,7 +5260,11 @@
(av != &main_arena ? NON_MAIN_ARENA : 0));
/* Mark remainder as inuse so free() won't complain */
set_inuse_bit_at_offset(remainder, remainder_size);
+#ifdef ATOMIC_FASTBINS
+ _int_free(av, remainder, 1);
+#else
_int_free(av, remainder);
+#endif
}
check_inuse_chunk(av, newp);
@@ -5153,7 +5323,11 @@
newmem = _int_malloc(av, nb - MALLOC_ALIGN_MASK);
if (newmem != 0) {
MALLOC_COPY(newmem, chunk2mem(oldp), oldsize - 2*SIZE_SZ);
+#ifdef ATOMIC_FASTBINS
+ _int_free(av, oldp, 1);
+#else
_int_free(av, oldp);
+#endif
}
}
return newmem;
@@ -5247,7 +5421,11 @@
(av != &main_arena ? NON_MAIN_ARENA : 0));
set_inuse_bit_at_offset(newp, newsize);
set_head_size(p, leadsize | (av != &main_arena ? NON_MAIN_ARENA : 0));
+#ifdef ATOMIC_FASTBINS
+ _int_free(av, p, 1);
+#else
_int_free(av, p);
+#endif
p = newp;
assert (newsize >= nb &&
@@ -5263,7 +5441,11 @@
set_head(remainder, remainder_size | PREV_INUSE |
(av != &main_arena ? NON_MAIN_ARENA : 0));
set_head_size(p, nb);
+#ifdef ATOMIC_FASTBINS
+ _int_free(av, remainder, 1);
+#else
_int_free(av, remainder);
+#endif
}
}
@@ -5650,7 +5832,7 @@
fastavail = 0;
for (i = 0; i < NFASTBINS; ++i) {
- for (p = av->fastbins[i]; p != 0; p = p->fd) {
+ for (p = fastbin (av, i); p != 0; p = p->fd) {
++nfastblocks;
fastavail += chunksize(p);
}
@@ -5818,6 +6000,18 @@
case M_PERTURB:
perturb_byte = value;
break;
+
+#ifdef PER_THREAD
+ case M_ARENA_TEST:
+ if (value > 0)
+ mp_.arena_test = value;
+ break;
+
+ case M_ARENA_MAX:
+ if (value > 0)
+ mp_.arena_max = value;
+ break;
+#endif
}
(void)mutex_unlock(&av->mutex);
return res;
Modified: trunk/libc/malloc/malloc.h
==============================================================================
--- trunk/libc/malloc/malloc.h (original)
+++ trunk/libc/malloc/malloc.h Sun Mar 15 08:53:55 2009
@@ -1,5 +1,5 @@
/* Prototypes and definition for malloc implementation.
- Copyright (C) 1996, 1997, 1999, 2000, 2002-2004, 2005, 2007
+ Copyright (C) 1996, 1997, 1999, 2000, 2002-2004, 2005, 2007, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -127,6 +127,8 @@
#define M_MMAP_MAX -4
#define M_CHECK_ACTION -5
#define M_PERTURB -6
+#define M_ARENA_TEST -7
+#define M_ARENA_MAX -8
/* General SVID/XPG interface to tunable parameters. */
extern int mallopt __MALLOC_P ((int __param, int __val));
Modified: trunk/libc/malloc/obstack.h
==============================================================================
--- trunk/libc/malloc/obstack.h (original)
+++ trunk/libc/malloc/obstack.h Sun Mar 15 08:53:55 2009
@@ -1,5 +1,5 @@
/* obstack.h - object stack macros
- Copyright (C) 1988-1994,1996-1999,2003,2004,2005
+ Copyright (C) 1988-1994,1996-1999,2003,2004,2005,2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -187,7 +187,7 @@
void (*) (void *, void *), void *);
extern int _obstack_memory_used (struct obstack *);
-void obstack_free (struct obstack *obstack, void *block);
+void obstack_free (struct obstack *__obstack, void *__block);
/* Error handler called when `obstack_chunk_alloc' failed to allocate
Modified: trunk/libc/misc/sys/cdefs.h
==============================================================================
--- trunk/libc/misc/sys/cdefs.h (original)
+++ trunk/libc/misc/sys/cdefs.h Sun Mar 15 08:53:55 2009
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2001, 2002, 2004, 2005, 2006, 2007
+/* Copyright (C) 1992-2001, 2002, 2004, 2005, 2006, 2007, 2009
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -303,7 +303,12 @@
# endif
# else
# define __extern_inline extern __inline
-# define __extern_always_inline extern __always_inline
+# if __GNUC_PREREQ (4,3)
+# define __extern_always_inline \
+ extern __always_inline __attribute__ ((__artificial__))
+# else
+# define __extern_always_inline extern __always_inline
+# endif
# endif
#endif
Modified: trunk/libc/nis/rpcsvc/nislib.h
==============================================================================
[... 55493 lines stripped ...]