diff options
Diffstat (limited to 'fedora')
-rw-r--r-- | fedora/.cvsignore | 5 | ||||
-rw-r--r-- | fedora/Makefile | 193 | ||||
-rw-r--r-- | fedora/branch.mk | 7 | ||||
-rw-r--r-- | fedora/build-locale-archive.c | 162 | ||||
-rw-r--r-- | fedora/glibc-ia64-lib64.patch | 92 | ||||
-rw-r--r-- | fedora/glibc-rh234946.patch | 32 | ||||
-rw-r--r-- | fedora/glibc-x86_64-memcpy.patch | 1439 | ||||
-rw-r--r-- | fedora/glibc.spec.in | 4512 | ||||
-rw-r--r-- | fedora/glibc_post_upgrade.c | 340 | ||||
-rw-r--r-- | fedora/hardlink.c | 344 | ||||
-rw-r--r-- | fedora/libc-lock.h | 340 | ||||
-rw-r--r-- | fedora/makepatch.awk | 58 | ||||
-rw-r--r-- | fedora/nsswitch.conf | 63 | ||||
-rw-r--r-- | fedora/power6emul.c | 242 | ||||
-rw-r--r-- | fedora/tzdata-update.c | 589 |
15 files changed, 8418 insertions, 0 deletions
diff --git a/fedora/.cvsignore b/fedora/.cvsignore new file mode 100644 index 0000000000..11718c84e2 --- /dev/null +++ b/fedora/.cvsignore @@ -0,0 +1,5 @@ +glibc-*.tar.bz2 +glibc-*.src.rpm +glibc-*fedora.patch +glibc.spec +update.log diff --git a/fedora/Makefile b/fedora/Makefile new file mode 100644 index 0000000000..73a6fd2287 --- /dev/null +++ b/fedora/Makefile @@ -0,0 +1,193 @@ +# Makefile for maintaining glibc fedora-branch and creating Fedora source RPMs. + +glibc.spec: # The default target. + +tag-prefix := fedora- + +.PHONY: update commit-merge tag archive finish_archive srpm rpm + +snapshot-date-fmt := +'%Y-%m-%d %H:%M %Z' +snapshot-name-fmt := +'%Y%m%dT%H%M' + +include branch.mk + + +on-branch = $(filter-out HEAD,$(glibc-base)) + +snapshot-date := $($(glibc-branch)-sync-date) +snapshot-name := $(shell date -u -d '$(snapshot-date)' $(snapshot-name-fmt)) + +tag-name := glibc$(patsubst glibc-%-branch,-%,\ + $(filter-out HEAD,$(glibc-base))) +tar-name := $(subst _,.,$(tag-name)) +select-snapshot = -r '$($(glibc-branch)-sync-tag)' +snapshot-id = $($(glibc-branch)-sync-tag) + +branch-name := $(patsubst %-$(patsubst glibc-%,%,$(tag-name)),%,\ + $(glibc-branch)) + +branch.mk-vars = glibc-branch glibc-base DIST_BRANCH COLLECTION \ + releases-url + +ifeq (,$(upstream-tag)) +ifneq (,$(upstream)) +upstream-tag := glibc-$(subst .,_,$(upstream)) +endif +endif + +update: + now=`date -u $(snapshot-date-fmt)`; \ + $(if $(upstream-tag),new='$(upstream-tag)';,\ + name=`date -u -d "$$now" $(snapshot-name-fmt)`; \ + new="$(tag-prefix)$(tag-name)-$$name"; \ + cvs -Q rtag $(if $(on-branch),-r $(glibc-base),-D "$$now") $$new libc;\ + )\ + (echo '# This file is updated automatically by Makefile.'; \ + $(foreach var,$(branch.mk-vars) $(if $(upstream-tag),upstream),\ + $(if $($(var)),echo '$(var) := $($(var))';)) \ + echo "$(glibc-branch)-sync-date := $$now"; \ + echo "$(glibc-branch)-sync-tag := $$new"; \ + ) > branch.mk; \ + cd ..; (set -x; cvs -q update -d -P \ + -j'$($(glibc-branch)-sync-tag)' -j"$$new") \ + 2>&1 | tee fedora/update.log + +.PHONY: snapshot-time +snapshot-time: branch.mk + date -d '$(snapshot-date)' + +commit-merge: + cd ..; cvs -Q commit -m"Updated to $(snapshot-id)" + +glibc.spec: glibc.spec.in ../version.h branch.mk + (echo '%define glibcdate $(snapshot-name)'; \ + echo '%define glibcname $(tar-name)'; \ + echo '%define glibcsrcdir $(srcdir-name)'; \ + echo '%define glibc_release_tarballs $(if $(upstream),1,0)'; \ + sed -n '/VERSION/s/^.*"\([^"]*\)"$$/%define glibcversion \1/p' \ + ../version.h; \ + cat $<) > $@.new + mv -f $@.new $@ + +ifeq (,$(wildcard glibc.spec)) +Makefile: glibc.spec ; +else + +spec-nvr := $(shell rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE}\n' \ + --specfile glibc.spec | sed 1q) +spec-tag = $(subst .,_,$(spec-nvr)) + +ifeq ($(tagged),no) +select-release = -r $(glibc-branch)-branch +else +select-release = -r $(tag-prefix)$(spec-tag) +endif + +tag: glibc.spec + cd ..; cvs -Q tag -c $(tag-prefix)$(spec-tag) + +force-tag: glibc.spec + cd ..; cvs -Q tag -F -c $(tag-prefix)$(spec-tag) + +ifeq (,$(upstream)) +srcdir-name = $(tar-name)-$(snapshot-name) +else +tar-name = glibc-$(upstream) +srcdir-name = $(tar-name) + +ifneq ($($(glibc-branch)-sync-tag),$(upstream-tag)) +define upstream-tag-check + @echo Need to run make update upstream=$(upstream); exit 1 +endef +endif +endif + +# Note this rule assumes that your working directory (..) is up to date. +$(tar-name)-$(branch-name).patch: makepatch.awk glibc.spec \ + ../ChangeLog ../*/ChangeLog + $(upstream-tag-check) +# Use -kk to suppress patches for $ Id $ differences between branches. + (cd ..; cvs -q diff -kk -upN $(select-snapshot) $(select-release)) | \ + awk -v OLDVER=$(srcdir-name) \ + -v NEWVER=$(srcdir-name)-$(branch-name) \ + -f $< > patch.tmp + mv -f patch.tmp $@ + +# makepatch.awk omits these files from the patch; we put them in a tar file. +outside-patch = fedora c_stubs rtkaio powerpc-cpu \ + localedata/charmaps/GB18030 iconvdata/gb18030.c + +$(tar-name)-$(branch-name)-$(snapshot-name).tar.bz2: Makefile branch.mk \ + ../ChangeLog \ + ../*/ChangeLog + $(upstream-tag-check) + @rm -rf libc + cvs -Q export $(select-release) $(addprefix libc/,$(outside-patch)) + tar cf - -C libc $(outside-patch) | bzip2 -9 > $@.new + rm -rf libc + mv -f $@.new $@ + +glibc-tarballs = $(srcdir-name).tar.bz2 +ifeq (,$(upstream)) +$(srcdir-name).tar.bz2: Makefile branch.mk + @rm -rf $(srcdir-name) + cvs -Q export -d $(srcdir-name) $(select-snapshot) libc + tar cf - $(srcdir-name) | bzip2 -9 > $@.new + rm -rf $(srcdir-name) + mv -f $@.new $@ +else +glibc-tarballs += $(srcdir-name:glibc-%=glibc-linuxthreads-%).tar.bz2 \ + $(srcdir-name:glibc-%=glibc-libidn-%).tar.bz2 + +$(glibc-tarballs): + curl -O $(releases-url)/$@ +endif + +archives = $(glibc-tarballs) \ + $(tar-name)-$(branch-name)-$(snapshot-name).tar.bz2 \ + $(tar-name)-$(branch-name).patch + +finish_archive: $(archives) + +archive: glibc.spec + $(MAKE) tag finish_archive + +rpm srpm: $(spec-nvr).src.rpm +$(spec-nvr).src.rpm: glibc.spec $(archives) + rpmbuild --define "_sourcedir `pwd`" \ + --define "_specdir `pwd`" \ + --define "_srcrpmdir `pwd`" \ + --nodeps -bs $< + +### +# These rules are for dealing with the Fedora package repository +# and the Red Hat internal build system. +# +# To use this, put in ~/.cvsdistrc at least a line: +# DIST_COMMON = /some/checkout/of/dist/common +# We will find cvs-import.sh there and use its CVS/Root for where to commit. + +.PHONY: dist-import + +-include ~/.cvsdistrc + +ifdef DIST_COMMON +DIST_BRANCH ?= devel +COLLECTION ?= dist-fc4 +BHC_FLAGS ?= -n + +bhc-baseurl := cvs://cvs.devel.redhat.com/cvs/dist?rpms +bhc-url = $(bhc-baseurl)/glibc/$(DIST_BRANCH)\#$(spec-tag) + +dist-import: $(spec-nvr).src.rpm + $(DIST_COMMON)/cvs-import.sh -b $(DIST_BRANCH) $< + rpm -qp $< --queryformat '[%{FILEMD5S} %{FILENAMES}\n]' > $@.new + mv -f $@.new $@ + +dist-build: dist-import + bhc $(BHC_FLAGS) $(COLLECTION) '$(bhc-url)' + +endif +### + +endif diff --git a/fedora/branch.mk b/fedora/branch.mk new file mode 100644 index 0000000000..7bcc3af1ba --- /dev/null +++ b/fedora/branch.mk @@ -0,0 +1,7 @@ +# This file is updated automatically by Makefile. +glibc-branch := fedora-2_5 +glibc-base := glibc-2_5-branch +DIST_BRANCH := FC-6 +COLLECTION := dist-fc6 +fedora-2_5-sync-date := 2007-07-12 17:01 UTC +fedora-2_5-sync-tag := fedora-glibc-2_5-20070712T1701 diff --git a/fedora/build-locale-archive.c b/fedora/build-locale-archive.c new file mode 100644 index 0000000000..a35171736e --- /dev/null +++ b/fedora/build-locale-archive.c @@ -0,0 +1,162 @@ +#define _GNU_SOURCE +#include <stdlib.h> +#include <unistd.h> +#include <dirent.h> +#include <errno.h> +#include <string.h> +#include <stdbool.h> +#include <sys/stat.h> +#include <stdio.h> +#include <stdarg.h> +#include "../locale/hashval.h" + +const char *alias_file = DATADIR "/locale/locale.alias"; +const char *locar_file = PREFIX "/lib/locale/locale-archive"; +const char *loc_path = PREFIX "/lib/locale/"; +int be_quiet = 1; +int verbose = 0; +int max_locarchive_open_retry = 10; +const char *output_prefix; + +static int +is_prime (unsigned long candidate) +{ + /* No even number and none less than 10 will be passed here. */ + unsigned long int divn = 3; + unsigned long int sq = divn * divn; + + while (sq < candidate && candidate % divn != 0) + { + ++divn; + sq += 4 * divn; + ++divn; + } + + return candidate % divn != 0; +} + +unsigned long +next_prime (unsigned long seed) +{ + /* Make it definitely odd. */ + seed |= 1; + + while (!is_prime (seed)) + seed += 2; + + return seed; +} + +/* xmalloc is only used by show_archive_content. */ +void * +xmalloc (size_t size) +{ + exit (255); +} + +void +error (int status, int errnum, const char *message, ...) +{ + va_list args; + + va_start (args, message); + fflush (stdout); + fprintf (stderr, "%s: ", program_invocation_name); + vfprintf (stderr, message, args); + va_end (args); + if (errnum) + fprintf (stderr, ": %s", strerror (errnum)); + putc ('\n', stderr); + fflush (stderr); + if (status) + exit (errnum == EROFS ? 0 : status); +} + +extern int add_locales_to_archive (size_t nlist, char *list[], bool replace); + +int main () +{ + char path[4096]; + DIR *dirp; + struct dirent64 *d; + struct stat64 st; + char *list[16384], *primary; + unsigned int cnt = 0; + + unlink (locar_file); + dirp = opendir (loc_path); + if (dirp == NULL) + error (EXIT_FAILURE, errno, "cannot open directory \"%s\"", loc_path); + + primary = getenv ("LC_ALL"); + if (primary == NULL) + primary = getenv ("LANG"); + if (primary != NULL) + { + if (strncmp (primary, "ja", 2) != 0 + && strncmp (primary, "ko", 2) != 0 + && strncmp (primary, "zh", 2) != 0) + { + char *ptr = malloc (strlen (primary) + strlen (".utf8") + 1), *p, *q; + + if (ptr) + { + p = ptr; + q = primary; + while (*q && *q != '.' && *q != '@') + *p++ = *q++; + if (*q == '.') + while (*q && *q != '@') + q++; + p = stpcpy (p, ".utf8"); + strcpy (p, q); + primary = ptr; + } + else + primary = "....."; + } + strcpy (stpcpy (path, loc_path), primary); + if (stat64 (path, &st) >= 0 && S_ISDIR (st.st_mode)) + { + list[cnt] = strdup (path); + if (list[cnt] == NULL) + error (0, errno, "cannot add file to list \"%s\"", path); + else + cnt++; + } + if (cnt == 0) + primary = NULL; + } + + while ((d = readdir64 (dirp)) != NULL) + { + if (strcmp (d->d_name, ".") == 0 || strcmp (d->d_name, "..") == 0) + continue; + + if (primary && strcmp (d->d_name, primary) == 0) + continue; + + strcpy (stpcpy (path, loc_path), d->d_name); + if (stat64 (path, &st) < 0) + { + error (0, errno, "cannot stat \"%s\"", path); + continue; + } + if (! S_ISDIR (st.st_mode)) + continue; + if (cnt == 16384) + error (EXIT_FAILURE, 0, "too many directories in \"%s\"", loc_path); + list[cnt] = strdup (path); + if (list[cnt] == NULL) + { + error (0, errno, "cannot add file to list \"%s\"", path); + continue; + } + cnt++; + } + closedir (dirp); + add_locales_to_archive (cnt, list, 0); + char *argv[] = { "/usr/sbin/tzdata-update", NULL }; + execve (argv[0], (char *const *)argv, (char *const *)&argv[1]); + exit (0); +} diff --git a/fedora/glibc-ia64-lib64.patch b/fedora/glibc-ia64-lib64.patch new file mode 100644 index 0000000000..05fd922969 --- /dev/null +++ b/fedora/glibc-ia64-lib64.patch @@ -0,0 +1,92 @@ +2004-05-14 Jakub Jelinek <jakub@redhat.com> + + * sysdeps/unix/sysv/linux/configure.in: Use */lib64 even for ia64. + * sysdeps/unix/sysv/linux/configure: Rebuilt. + * sysdeps/unix/sysv/linux/ia64/dl-procinfo.c: New file. + * sysdeps/unix/sysv/linux/ia64/dl-procinfo.h: New file. + * sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed: Change /lib64/ld* + into /lib/ld*. Add LD_LIBRARY_VERSION. + * sysdeps/unix/sysv/linux/ia64/ldconfig.h + (SYSDEP_KNOWN_INTERPRETER_NAMES): Add /lib64/ld-linux-ia64.so.2. + * sysdeps/unix/sysv/linux/ia64/dl-cache.h: Include sparc-linux + dl-cache.h instead of generic dl-cache.h. + +--- libc/sysdeps/unix/sysv/linux/configure.jj 2003-03-23 03:10:04.000000000 +0100 ++++ libc/sysdeps/unix/sysv/linux/configure 2004-05-14 15:54:35.669802684 +0200 +@@ -225,7 +225,7 @@ case "$prefix" in + # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib + case $machine in + sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \ +- mips/mips64/n64/* ) ++ mips/mips64/n64/* | ia64 ) + libc_cv_slibdir="/lib64" + if test "$libdir" = '${exec_prefix}/lib'; then + libdir='${exec_prefix}/lib64'; +--- libc/sysdeps/unix/sysv/linux/configure.in.jj 2003-03-23 03:10:04.000000000 +0100 ++++ libc/sysdeps/unix/sysv/linux/configure.in 2004-05-14 15:53:44.355998785 +0200 +@@ -158,7 +158,7 @@ case "$prefix" in + # 64-bit libraries on bi-arch platforms go in /lib64 instead of /lib + case $machine in + sparc/sparc64 | x86_64 | powerpc/powerpc64 | s390/s390-64 | \ +- mips/mips64/n64/* ) ++ mips/mips64/n64/* | ia64 ) + libc_cv_slibdir="/lib64" + if test "$libdir" = '${exec_prefix}/lib'; then + libdir='${exec_prefix}/lib64'; +--- libc/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c.jj 2004-05-14 15:42:09.307560515 +0200 ++++ libc/sysdeps/unix/sysv/linux/ia64/dl-procinfo.c 2003-09-30 00:23:24.000000000 +0200 +@@ -0,0 +1,5 @@ ++#ifdef IS_IN_ldconfig ++#include <sysdeps/i386/dl-procinfo.c> ++#else ++#include <sysdeps/generic/dl-procinfo.c> ++#endif +--- libc/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed.jj 2002-01-17 07:49:28.000000000 +0100 ++++ libc/sysdeps/unix/sysv/linux/ia64/ldd-rewrite.sed 2004-05-14 16:21:03.041325040 +0200 +@@ -1 +1,4 @@ +-s_^\(RTLDLIST=\)\([^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"\2-ia64\3 \2\3"_ ++/LD_TRACE_LOADED_OBJECTS=1/a\ ++add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out" ++s_^\(RTLDLIST=\)/lib64/ld\([^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"/lib/ld\2-ia64\3 /lib/ld\2\3"_ ++s_^\(RTLDLIST=\)\([^"][^ ]*\)-ia64\(\.so\.[0-9.]*\)[ ]*$_\1"\2-ia64\3 \2\3"_ +--- libc/sysdeps/unix/sysv/linux/ia64/ldconfig.h.jj 2001-07-06 06:56:17.000000000 +0200 ++++ libc/sysdeps/unix/sysv/linux/ia64/ldconfig.h 2004-05-14 15:45:40.103783087 +0200 +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2001 Free Software Foundation, Inc. ++/* Copyright (C) 2001, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -19,7 +19,8 @@ + #include <sysdeps/generic/ldconfig.h> + + #define SYSDEP_KNOWN_INTERPRETER_NAMES \ +- { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 }, ++ { "/lib/ld-linux.so.2", FLAG_ELF_LIBC6 }, \ ++ { "/lib64/ld-linux-ia64.so.2", FLAG_ELF_LIBC6 }, + #define SYSDEP_KNOWN_LIBRARY_NAMES \ + { "libc.so.6", FLAG_ELF_LIBC6 }, \ + { "libm.so.6", FLAG_ELF_LIBC6 }, +--- libc/sysdeps/unix/sysv/linux/ia64/dl-cache.h.jj 2001-07-06 06:56:17.000000000 +0200 ++++ libc/sysdeps/unix/sysv/linux/ia64/dl-cache.h 2004-05-14 15:41:11.658891907 +0200 +@@ -1,5 +1,5 @@ + /* Support for reading /etc/ld.so.cache files written by Linux ldconfig. +- Copyright (C) 2000 Free Software Foundation, Inc. ++ Copyright (C) 2000, 2004 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or +@@ -22,4 +22,4 @@ + #define _dl_cache_check_flags(flags) \ + ((flags) == _DL_CACHE_DEFAULT_ID) + +-#include_next <dl-cache.h> ++#include <sysdeps/unix/sysv/linux/sparc/dl-cache.h> +--- libc/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h.jj 2004-05-14 15:42:13.018895395 +0200 ++++ libc/sysdeps/unix/sysv/linux/ia64/dl-procinfo.h 2003-07-23 00:06:23.000000000 +0200 +@@ -0,0 +1,5 @@ ++#ifdef IS_IN_ldconfig ++#include <sysdeps/unix/sysv/linux/i386/dl-procinfo.h> ++#else ++#include <sysdeps/generic/dl-procinfo.h> ++#endif diff --git a/fedora/glibc-rh234946.patch b/fedora/glibc-rh234946.patch new file mode 100644 index 0000000000..add3f8023f --- /dev/null +++ b/fedora/glibc-rh234946.patch @@ -0,0 +1,32 @@ +2006-12-25 Sripathi Kodi <sripathik@in.ibm.com> + + * include/link.h: Declare new flag l_fini_called in struct link_map. + * elf/dl-fini.c: In _dl_fini, set l_fini_called to 1 instead of + l_init_called to 0. + +--- libc/elf/dl-fini.c 2006-12-22 01:54:22.000000000 -0600 ++++ libc/elf/dl-fini.c 2006-12-24 22:51:52.000000000 -0600 +@@ -215,10 +215,10 @@ _dl_fini (void) + { + l = maps[i]; + +- if (l->l_init_called) ++ if (l->l_init_called && !l->l_fini_called) + { + /* Make sure nothing happens if we are called twice. */ +- l->l_init_called = 0; ++ l->l_fini_called = 1; + + /* Is there a destructor function? */ + if (l->l_info[DT_FINI_ARRAY] != NULL +--- libc/include/link.h 2006-12-22 01:54:22.000000000 -0600 ++++ libc/include/link.h 2006-12-24 22:53:29.000000000 -0600 +@@ -185,6 +185,8 @@ struct link_map + unsigned int l_contiguous:1; /* Nonzero if inter-segment holes are + mprotected or if no holes are present at + all. */ ++ unsigned int l_fini_called:1; /* Nonzero if _dl_fini has processed ++ this object */ + + /* Array with version names. */ + unsigned int l_nversions; diff --git a/fedora/glibc-x86_64-memcpy.patch b/fedora/glibc-x86_64-memcpy.patch new file mode 100644 index 0000000000..3888134df8 --- /dev/null +++ b/fedora/glibc-x86_64-memcpy.patch @@ -0,0 +1,1439 @@ +2007-05-21 Ulrich Drepper <drepper@redhat.com> + + * sysdeps/x86_64/cacheinfo.c (init_cacheinfo): Pass correct value + as second parameter to handle_intel. + + * sysdeps/unix/sysv/linux/x86_64/sysconf.c: Move cache information + handling to ... + * sysdeps/x86_64/cacheinfo.c: ... here. New file. + * sysdeps/x86_64/Makefile [subdir=string] (sysdep_routines): Add + cacheinfo. + * sysdeps/x86_64/memcpy.S: Complete rewrite. + * sysdeps/x86_64/mempcpy.S: Adjust appropriately. + Patch by Evandro Menezes <evandro.menezes@amd.com>. + +--- libc/sysdeps/x86_64/Makefile 16 Aug 2004 06:46:14 -0000 1.4 ++++ libc/sysdeps/x86_64/Makefile 21 May 2007 19:20:45 -0000 1.5 +@@ -9,3 +9,7 @@ endif + ifeq ($(subdir),gmon) + sysdep_routines += _mcount + endif ++ ++ifeq ($(subdir),string) ++sysdep_routines += cacheinfo ++endif +--- libc/sysdeps/x86_64/cacheinfo.c 1 Jan 1970 00:00:00 -0000 ++++ libc/sysdeps/x86_64/cacheinfo.c 21 May 2007 22:37:45 -0000 1.2 +@@ -0,0 +1,451 @@ ++/* x86_64 cache info. ++ Copyright (C) 2003, 2004, 2006, 2007 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 ++ modify it under the terms of the GNU Lesser General Public ++ License as published by the Free Software Foundation; either ++ version 2.1 of the License, or (at your option) any later version. ++ ++ The GNU C Library is distributed in the hope that it will be useful, ++ but WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ Lesser General Public License for more details. ++ ++ You should have received a copy of the GNU Lesser General Public ++ License along with the GNU C Library; if not, write to the Free ++ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA ++ 02111-1307 USA. ++*/ ++ ++#include <assert.h> ++#include <stdbool.h> ++#include <stdlib.h> ++#include <unistd.h> ++ ++static const struct intel_02_cache_info ++{ ++ unsigned int idx; ++ int name; ++ long int size; ++ long int assoc; ++ long int linesize; ++} intel_02_known [] = ++ { ++ { 0x06, _SC_LEVEL1_ICACHE_SIZE, 8192, 4, 32 }, ++ { 0x08, _SC_LEVEL1_ICACHE_SIZE, 16384, 4, 32 }, ++ { 0x0a, _SC_LEVEL1_DCACHE_SIZE, 8192, 2, 32 }, ++ { 0x0c, _SC_LEVEL1_DCACHE_SIZE, 16384, 4, 32 }, ++ { 0x22, _SC_LEVEL3_CACHE_SIZE, 524288, 4, 64 }, ++ { 0x23, _SC_LEVEL3_CACHE_SIZE, 1048576, 8, 64 }, ++ { 0x25, _SC_LEVEL3_CACHE_SIZE, 2097152, 8, 64 }, ++ { 0x29, _SC_LEVEL3_CACHE_SIZE, 4194304, 8, 64 }, ++ { 0x2c, _SC_LEVEL1_DCACHE_SIZE, 32768, 8, 64 }, ++ { 0x30, _SC_LEVEL1_ICACHE_SIZE, 32768, 8, 64 }, ++ { 0x39, _SC_LEVEL2_CACHE_SIZE, 131072, 4, 64 }, ++ { 0x3a, _SC_LEVEL2_CACHE_SIZE, 196608, 6, 64 }, ++ { 0x3b, _SC_LEVEL2_CACHE_SIZE, 131072, 2, 64 }, ++ { 0x3c, _SC_LEVEL2_CACHE_SIZE, 262144, 4, 64 }, ++ { 0x3d, _SC_LEVEL2_CACHE_SIZE, 393216, 6, 64 }, ++ { 0x3e, _SC_LEVEL2_CACHE_SIZE, 524288, 4, 64 }, ++ { 0x41, _SC_LEVEL2_CACHE_SIZE, 131072, 4, 32 }, ++ { 0x42, _SC_LEVEL2_CACHE_SIZE, 262144, 4, 32 }, ++ { 0x43, _SC_LEVEL2_CACHE_SIZE, 524288, 4, 32 }, ++ { 0x44, _SC_LEVEL2_CACHE_SIZE, 1048576, 4, 32 }, ++ { 0x45, _SC_LEVEL2_CACHE_SIZE, 2097152, 4, 32 }, ++ { 0x46, _SC_LEVEL3_CACHE_SIZE, 4194304, 4, 64 }, ++ { 0x47, _SC_LEVEL3_CACHE_SIZE, 8388608, 8, 64 }, ++ { 0x49, _SC_LEVEL2_CACHE_SIZE, 4194304, 16, 64 }, ++ { 0x4a, _SC_LEVEL3_CACHE_SIZE, 6291456, 12, 64 }, ++ { 0x4b, _SC_LEVEL3_CACHE_SIZE, 8388608, 16, 64 }, ++ { 0x4c, _SC_LEVEL3_CACHE_SIZE, 12582912, 12, 64 }, ++ { 0x4d, _SC_LEVEL3_CACHE_SIZE, 16777216, 16, 64 }, ++ { 0x60, _SC_LEVEL1_DCACHE_SIZE, 16384, 8, 64 }, ++ { 0x66, _SC_LEVEL1_DCACHE_SIZE, 8192, 4, 64 }, ++ { 0x67, _SC_LEVEL1_DCACHE_SIZE, 16384, 4, 64 }, ++ { 0x68, _SC_LEVEL1_DCACHE_SIZE, 32768, 4, 64 }, ++ { 0x78, _SC_LEVEL2_CACHE_SIZE, 1048576, 8, 64 }, ++ { 0x79, _SC_LEVEL2_CACHE_SIZE, 131072, 8, 64 }, ++ { 0x7a, _SC_LEVEL2_CACHE_SIZE, 262144, 8, 64 }, ++ { 0x7b, _SC_LEVEL2_CACHE_SIZE, 524288, 8, 64 }, ++ { 0x7c, _SC_LEVEL2_CACHE_SIZE, 1048576, 8, 64 }, ++ { 0x7d, _SC_LEVEL2_CACHE_SIZE, 2097152, 8, 64 }, ++ { 0x7f, _SC_LEVEL2_CACHE_SIZE, 524288, 2, 64 }, ++ { 0x82, _SC_LEVEL2_CACHE_SIZE, 262144, 8, 32 }, ++ { 0x83, _SC_LEVEL2_CACHE_SIZE, 524288, 8, 32 }, ++ { 0x84, _SC_LEVEL2_CACHE_SIZE, 1048576, 8, 32 }, ++ { 0x85, _SC_LEVEL2_CACHE_SIZE, 2097152, 8, 32 }, ++ { 0x86, _SC_LEVEL2_CACHE_SIZE, 524288, 4, 64 }, ++ { 0x87, _SC_LEVEL2_CACHE_SIZE, 1048576, 8, 64 }, ++ }; ++ ++#define nintel_02_known (sizeof (intel_02_known) / sizeof (intel_02_known [0])) ++ ++static int ++intel_02_known_compare (const void *p1, const void *p2) ++{ ++ const struct intel_02_cache_info *i1; ++ const struct intel_02_cache_info *i2; ++ ++ i1 = (const struct intel_02_cache_info *) p1; ++ i2 = (const struct intel_02_cache_info *) p2; ++ ++ if (i1->idx == i2->idx) ++ return 0; ++ ++ return i1->idx < i2->idx ? -1 : 1; ++} ++ ++ ++static long int ++__attribute__ ((noinline)) ++intel_check_word (int name, unsigned int value, bool *has_level_2, ++ bool *no_level_2_or_3) ++{ ++ if ((value & 0x80000000) != 0) ++ /* The register value is reserved. */ ++ return 0; ++ ++ /* Fold the name. The _SC_ constants are always in the order SIZE, ++ ASSOC, LINESIZE. */ ++ int folded_name = (_SC_LEVEL1_ICACHE_SIZE ++ + ((name - _SC_LEVEL1_ICACHE_SIZE) / 3) * 3); ++ ++ while (value != 0) ++ { ++ unsigned int byte = value & 0xff; ++ ++ if (byte == 0x40) ++ { ++ *no_level_2_or_3 = true; ++ ++ if (folded_name == _SC_LEVEL3_CACHE_SIZE) ++ /* No need to look further. */ ++ break; ++ } ++ else ++ { ++ if (byte == 0x49 && folded_name == _SC_LEVEL3_CACHE_SIZE) ++ { ++ /* Intel reused this value. For family 15, model 6 it ++ specifies the 3rd level cache. Otherwise the 2nd ++ level cache. */ ++ unsigned int eax; ++ unsigned int ebx; ++ unsigned int ecx; ++ unsigned int edx; ++ asm volatile ("cpuid" ++ : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) ++ : "0" (1)); ++ ++ unsigned int family = ((eax >> 20) & 0xff) + ((eax >> 8) & 0xf); ++ unsigned int model = ((((eax >>16) & 0xf) << 4) ++ + ((eax >> 4) & 0xf)); ++ if (family == 15 && model == 6) ++ { ++ /* The level 3 cache is encoded for this model like ++ the level 2 cache is for other models. Pretend ++ the caller asked for the level 2 cache. */ ++ name = (_SC_LEVEL2_CACHE_SIZE ++ + (name - _SC_LEVEL3_CACHE_SIZE)); ++ folded_name = _SC_LEVEL3_CACHE_SIZE; ++ } ++ } ++ ++ struct intel_02_cache_info *found; ++ struct intel_02_cache_info search; ++ ++ search.idx = byte; ++ found = bsearch (&search, intel_02_known, nintel_02_known, ++ sizeof (intel_02_known[0]), intel_02_known_compare); ++ if (found != NULL) ++ { ++ if (found->name == folded_name) ++ { ++ unsigned int offset = name - folded_name; ++ ++ if (offset == 0) ++ /* Cache size. */ ++ return found->size; ++ if (offset == 1) ++ return found->assoc; ++ ++ assert (offset == 2); ++ return found->linesize; ++ } ++ ++ if (found->name == _SC_LEVEL2_CACHE_SIZE) ++ *has_level_2 = true; ++ } ++ } ++ ++ /* Next byte for the next round. */ ++ value >>= 8; ++ } ++ ++ /* Nothing found. */ ++ return 0; ++} ++ ++ ++static long int __attribute__ ((noinline)) ++handle_intel (int name, unsigned int maxidx) ++{ ++ assert (maxidx >= 2); ++ ++ /* OK, we can use the CPUID instruction to get all info about the ++ caches. */ ++ unsigned int cnt = 0; ++ unsigned int max = 1; ++ long int result = 0; ++ bool no_level_2_or_3 = false; ++ bool has_level_2 = false; ++ ++ while (cnt++ < max) ++ { ++ unsigned int eax; ++ unsigned int ebx; ++ unsigned int ecx; ++ unsigned int edx; ++ asm volatile ("cpuid" ++ : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) ++ : "0" (2)); ++ ++ /* The low byte of EAX in the first round contain the number of ++ rounds we have to make. At least one, the one we are already ++ doing. */ ++ if (cnt == 1) ++ { ++ max = eax & 0xff; ++ eax &= 0xffffff00; ++ } ++ ++ /* Process the individual registers' value. */ ++ result = intel_check_word (name, eax, &has_level_2, &no_level_2_or_3); ++ if (result != 0) ++ return result; ++ ++ result = intel_check_word (name, ebx, &has_level_2, &no_level_2_or_3); ++ if (result != 0) ++ return result; ++ ++ result = intel_check_word (name, ecx, &has_level_2, &no_level_2_or_3); ++ if (result != 0) ++ return result; ++ ++ result = intel_check_word (name, edx, &has_level_2, &no_level_2_or_3); ++ if (result != 0) ++ return result; ++ } ++ ++ if (name >= _SC_LEVEL2_CACHE_SIZE && name <= _SC_LEVEL3_CACHE_LINESIZE ++ && no_level_2_or_3) ++ return -1; ++ ++ return 0; ++} ++ ++ ++static long int __attribute__ ((noinline)) ++handle_amd (int name) ++{ ++ unsigned int eax; ++ unsigned int ebx; ++ unsigned int ecx; ++ unsigned int edx; ++ asm volatile ("cpuid" ++ : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) ++ : "0" (0x80000000)); ++ ++ if (name >= _SC_LEVEL3_CACHE_SIZE) ++ return 0; ++ ++ unsigned int fn = 0x80000005 + (name >= _SC_LEVEL2_CACHE_SIZE); ++ if (eax < fn) ++ return 0; ++ ++ asm volatile ("cpuid" ++ : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) ++ : "0" (fn)); ++ ++ if (name < _SC_LEVEL1_DCACHE_SIZE) ++ { ++ name += _SC_LEVEL1_DCACHE_SIZE - _SC_LEVEL1_ICACHE_SIZE; ++ ecx = edx; ++ } ++ ++ switch (name) ++ { ++ case _SC_LEVEL1_DCACHE_SIZE: ++ return (ecx >> 14) & 0x3fc00; ++ case _SC_LEVEL1_DCACHE_ASSOC: ++ ecx >>= 16; ++ if ((ecx & 0xff) == 0xff) ++ /* Fully associative. */ ++ return (ecx << 2) & 0x3fc00; ++ return ecx & 0xff; ++ case _SC_LEVEL1_DCACHE_LINESIZE: ++ return ecx & 0xff; ++ case _SC_LEVEL2_CACHE_SIZE: ++ return (ecx & 0xf000) == 0 ? 0 : (ecx >> 6) & 0x3fffc00; ++ case _SC_LEVEL2_CACHE_ASSOC: ++ ecx >>= 12; ++ switch (ecx & 0xf) ++ { ++ case 0: ++ case 1: ++ case 2: ++ case 4: ++ return ecx & 0xf; ++ case 6: ++ return 8; ++ case 8: ++ return 16; ++ case 0xf: ++ return (ecx << 6) & 0x3fffc00; ++ default: ++ return 0; ++ } ++ case _SC_LEVEL2_CACHE_LINESIZE: ++ return (ecx & 0xf000) == 0 ? 0 : ecx & 0xff; ++ default: ++ assert (! "cannot happen"); ++ } ++ return -1; ++} ++ ++ ++/* Get the value of the system variable NAME. */ ++long int ++attribute_hidden ++__cache_sysconf (int name) ++{ ++ /* Find out what brand of processor. */ ++ unsigned int eax; ++ unsigned int ebx; ++ unsigned int ecx; ++ unsigned int edx; ++ asm volatile ("cpuid" ++ : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) ++ : "0" (0)); ++ ++ /* This spells out "GenuineIntel". */ ++ if (ebx == 0x756e6547 && ecx == 0x6c65746e && edx == 0x49656e69) ++ return handle_intel (name, eax); ++ ++ /* This spells out "AuthenticAMD". */ ++ if (ebx == 0x68747541 && ecx == 0x444d4163 && edx == 0x69746e65) ++ return handle_amd (name); ++ ++ // XXX Fill in more vendors. ++ ++ /* CPU not known, we have no information. */ ++ return 0; ++} ++ ++ ++/* Half the core cache size for use in memory and string routines, typically ++ L1 size. */ ++long int __x86_64_core_cache_size_half attribute_hidden = 32 * 1024 / 2; ++/* Shared cache size for use in memory and string routines, typically ++ L2 or L3 size. */ ++long int __x86_64_shared_cache_size_half attribute_hidden = 1024 * 1024 / 2; ++/* PREFETCHW support flag for use in memory and string routines. */ ++int __x86_64_prefetchw attribute_hidden; ++ ++ ++static void ++__attribute__((constructor)) ++init_cacheinfo (void) ++{ ++ /* Find out what brand of processor. */ ++ unsigned int eax; ++ unsigned int ebx; ++ unsigned int ecx; ++ unsigned int edx; ++ int max_cpuid; ++ int max_cpuid_ex; ++ long int core = -1; ++ long int shared = -1; ++ unsigned int level; ++ unsigned int threads = 0; ++ ++ asm volatile ("cpuid" ++ : "=a" (max_cpuid), "=b" (ebx), "=c" (ecx), "=d" (edx) ++ : "0" (0)); ++ ++ /* This spells out "GenuineIntel". */ ++ if (ebx == 0x756e6547 && ecx == 0x6c65746e && edx == 0x49656e69) ++ { ++ core = handle_intel (_SC_LEVEL1_DCACHE_SIZE, max_cpuid); ++ ++ /* Try L3 first. */ ++ level = 3; ++ shared = handle_intel (_SC_LEVEL3_CACHE_SIZE, max_cpuid); ++ ++ if (shared <= 0) ++ { ++ /* Try L2 otherwise. */ ++ level = 2; ++ shared = handle_intel (_SC_LEVEL2_CACHE_SIZE, max_cpuid); ++ } ++ ++ /* Figure out the number of logical threads that share the ++ highest cache level. */ ++ if (max_cpuid >= 4) ++ { ++ int i = 0; ++ ++ /* Query until desired cache level is enumerated. */ ++ do ++ { ++ asm volatile ("cpuid" ++ : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) ++ : "0" (4), "2" (i++)); ++ } ++ while (((eax >> 5) & 0x7) != level); ++ ++ threads = ((eax >> 14) & 0x3ff) + 1; ++ } ++ else ++ { ++ /* Assume that all logical threads share the highest cache level. */ ++ asm volatile ("cpuid" ++ : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) ++ : "0" (1)); ++ ++ threads = (ebx >> 16) & 0xff; ++ } ++ ++ /* Cap usage of highest cache level to the number of supported ++ threads. */ ++ if (shared > 0 && threads > 0) ++ shared /= threads; ++ } ++ /* This spells out "AuthenticAMD". */ ++ else if (ebx == 0x68747541 && ecx == 0x444d4163 && edx == 0x69746e65) ++ { ++ core = handle_amd (_SC_LEVEL1_DCACHE_SIZE); ++ shared = handle_amd (_SC_LEVEL2_CACHE_SIZE); ++ ++ asm volatile ("cpuid" ++ : "=a" (max_cpuid_ex), "=b" (ebx), "=c" (ecx), "=d" (edx) ++ : "0" (0x80000000)); ++ ++ if (max_cpuid_ex >= 0x80000001) ++ { ++ asm volatile ("cpuid" ++ : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) ++ : "0" (0x80000001)); ++ /* PREFETCHW || 3DNow! */ ++ if ((ecx & 0x100) || (edx & 0x80000000)) ++ __x86_64_prefetchw = -1; ++ } ++ } ++ ++ if (core > 0) ++ __x86_64_core_cache_size_half = core / 2; ++ ++ if (shared > 0) ++ __x86_64_shared_cache_size_half = shared / 2; ++} +--- libc/sysdeps/x86_64/memcpy.S 18 Oct 2004 04:17:08 -0000 1.5 ++++ libc/sysdeps/x86_64/memcpy.S 21 May 2007 19:21:01 -0000 1.6 +@@ -1,7 +1,10 @@ +-/* Highly optimized version for x86-64. +- Copyright (C) 1997, 2000, 2002, 2003, 2004 Free Software Foundation, Inc. ++/* ++ Optimized memcpy for x86-64. ++ ++ Copyright (C) 2007 Free Software Foundation, Inc. ++ Contributed by Evandro Menezes <evandro.menezes@amd.com>, 2007. ++ + This file is part of the GNU C Library. +- Based on i586 version contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public +@@ -16,86 +19,556 @@ + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA +- 02111-1307 USA. */ ++ 02111-1307 USA. ++*/ + + #include <sysdep.h> + #include "asm-syntax.h" +-#include "bp-sym.h" +-#include "bp-asm.h" + +-/* BEWARE: `#ifdef memcpy' means that memcpy is redefined as `mempcpy', +- and the return value is the byte after the last one copied in +- the destination. */ +-#define MEMPCPY_P (defined memcpy) ++/* Stack slots in the red-zone. */ ++ ++#ifdef USE_AS_MEMPCPY ++# define RETVAL (0) ++#else ++# define RETVAL (-8) ++#endif ++#define SAVE0 (RETVAL - 8) ++#define SAVE1 (SAVE0 - 8) ++#define SAVE2 (SAVE1 - 8) ++#define SAVE3 (SAVE2 - 8) + + .text ++ + #if defined PIC && !defined NOT_IN_libc + ENTRY (__memcpy_chk) ++ + cmpq %rdx, %rcx + jb HIDDEN_JUMPTARGET (__chk_fail) ++ + END (__memcpy_chk) + #endif +-ENTRY (BP_SYM (memcpy)) +- /* Cutoff for the big loop is a size of 32 bytes since otherwise +- the loop will never be entered. */ ++ ++ENTRY(memcpy) /* (void *, const void*, size_t) */ ++ ++/* Handle tiny blocks. */ ++ ++L(1try): /* up to 32B */ + cmpq $32, %rdx +- movq %rdx, %rcx +-#if !MEMPCPY_P +- movq %rdi, %r10 /* Save value. */ ++#ifndef USE_AS_MEMPCPY ++ movq %rdi, %rax /* save return value */ + #endif ++ jae L(1after) + +- /* We need this in any case. */ +- cld ++L(1): /* 1-byte once */ ++ testb $1, %dl ++ jz L(1a) + +- jbe 1f ++ movzbl (%rsi), %ecx ++ movb %cl, (%rdi) + +- /* Align destination. */ +- movq %rdi, %rax +- negq %rax +- andq $7, %rax +- subq %rax, %rcx +- xchgq %rax, %rcx ++ incq %rsi ++ incq %rdi ++ ++ .p2align 4,, 4 ++ ++L(1a): /* 2-byte once */ ++ testb $2, %dl ++ jz L(1b) ++ ++ movzwl (%rsi), %ecx ++ movw %cx, (%rdi) + +- rep; movsb ++ addq $2, %rsi ++ addq $2, %rdi + +- movq %rax, %rcx +- subq $32, %rcx +- js 2f ++ .p2align 4,, 4 ++ ++L(1b): /* 4-byte once */ ++ testb $4, %dl ++ jz L(1c) ++ ++ movl (%rsi), %ecx ++ movl %ecx, (%rdi) ++ ++ addq $4, %rsi ++ addq $4, %rdi ++ ++ .p2align 4,, 4 ++ ++L(1c): /* 8-byte once */ ++ testb $8, %dl ++ jz L(1d) ++ ++ movq (%rsi), %rcx ++ movq %rcx, (%rdi) ++ ++ addq $8, %rsi ++ addq $8, %rdi ++ ++ .p2align 4,, 4 ++ ++L(1d): /* 16-byte loop */ ++ andl $0xf0, %edx ++ jz L(exit) + + .p2align 4 +-3: + +- /* Now correct the loop counter. Please note that in the following +- code the flags are not changed anymore. */ +- subq $32, %rcx ++L(1loop): ++ movq (%rsi), %rcx ++ movq 8 (%rsi), %r8 ++ movq %rcx, (%rdi) ++ movq %r8, 8 (%rdi) ++ ++ subl $16, %edx ++ ++ leaq 16 (%rsi), %rsi ++ leaq 16 (%rdi), %rdi ++ ++ jnz L(1loop) ++ ++ .p2align 4,, 4 ++ ++L(exit): /* exit */ ++#ifdef USE_AS_MEMPCPY ++ movq %rdi, %rax /* return value */ ++#else ++ rep ++#endif ++ retq ++ ++ .p2align 4 ++ ++L(1after): ++#ifndef USE_AS_MEMPCPY ++ movq %rax, RETVAL (%rsp) /* save return value */ ++#endif ++ ++/* Align to the natural word size. */ ++ ++L(aligntry): ++ movl %esi, %ecx /* align by destination */ ++ ++ andl $7, %ecx ++ jz L(alignafter) /* already aligned */ ++ ++L(align): /* align */ ++ leaq -8 (%rcx, %rdx), %rdx /* calculate remaining bytes */ ++ subl $8, %ecx ++ ++ .p2align 4 ++ ++L(alignloop): /* 1-byte alignment loop */ ++ movzbl (%rsi), %eax ++ movb %al, (%rdi) ++ ++ incl %ecx ++ ++ leaq 1 (%rsi), %rsi ++ leaq 1 (%rdi), %rdi ++ ++ jnz L(alignloop) ++ ++ .p2align 4 ++ ++L(alignafter): ++ ++/* Loop to handle mid-sized blocks. */ ++ ++L(32try): /* up to 1KB */ ++ cmpq $1024, %rdx ++ ja L(32after) ++ ++L(32): /* 32-byte loop */ ++ movl %edx, %ecx ++ shrl $5, %ecx ++ jz L(32skip) ++ ++ .p2align 4 ++ ++L(32loop): ++ decl %ecx + + movq (%rsi), %rax +- movq 8(%rsi), %rdx +- movq 16(%rsi), %r8 +- movq 24(%rsi), %r9 ++ movq 8 (%rsi), %r8 ++ movq 16 (%rsi), %r9 ++ movq 24 (%rsi), %r10 ++ + movq %rax, (%rdi) +- movq %rdx, 8(%rdi) +- movq %r8, 16(%rdi) +- movq %r9, 24(%rdi) ++ movq %r8, 8 (%rdi) ++ movq %r9, 16 (%rdi) ++ movq %r10, 24 (%rdi) + + leaq 32(%rsi), %rsi + leaq 32(%rdi), %rdi + +- jns 3b ++ jz L(32skip) /* help out smaller blocks */ ++ ++ decl %ecx ++ ++ movq (%rsi), %rax ++ movq 8 (%rsi), %r8 ++ movq 16 (%rsi), %r9 ++ movq 24 (%rsi), %r10 ++ ++ movq %rax, (%rdi) ++ movq %r8, 8 (%rdi) ++ movq %r9, 16 (%rdi) ++ movq %r10, 24 (%rdi) ++ ++ leaq 32 (%rsi), %rsi ++ leaq 32 (%rdi), %rdi ++ ++ jnz L(32loop) ++ ++ .p2align 4 + +- /* Correct extra loop counter modification. */ +-2: addq $32, %rcx +-1: rep; movsb ++L(32skip): ++ andl $31, %edx /* check for left overs */ ++#ifdef USE_AS_MEMPCPY ++ jnz L(1) + +-#if MEMPCPY_P +- movq %rdi, %rax /* Set return value. */ ++ movq %rdi, %rax + #else +- movq %r10, %rax /* Set return value. */ ++ movq RETVAL (%rsp), %rax ++ jnz L(1) + ++ rep ++#endif ++ retq /* exit */ ++ ++ .p2align 4 ++ ++L(32after): ++ ++/* ++ In order to minimize code-size in RTLD, algorithms specific for ++ larger blocks are excluded when building for RTLD. ++*/ ++ ++/* Handle large blocks smaller than 1/2 L1. */ ++ ++L(fasttry): /* first 1/2 L1 */ ++#ifndef NOT_IN_libc /* only up to this algorithm outside of libc.so */ ++ movq __x86_64_core_cache_size_half (%rip), %r11 ++ cmpq %rdx, %r11 /* calculate the smaller of */ ++ cmovaq %rdx, %r11 /* remaining bytes and 1/2 L1 */ ++#endif ++ ++L(fast): /* good ol' MOVS */ ++#ifndef NOT_IN_libc ++ movq %r11, %rcx ++ andq $-8, %r11 ++#else ++ movq %rdx, %rcx ++#endif ++ shrq $3, %rcx ++ jz L(fastskip) ++ ++ rep ++ movsq ++ ++ .p2align 4,, 4 ++ ++L(fastskip): ++#ifndef NOT_IN_libc ++ subq %r11, %rdx /* check for more */ ++ testq $-8, %rdx ++ jnz L(fastafter) + #endif +- ret + +-END (BP_SYM (memcpy)) +-#if !MEMPCPY_P ++ andl $7, %edx /* check for left overs */ ++#ifdef USE_AS_MEMPCPY ++ jnz L(1) ++ ++ movq %rdi, %rax ++#else ++ movq RETVAL (%rsp), %rax ++ jnz L(1) ++ ++ rep ++#endif ++ retq /* exit */ ++ ++#ifndef NOT_IN_libc /* none of the algorithms below for RTLD */ ++ ++ .p2align 4 ++ ++L(fastafter): ++ ++/* Handle large blocks smaller than 1/2 L2. */ ++ ++L(pretry): /* first 1/2 L2 */ ++ movq __x86_64_shared_cache_size_half (%rip), %r8 ++ cmpq %rdx, %r8 /* calculate the lesser of */ ++ cmovaq %rdx, %r8 /* remaining bytes and 1/2 L2 */ ++ ++L(pre): /* 64-byte with prefetching */ ++ movq %r8, %rcx ++ andq $-64, %r8 ++ shrq $6, %rcx ++ jz L(preskip) ++ ++ movq %r14, SAVE0 (%rsp) ++ cfi_rel_offset (%r14, SAVE0) ++ movq %r13, SAVE1 (%rsp) ++ cfi_rel_offset (%r13, SAVE1) ++ movq %r12, SAVE2 (%rsp) ++ cfi_rel_offset (%r12, SAVE2) ++ movq %rbx, SAVE3 (%rsp) ++ cfi_rel_offset (%rbx, SAVE3) ++ ++ cmpl $0, __x86_64_prefetchw (%rip) ++ jz L(preloop) /* check if PREFETCHW OK */ ++ ++ .p2align 4 ++ ++/* ... when PREFETCHW is available (less cache-probe traffic in MP systems). */ ++ ++L(prewloop): /* cache-line in state M */ ++ decq %rcx ++ ++ movq (%rsi), %rax ++ movq 8 (%rsi), %rbx ++ movq 16 (%rsi), %r9 ++ movq 24 (%rsi), %r10 ++ movq 32 (%rsi), %r11 ++ movq 40 (%rsi), %r12 ++ movq 48 (%rsi), %r13 ++ movq 56 (%rsi), %r14 ++ ++ prefetcht0 0 + 896 (%rsi) ++ prefetcht0 64 + 896 (%rsi) ++ ++ movq %rax, (%rdi) ++ movq %rbx, 8 (%rdi) ++ movq %r9, 16 (%rdi) ++ movq %r10, 24 (%rdi) ++ movq %r11, 32 (%rdi) ++ movq %r12, 40 (%rdi) ++ movq %r13, 48 (%rdi) ++ movq %r14, 56 (%rdi) ++ ++ leaq 64 (%rsi), %rsi ++ leaq 64 (%rdi), %rdi ++ ++ jz L(prebail) ++ ++ decq %rcx ++ ++ movq (%rsi), %rax ++ movq 8 (%rsi), %rbx ++ movq 16 (%rsi), %r9 ++ movq 24 (%rsi), %r10 ++ movq 32 (%rsi), %r11 ++ movq 40 (%rsi), %r12 ++ movq 48 (%rsi), %r13 ++ movq 56 (%rsi), %r14 ++ ++ movq %rax, (%rdi) ++ movq %rbx, 8 (%rdi) ++ movq %r9, 16 (%rdi) ++ movq %r10, 24 (%rdi) ++ movq %r11, 32 (%rdi) ++ movq %r12, 40 (%rdi) ++ movq %r13, 48 (%rdi) ++ movq %r14, 56 (%rdi) ++ ++ prefetchw 896 - 64 (%rdi) ++ prefetchw 896 - 0 (%rdi) ++ ++ leaq 64 (%rsi), %rsi ++ leaq 64 (%rdi), %rdi ++ ++ jnz L(prewloop) ++ jmp L(prebail) ++ ++ .p2align 4 ++ ++/* ... when PREFETCHW is not available. */ ++ ++L(preloop): /* cache-line in state E */ ++ decq %rcx ++ ++ movq (%rsi), %rax ++ movq 8 (%rsi), %rbx ++ movq 16 (%rsi), %r9 ++ movq 24 (%rsi), %r10 ++ movq 32 (%rsi), %r11 ++ movq 40 (%rsi), %r12 ++ movq 48 (%rsi), %r13 ++ movq 56 (%rsi), %r14 ++ ++ prefetcht0 896 + 0 (%rsi) ++ prefetcht0 896 + 64 (%rsi) ++ ++ movq %rax, (%rdi) ++ movq %rbx, 8 (%rdi) ++ movq %r9, 16 (%rdi) ++ movq %r10, 24 (%rdi) ++ movq %r11, 32 (%rdi) ++ movq %r12, 40 (%rdi) ++ movq %r13, 48 (%rdi) ++ movq %r14, 56 (%rdi) ++ ++ leaq 64 (%rsi), %rsi ++ leaq 64 (%rdi), %rdi ++ ++ jz L(prebail) ++ ++ decq %rcx ++ ++ movq (%rsi), %rax ++ movq 8 (%rsi), %rbx ++ movq 16 (%rsi), %r9 ++ movq 24 (%rsi), %r10 ++ movq 32 (%rsi), %r11 ++ movq 40 (%rsi), %r12 ++ movq 48 (%rsi), %r13 ++ movq 56 (%rsi), %r14 ++ ++ prefetcht0 896 - 64 (%rdi) ++ prefetcht0 896 - 0 (%rdi) ++ ++ movq %rax, (%rdi) ++ movq %rbx, 8 (%rdi) ++ movq %r9, 16 (%rdi) ++ movq %r10, 24 (%rdi) ++ movq %r11, 32 (%rdi) ++ movq %r12, 40 (%rdi) ++ movq %r13, 48 (%rdi) ++ movq %r14, 56 (%rdi) ++ ++ leaq 64 (%rsi), %rsi ++ leaq 64 (%rdi), %rdi ++ ++ jnz L(preloop) ++ ++L(prebail): ++ movq SAVE3 (%rsp), %rbx ++ cfi_restore (%rbx) ++ movq SAVE2 (%rsp), %r12 ++ cfi_restore (%r12) ++ movq SAVE1 (%rsp), %r13 ++ cfi_restore (%r13) ++ movq SAVE0 (%rsp), %r14 ++ cfi_restore (%r14) ++ ++/* .p2align 4 */ ++ ++L(preskip): ++ subq %r8, %rdx /* check for more */ ++ testq $-64, %rdx ++ jnz L(preafter) ++ ++ andl $63, %edx /* check for left overs */ ++#ifdef USE_AS_MEMPCPY ++ jnz L(1) ++ ++ movq %rdi, %rax ++#else ++ movq RETVAL (%rsp), %rax ++ jnz L(1) ++ ++ rep ++#endif ++ retq /* exit */ ++ ++ .p2align 4 ++ ++L(preafter): ++ ++/* Loop to handle huge blocks. */ ++ ++L(NTtry): ++ ++L(NT): /* non-temporal 128-byte */ ++ movq %rdx, %rcx ++ shrq $7, %rcx ++ jz L(NTskip) ++ ++ movq %r14, SAVE0 (%rsp) ++ cfi_rel_offset (%r14, SAVE0) ++ movq %r13, SAVE1 (%rsp) ++ cfi_rel_offset (%r13, SAVE1) ++ movq %r12, SAVE2 (%rsp) ++ cfi_rel_offset (%r12, SAVE2) ++ ++ .p2align 4 ++ ++L(NTloop): ++ prefetchnta 768 (%rsi) ++ prefetchnta 832 (%rsi) ++ ++ decq %rcx ++ ++ movq (%rsi), %rax ++ movq 8 (%rsi), %r8 ++ movq 16 (%rsi), %r9 ++ movq 24 (%rsi), %r10 ++ movq 32 (%rsi), %r11 ++ movq 40 (%rsi), %r12 ++ movq 48 (%rsi), %r13 ++ movq 56 (%rsi), %r14 ++ ++ movntiq %rax, (%rdi) ++ movntiq %r8, 8 (%rdi) ++ movntiq %r9, 16 (%rdi) ++ movntiq %r10, 24 (%rdi) ++ movntiq %r11, 32 (%rdi) ++ movntiq %r12, 40 (%rdi) ++ movntiq %r13, 48 (%rdi) ++ movntiq %r14, 56 (%rdi) ++ ++ movq 64 (%rsi), %rax ++ movq 72 (%rsi), %r8 ++ movq 80 (%rsi), %r9 ++ movq 88 (%rsi), %r10 ++ movq 96 (%rsi), %r11 ++ movq 104 (%rsi), %r12 ++ movq 112 (%rsi), %r13 ++ movq 120 (%rsi), %r14 ++ ++ movntiq %rax, 64 (%rdi) ++ movntiq %r8, 72 (%rdi) ++ movntiq %r9, 80 (%rdi) ++ movntiq %r10, 88 (%rdi) ++ movntiq %r11, 96 (%rdi) ++ movntiq %r12, 104 (%rdi) ++ movntiq %r13, 112 (%rdi) ++ movntiq %r14, 120 (%rdi) ++ ++ leaq 128 (%rsi), %rsi ++ leaq 128 (%rdi), %rdi ++ ++ jnz L(NTloop) ++ ++ sfence /* serialize memory stores */ ++ ++ movq SAVE2 (%rsp), %r12 ++ cfi_restore (%r12) ++ movq SAVE1 (%rsp), %r13 ++ cfi_restore (%r13) ++ movq SAVE0 (%rsp), %r14 ++ cfi_restore (%r14) ++ ++L(NTskip): ++ andl $127, %edx /* check for left overs */ ++#ifdef USE_AS_MEMPCPY ++ jnz L(1) ++ ++ movq %rdi, %rax ++#else ++ movq RETVAL (%rsp), %rax ++ jnz L(1) ++ ++ rep ++#endif ++ retq /* exit */ ++ ++#endif /* !NOT_IN_libc */ ++ ++END(memcpy) ++ ++#ifndef USE_AS_MEMPCPY + libc_hidden_builtin_def (memcpy) + #endif +--- libc/sysdeps/x86_64/mempcpy.S 18 Oct 2004 04:17:08 -0000 1.3 ++++ libc/sysdeps/x86_64/mempcpy.S 21 May 2007 19:21:16 -0000 1.4 +@@ -1,3 +1,4 @@ ++#define USE_AS_MEMPCPY + #define memcpy __mempcpy + #define __memcpy_chk __mempcpy_chk + #include <sysdeps/x86_64/memcpy.S> +--- libc/sysdeps/unix/sysv/linux/x86_64/sysconf.c 10 Nov 2006 07:31:55 -0000 1.7 ++++ libc/sysdeps/unix/sysv/linux/x86_64/sysconf.c 21 May 2007 19:18:37 -0000 1.8 +@@ -24,328 +24,17 @@ + + + static long int linux_sysconf (int name); +- +- +-static const struct intel_02_cache_info +-{ +- unsigned int idx; +- int name; +- long int size; +- long int assoc; +- long int linesize; +-} intel_02_known[] = +- { +- { 0x06, _SC_LEVEL1_ICACHE_SIZE, 8192, 4, 32 }, +- { 0x08, _SC_LEVEL1_ICACHE_SIZE, 16384, 4, 32 }, +- { 0x0a, _SC_LEVEL1_DCACHE_SIZE, 8192, 2, 32 }, +- { 0x0c, _SC_LEVEL1_DCACHE_SIZE, 16384, 4, 32 }, +- { 0x22, _SC_LEVEL3_CACHE_SIZE, 524288, 4, 64 }, +- { 0x23, _SC_LEVEL3_CACHE_SIZE, 1048576, 8, 64 }, +- { 0x25, _SC_LEVEL3_CACHE_SIZE, 2097152, 8, 64 }, +- { 0x29, _SC_LEVEL3_CACHE_SIZE, 4194304, 8, 64 }, +- { 0x2c, _SC_LEVEL1_DCACHE_SIZE, 32768, 8, 64 }, +- { 0x30, _SC_LEVEL1_ICACHE_SIZE, 32768, 8, 64 }, +- { 0x39, _SC_LEVEL2_CACHE_SIZE, 131072, 4, 64 }, +- { 0x3a, _SC_LEVEL2_CACHE_SIZE, 196608, 6, 64 }, +- { 0x3b, _SC_LEVEL2_CACHE_SIZE, 131072, 2, 64 }, +- { 0x3c, _SC_LEVEL2_CACHE_SIZE, 262144, 4, 64 }, +- { 0x3d, _SC_LEVEL2_CACHE_SIZE, 393216, 6, 64 }, +- { 0x3e, _SC_LEVEL2_CACHE_SIZE, 524288, 4, 64 }, +- { 0x41, _SC_LEVEL2_CACHE_SIZE, 131072, 4, 32 }, +- { 0x42, _SC_LEVEL2_CACHE_SIZE, 262144, 4, 32 }, +- { 0x43, _SC_LEVEL2_CACHE_SIZE, 524288, 4, 32 }, +- { 0x44, _SC_LEVEL2_CACHE_SIZE, 1048576, 4, 32 }, +- { 0x45, _SC_LEVEL2_CACHE_SIZE, 2097152, 4, 32 }, +- { 0x46, _SC_LEVEL3_CACHE_SIZE, 4194304, 4, 64 }, +- { 0x47, _SC_LEVEL3_CACHE_SIZE, 8388608, 8, 64 }, +- { 0x49, _SC_LEVEL2_CACHE_SIZE, 4194304, 16, 64 }, +- { 0x4a, _SC_LEVEL3_CACHE_SIZE, 6291456, 12, 64 }, +- { 0x4b, _SC_LEVEL3_CACHE_SIZE, 8388608, 16, 64 }, +- { 0x4c, _SC_LEVEL3_CACHE_SIZE, 12582912, 12, 64 }, +- { 0x4d, _SC_LEVEL3_CACHE_SIZE, 16777216, 16, 64 }, +- { 0x60, _SC_LEVEL1_DCACHE_SIZE, 16384, 8, 64 }, +- { 0x66, _SC_LEVEL1_DCACHE_SIZE, 8192, 4, 64 }, +- { 0x67, _SC_LEVEL1_DCACHE_SIZE, 16384, 4, 64 }, +- { 0x68, _SC_LEVEL1_DCACHE_SIZE, 32768, 4, 64 }, +- { 0x78, _SC_LEVEL2_CACHE_SIZE, 1048576, 8, 64 }, +- { 0x79, _SC_LEVEL2_CACHE_SIZE, 131072, 8, 64 }, +- { 0x7a, _SC_LEVEL2_CACHE_SIZE, 262144, 8, 64 }, +- { 0x7b, _SC_LEVEL2_CACHE_SIZE, 524288, 8, 64 }, +- { 0x7c, _SC_LEVEL2_CACHE_SIZE, 1048576, 8, 64 }, +- { 0x7d, _SC_LEVEL2_CACHE_SIZE, 2097152, 8, 64 }, +- { 0x7f, _SC_LEVEL2_CACHE_SIZE, 524288, 2, 64 }, +- { 0x82, _SC_LEVEL2_CACHE_SIZE, 262144, 8, 32 }, +- { 0x83, _SC_LEVEL2_CACHE_SIZE, 524288, 8, 32 }, +- { 0x84, _SC_LEVEL2_CACHE_SIZE, 1048576, 8, 32 }, +- { 0x85, _SC_LEVEL2_CACHE_SIZE, 2097152, 8, 32 }, +- { 0x86, _SC_LEVEL2_CACHE_SIZE, 524288, 4, 64 }, +- { 0x87, _SC_LEVEL2_CACHE_SIZE, 1048576, 8, 64 }, +- }; +-#define nintel_02_known (sizeof (intel_02_known) / sizeof (intel_02_known[0])) +- +- +-static int +-intel_02_known_compare (const void *p1, const void *p2) +-{ +- const struct intel_02_cache_info *i1; +- const struct intel_02_cache_info *i2; +- +- i1 = (const struct intel_02_cache_info *) p1; +- i2 = (const struct intel_02_cache_info *) p2; +- +- if (i1->idx == i2->idx) +- return 0; +- +- return i1->idx < i2->idx ? -1 : 1; +-} +- +- +-static long int +-__attribute__ ((noinline)) +-intel_check_word (int name, unsigned int value, bool *has_level_2, +- bool *no_level_2_or_3) +-{ +- if ((value & 0x80000000) != 0) +- /* The register value is reserved. */ +- return 0; +- +- /* Fold the name. The _SC_ constants are always in the order SIZE, +- ASSOC, LINESIZE. */ +- int folded_name = (_SC_LEVEL1_ICACHE_SIZE +- + ((name - _SC_LEVEL1_ICACHE_SIZE) / 3) * 3); +- +- while (value != 0) +- { +- unsigned int byte = value & 0xff; +- +- if (byte == 0x40) +- { +- *no_level_2_or_3 = true; +- +- if (folded_name == _SC_LEVEL3_CACHE_SIZE) +- /* No need to look further. */ +- break; +- } +- else +- { +- if (byte == 0x49 && folded_name == _SC_LEVEL3_CACHE_SIZE) +- { +- /* Intel reused this value. For family 15, model 6 it +- specifies the 3rd level cache. Otherwise the 2nd +- level cache. */ +- unsigned int eax; +- unsigned int ebx; +- unsigned int ecx; +- unsigned int edx; +- asm volatile ("xchgl %%ebx, %1; cpuid; xchgl %%ebx, %1" +- : "=a" (eax), "=r" (ebx), "=c" (ecx), "=d" (edx) +- : "0" (1)); +- +- unsigned int family = ((eax >> 20) & 0xff) + ((eax >> 8) & 0xf); +- unsigned int model = ((((eax >>16) & 0xf) << 4) +- + ((eax >> 4) & 0xf)); +- if (family == 15 && model == 6) +- { +- /* The level 3 cache is encoded for this model like +- the level 2 cache is for other models. Pretend +- the caller asked for the level 2 cache. */ +- name = (_SC_LEVEL2_CACHE_SIZE +- + (name - _SC_LEVEL3_CACHE_SIZE)); +- folded_name = _SC_LEVEL3_CACHE_SIZE; +- } +- } +- +- struct intel_02_cache_info *found; +- struct intel_02_cache_info search; +- +- search.idx = byte; +- found = bsearch (&search, intel_02_known, nintel_02_known, +- sizeof (intel_02_known[0]), intel_02_known_compare); +- if (found != NULL) +- { +- if (found->name == folded_name) +- { +- unsigned int offset = name - folded_name; +- +- if (offset == 0) +- /* Cache size. */ +- return found->size; +- if (offset == 1) +- return found->assoc; +- +- assert (offset == 2); +- return found->linesize; +- } +- +- if (found->name == _SC_LEVEL2_CACHE_SIZE) +- *has_level_2 = true; +- } +- } +- +- /* Next byte for the next round. */ +- value >>= 8; +- } +- +- /* Nothing found. */ +- return 0; +-} +- +- +-static long int __attribute__ ((noinline)) +-handle_intel (int name, unsigned int maxidx) +-{ +- assert (maxidx >= 2); +- +- /* OK, we can use the CPUID instruction to get all info about the +- caches. */ +- unsigned int cnt = 0; +- unsigned int max = 1; +- long int result = 0; +- bool no_level_2_or_3 = false; +- bool has_level_2 = false; +- while (cnt++ < max) +- { +- unsigned int eax; +- unsigned int ebx; +- unsigned int ecx; +- unsigned int edx; +- asm volatile ("xchgl %%ebx, %1; cpuid; xchgl %%ebx, %1" +- : "=a" (eax), "=r" (ebx), "=c" (ecx), "=d" (edx) +- : "0" (2)); +- +- /* The low byte of EAX in the first round contain the number of +- rounds we have to make. At least one, the one we are already +- doing. */ +- if (cnt == 1) +- { +- max = eax & 0xff; +- eax &= 0xffffff00; +- } +- +- /* Process the individual registers' value. */ +- result = intel_check_word (name, eax, &has_level_2, &no_level_2_or_3); +- if (result != 0) +- return result; +- +- result = intel_check_word (name, ebx, &has_level_2, &no_level_2_or_3); +- if (result != 0) +- return result; +- +- result = intel_check_word (name, ecx, &has_level_2, &no_level_2_or_3); +- if (result != 0) +- return result; +- +- result = intel_check_word (name, edx, &has_level_2, &no_level_2_or_3); +- if (result != 0) +- return result; +- } +- +- if (name >= _SC_LEVEL2_CACHE_SIZE && name <= _SC_LEVEL3_CACHE_LINESIZE +- && no_level_2_or_3) +- return -1; +- +- return 0; +-} +- +- +-static long int __attribute__ ((noinline)) +-handle_amd (int name) +-{ +- unsigned int eax; +- unsigned int ebx; +- unsigned int ecx; +- unsigned int edx; +- asm volatile ("xchgl %%ebx, %1; cpuid; xchgl %%ebx, %1" +- : "=a" (eax), "=r" (ebx), "=c" (ecx), "=d" (edx) +- : "0" (0x80000000)); +- +- if (name >= _SC_LEVEL3_CACHE_SIZE) +- return 0; +- +- unsigned int fn = 0x80000005 + (name >= _SC_LEVEL2_CACHE_SIZE); +- if (eax < fn) +- return 0; +- +- asm volatile ("xchgl %%ebx, %1; cpuid; xchgl %%ebx, %1" +- : "=a" (eax), "=r" (ebx), "=c" (ecx), "=d" (edx) +- : "0" (fn)); +- +- if (name < _SC_LEVEL1_DCACHE_SIZE) +- { +- name += _SC_LEVEL1_DCACHE_SIZE - _SC_LEVEL1_ICACHE_SIZE; +- ecx = edx; +- } +- +- switch (name) +- { +- case _SC_LEVEL1_DCACHE_SIZE: +- return (ecx >> 14) & 0x3fc00; +- case _SC_LEVEL1_DCACHE_ASSOC: +- ecx >>= 16; +- if ((ecx & 0xff) == 0xff) +- /* Fully associative. */ +- return (ecx << 2) & 0x3fc00; +- return ecx & 0xff; +- case _SC_LEVEL1_DCACHE_LINESIZE: +- return ecx & 0xff; +- case _SC_LEVEL2_CACHE_SIZE: +- return (ecx & 0xf000) == 0 ? 0 : (ecx >> 6) & 0x3fffc00; +- case _SC_LEVEL2_CACHE_ASSOC: +- ecx >>= 12; +- switch (ecx & 0xf) +- { +- case 0: +- case 1: +- case 2: +- case 4: +- return ecx & 0xf; +- case 6: +- return 8; +- case 8: +- return 16; +- case 0xf: +- return (ecx << 6) & 0x3fffc00; +- default: +- return 0; +- } +- case _SC_LEVEL2_CACHE_LINESIZE: +- return (ecx & 0xf000) == 0 ? 0 : ecx & 0xff; +- default: +- assert (! "cannot happen"); +- } +- return -1; +-} ++extern long int __cache_sysconf (int) attribute_hidden; + + + /* Get the value of the system variable NAME. */ + long int + __sysconf (int name) + { +- /* We only handle the cache information here (for now). */ +- if (name < _SC_LEVEL1_ICACHE_SIZE || name > _SC_LEVEL4_CACHE_LINESIZE) +- return linux_sysconf (name); +- +- /* Find out what brand of processor. */ +- unsigned int eax; +- unsigned int ebx; +- unsigned int ecx; +- unsigned int edx; +- asm volatile ("xchgl %%ebx, %1; cpuid; xchgl %%ebx, %1" +- : "=a" (eax), "=r" (ebx), "=c" (ecx), "=d" (edx) +- : "0" (0)); +- +- /* This spells out "GenuineIntel". */ +- if (ebx == 0x756e6547 && ecx == 0x6c65746e && edx == 0x49656e69) +- return handle_intel (name, eax); +- +- /* This spells out "AuthenticAMD". */ +- if (ebx == 0x68747541 && ecx == 0x444d4163 && edx == 0x69746e65) +- return handle_amd (name); +- +- // XXX Fill in more vendors. ++ if (name >= _SC_LEVEL1_ICACHE_SIZE && name <= _SC_LEVEL4_CACHE_LINESIZE) ++ return __cache_sysconf (name); + +- /* CPU not known, we have no information. */ +- return 0; ++ return linux_sysconf (name); + } + + /* Now the generic Linux version. */ diff --git a/fedora/glibc.spec.in b/fedora/glibc.spec.in new file mode 100644 index 0000000000..5e13ea805a --- /dev/null +++ b/fedora/glibc.spec.in @@ -0,0 +1,4512 @@ +%define glibcrelease 18.1 +%define auxarches i586 i686 athlon sparcv9 alphaev6 +%define xenarches i686 athlon +%ifarch %{xenarches} +%define buildxen 1 +%define xenpackage 0 +%else +%define buildxen 0 +%define xenpackage 0 +%endif +%ifarch ppc ppc64 +%define buildpower6 1 +%else +%define buildpower6 0 +%endif +%define rtkaioarches %{ix86} x86_64 ia64 ppc ppc64 s390 s390x +%define debuginfocommonarches %{ix86} alpha alphaev6 sparc sparcv9 +%define _unpackaged_files_terminate_build 0 +Summary: The GNU libc libraries. +Name: glibc +Version: %{glibcversion} +Release: %{glibcrelease} +License: LGPL +Group: System Environment/Libraries +Source0: %{glibcsrcdir}.tar.bz2 +%if %{glibc_release_tarballs} +Source1: %(echo %{glibcsrcdir} | sed s/glibc-/glibc-linuxthreads-/).tar.bz2 +Source2: %(echo %{glibcsrcdir} | sed s/glibc-/glibc-libidn-/).tar.bz2 +%define glibc_release_unpack -a1 -a2 +%endif +Source3: %{glibcname}-fedora-%{glibcdate}.tar.bz2 +Patch0: %{glibcname}-fedora.patch +Patch1: %{name}-ia64-lib64.patch +Patch2: glibc-rh234946.patch +Patch3: glibc-x86_64-memcpy.patch +Buildroot: %{_tmppath}/glibc-%{PACKAGE_VERSION}-root +Obsoletes: zoneinfo, libc-static, libc-devel, libc-profile, libc-headers, +Obsoletes: gencat, locale, ldconfig, locale-ja, glibc-profile +Provides: ldconfig +# The dynamic linker supports DT_GNU_HASH +Provides: rtld(GNU_HASH) +Autoreq: false +Requires: glibc-common = %{version}-%{release} +%ifarch sparc +Obsoletes: libc +%endif +# Require libgcc in case some program calls pthread_cancel in its %%post +Prereq: basesystem, libgcc +# This is for building auxiliary programs like memusage, nscd +# For initial glibc bootstraps it can be commented out +BuildPreReq: gd-devel libpng-devel zlib-devel texinfo, libselinux-devel >= 1.17.10-1 +BuildPreReq: audit-libs-devel >= 1.1.3, sed >= 3.95, libcap-devel, gettext +BuildPreReq: /bin/ps, /bin/kill, /bin/awk +# This is to ensure that __frame_state_for is exported by glibc +# will be compatible with egcs 1.x.y +BuildPreReq: gcc >= 3.2 +Conflicts: rpm <= 4.0-0.65 +Conflicts: glibc-devel < 2.2.3 +Conflicts: gcc4 <= 4.0.0-0.6 +%ifarch x86_64 %{ix86} +# Need gdb that understands DW_CFA_val_expression +Conflicts: gdb < 6.3.0.0-1.111 +%endif +# Earlier shadow-utils packages had too restrictive permissions on +# /etc/default +Conflicts: shadow-utils < 2:4.0.3-20 +Conflicts: nscd < 2.3.3-52 +Conflicts: kernel < 2.6.9 +%define enablekernel 2.6.9 +%ifarch i386 +%define nptl_target_cpu i486 +%else +%define nptl_target_cpu %{_target_cpu} +%endif +# Need AS_NEEDED directive +# Need --hash-style=* support +BuildRequires: binutils >= 2.17.50.0.2-5 +BuildRequires: gcc >= 3.2.1-5 +%ifarch ppc s390 s390x +BuildRequires: gcc >= 4.1.0-0.17 +%endif +%if "%{_enable_debug_packages}" == "1" +BuildPreReq: elfutils >= 0.72 +BuildPreReq: rpm >= 4.2-0.56 +%endif +%define __find_provides %{_builddir}/%{glibcsrcdir}/find_provides.sh +%define _filter_GLIBC_PRIVATE 1 + +%description +The glibc package contains standard libraries which are used by +multiple programs on the system. In order to save disk space and +memory, as well as to make upgrading easier, common system code is +kept in one place and shared between programs. This particular package +contains the most important sets of shared libraries: the standard C +library and the standard math library. Without these two libraries, a +Linux system will not function. + +%if %{xenpackage} +%package xen +Summary: The GNU libc libraries (optimized for running under Xen) +Group: System Environment/Libraries +Requires: glibc = %{version}-%{release}, glibc-utils = %{version}-%{release} + +%description xen +The standard glibc package is optimized for native kernels and does not +perform as well under the Xen hypervisor. This package provides alternative +library binaries that will be selected instead when running under Xen. + +Install glibc-xen if you might run your system under the Xen hypervisor. +%endif + +%package devel +Summary: Object files for development using standard C libraries. +Group: Development/Libraries +Conflicts: texinfo < 3.11 +# Need AS_NEEDED directive +Conflicts: binutils < 2.15.94.0.2-1 +Prereq: /sbin/install-info +Obsoletes: libc-debug, libc-headers, libc-devel, linuxthreads-devel +Obsoletes: glibc-debug, nptl-devel +Prereq: %{name}-headers +Requires: %{name}-headers = %{version}-%{release}, %{name} = %{version}-%{release} +%ifarch %{ix86} +# Earlier gcc's had atexit reference in crtendS.o, which does not +# work with this glibc where atexit is in libc_nonshared.a +Conflicts: gcc < 2.96-79 +%endif +Autoreq: true + +%description devel +The glibc-devel package contains the object files necessary +for developing programs which use the standard C libraries (which are +used by nearly all programs). If you are developing programs which +will use the standard C libraries, your system needs to have these +standard object files available in order to create the +executables. + +Install glibc-devel if you are going to develop programs which will +use the standard C libraries. + +%package headers +Summary: Header files for development using standard C libraries. +Group: Development/Libraries +Provides: %{name}-headers(%{_target_cpu}) +%ifarch x86_64 +# If both -m32 and -m64 is to be supported on AMD64, x86_64 glibc-headers +# have to be installed, not i386 ones. +Obsoletes: %{name}-headers(i386) +%endif +Obsoletes: libc-debug, libc-headers, libc-devel +Prereq: kernel-headers +Requires: kernel-headers >= 2.2.1, %{name} = %{version}-%{release} +Autoreq: true + +%description headers +The glibc-headers package contains the header files necessary +for developing programs which use the standard C libraries (which are +used by nearly all programs). If you are developing programs which +will use the standard C libraries, your system needs to have these +standard header files available in order to create the +executables. + +Install glibc-headers if you are going to develop programs which will +use the standard C libraries. + +%package common +Summary: Common binaries and locale data for glibc +Conflicts: %{name} < %{version} +Conflicts: %{name} > %{version} +Autoreq: false +Requires: tzdata >= 2003a +Group: System Environment/Base + +%description common +The glibc-common package includes common binaries for the GNU libc +libraries, as well as national language (locale) support. + +%package -n nscd +Summary: A Name Service Caching Daemon (nscd). +Group: System Environment/Daemons +Conflicts: kernel < 2.2.0 +Requires: libselinux >= 1.17.10-1, audit-libs >= 1.1.3 +Conflicts: selinux-policy-targeted < 1.17.30-2.2 +Prereq: /sbin/chkconfig, /usr/sbin/useradd, /usr/sbin/userdel, sh-utils +Autoreq: true + +%description -n nscd +Nscd caches name service lookups and can dramatically improve +performance with NIS+, and may help with DNS as well. + +%package utils +Summary: Development utilities from GNU C library +Group: Development/Tools +Requires: glibc = %{version}-%{release} + +%description utils +The glibc-utils package contains memusage, a memory usage profiler, +mtrace, a memory leak tracer and xtrace, a function call tracer +which can be helpful during program debugging. + +If unsure if you need this, don't install this package. + +%if "%{_enable_debug_packages}" == "1" +%define debug_package %{nil} + +%package debuginfo +Summary: Debug information for package %{name} +Group: Development/Debug +%ifarch %{debuginfocommonarches} +Requires: glibc-debuginfo-common = %{version}-%{release} +%endif + +%description debuginfo +This package provides debug information for package %{name}. +Debug information is useful when developing applications that use this +package or when debugging this package. + +This package also contains static standard C libraries with +debugging information. You need this only if you want to step into +C library routines during debugging programs statically linked against +one or more of the standard C libraries. +To use this debugging information, you need to link binaries +with -static -L%{_prefix}/lib/debug%{_prefix}/%{_lib} compiler options. + +%ifarch %{debuginfocommonarches} + +%package debuginfo-common +Summary: Debug information for package %{name} +Group: Development/Debug + +%description debuginfo-common +This package provides debug information for package %{name}. +Debug information is useful when developing applications that use this +package or when debugging this package. + +%endif +%endif + +%prep +%setup -q -n %{glibcsrcdir} %{glibc_release_unpack} -a3 +%patch0 -E -p1 +%ifarch ia64 +%if "%{_lib}" == "lib64" +%patch1 -p1 +%endif +%endif +%patch2 -p1 +# Postpone until this is enough tested in F7 +#%patch3 -p1 + +# Hack till glibc-kernheaders get updated, argh +mkdir -p override_headers/linux +cat > override_headers/linux/version.h <<EOF +#define UTS_RELEASE "2.6.9" +#define LINUX_VERSION_CODE 132617 +#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) +EOF +mkdir -p override_headers/asm +cat > override_headers/asm/unistd.h <<EOF +#ifndef _HACK_ASM_UNISTD_H +#include_next <asm/unistd.h> +%ifarch alpha +#ifndef __NR_stat64 +#define __NR_stat64 425 +#define __NR_lstat64 426 +#define __NR_fstat64 427 +#endif +#ifndef __NR_mq_open +#define __NR_mq_open 432 +#define __NR_mq_unlink 433 +#define __NR_mq_timedsend 434 +#define __NR_mq_timedreceive 435 +#define __NR_mq_notify 436 +#define __NR_mq_getsetattr 437 +#endif +#ifndef __NR_waitid +#define __NR_waitid 438 +#endif +#ifndef __NR_inotify_init +#define __NR_inotify_init 444 +#define __NR_inotify_add_watch 445 +#define __NR_inotify_rm_watch 446 +#endif +%endif +%ifarch %{ix86} +#ifndef __NR_mq_open +#define __NR_mq_open 277 +#define __NR_mq_unlink (__NR_mq_open+1) +#define __NR_mq_timedsend (__NR_mq_open+2) +#define __NR_mq_timedreceive (__NR_mq_open+3) +#define __NR_mq_notify (__NR_mq_open+4) +#define __NR_mq_getsetattr (__NR_mq_open+5) +#endif +#ifndef __NR_waitid +#define __NR_waitid 284 +#endif +#ifndef __NR_inotify_init +#define __NR_inotify_init 291 +#define __NR_inotify_add_watch 292 +#define __NR_inotify_rm_watch 293 +#endif +#ifndef __NR_openat +#define __NR_openat 295 +#define __NR_mkdirat 296 +#define __NR_mknodat 297 +#define __NR_fchownat 298 +#define __NR_futimesat 299 +#define __NR_unlinkat 301 +#define __NR_renameat 302 +#define __NR_linkat 303 +#define __NR_symlinkat 304 +#define __NR_readlinkat 305 +#define __NR_fchmodat 306 +#define __NR_faccessat 307 +#endif +#ifndef __NR_fstatat64 +#define __NR_fstatat64 300 +#endif +#ifndef __NR_pselect6 +#define __NR_pselect6 308 +#define __NR_ppoll 309 +#endif +#ifndef __NR_unshare +#define __NR_unshare 310 +#endif +#ifndef __NR_set_robust_list +#define __NR_set_robust_list 311 +#define __NR_get_robust_list 312 +#endif +#ifndef __NR_splice +#define __NR_splice 313 +#endif +#ifndef __NR_sync_file_range +#define __NR_sync_file_range 314 +#endif +#ifndef __NR_tee +#define __NR_tee 315 +#endif +#ifndef __NR_vmsplice +#define __NR_vmsplice 316 +#endif +%endif +%ifarch ia64 +#ifndef __NR_timer_create +#define __NR_timer_create 1248 +#define __NR_timer_settime 1249 +#define __NR_timer_gettime 1250 +#define __NR_timer_getoverrun 1251 +#define __NR_timer_delete 1252 +#define __NR_clock_settime 1253 +#define __NR_clock_gettime 1254 +#define __NR_clock_getres 1255 +#define __NR_clock_nanosleep 1256 +#endif +#ifndef __NR_mq_open +#define __NR_mq_open 1262 +#define __NR_mq_unlink 1263 +#define __NR_mq_timedsend 1264 +#define __NR_mq_timedreceive 1265 +#define __NR_mq_notify 1266 +#define __NR_mq_getsetattr 1267 +#endif +#ifndef __NR_waitid +#define __NR_waitid 1270 +#endif +#ifndef __NR_inotify_init +#define __NR_inotify_init 1277 +#define __NR_inotify_add_watch 1278 +#define __NR_inotify_rm_watch 1279 +#endif +#ifndef __NR_openat +#define __NR_openat 1281 +#define __NR_mkdirat 1282 +#define __NR_mknodat 1283 +#define __NR_fchownat 1284 +#define __NR_futimesat 1285 +#define __NR_newfstatat 1286 +#define __NR_unlinkat 1287 +#define __NR_renameat 1288 +#define __NR_linkat 1289 +#define __NR_symlinkat 1290 +#define __NR_readlinkat 1291 +#define __NR_fchmodat 1292 +#define __NR_faccessat 1293 +#endif +#if 0 +#ifndef __NR_pselect6 +#define __NR_pselect6 1294 +#define __NR_ppoll 1295 +#endif +#endif +#ifndef __NR_unshare +#define __NR_unshare 1296 +#endif +#ifndef __NR_splice +#define __NR_splice 1297 +#endif +#ifndef __NR_set_robust_list +#define __NR_set_robust_list 1298 +#define __NR_get_robust_list 1299 +#endif +#ifndef __NR_sync_file_range +#define __NR_sync_file_range 1300 +#endif +#ifndef __NR_tee +#define __NR_tee 1301 +#endif +#ifndef __NR_vmsplice +#define __NR_vmsplice 1302 +#endif +%endif +%ifarch ppc +#ifndef __NR_utimes +#define __NR_utimes 251 +#endif +#ifndef __NR_statfs64 +#define __NR_statfs64 252 +#define __NR_fstatfs64 253 +#endif +#ifndef __NR_fadvise64_64 +#define __NR_fadvise64_64 254 +#endif +#ifndef __NR_mq_open +#define __NR_mq_open 262 +#define __NR_mq_unlink 263 +#define __NR_mq_timedsend 264 +#define __NR_mq_timedreceive 265 +#define __NR_mq_notify 266 +#define __NR_mq_getsetattr 267 +#endif +#ifndef __NR_waitid +#define __NR_waitid 272 +#endif +#ifndef __NR_inotify_init +#define __NR_inotify_init 275 +#define __NR_inotify_add_watch 276 +#define __NR_inotify_rm_watch 277 +#endif +#ifndef __NR_pselect6 +#define __NR_pselect6 280 +#define __NR_ppoll 281 +#endif +#ifndef __NR_unshare +#define __NR_unshare 282 +#endif +#ifndef __NR_splice +#define __NR_splice 283 +#endif +#ifndef __NR_tee +#define __NR_tee 284 +#endif +#ifndef __NR_vmsplice +#define __NR_vmsplice 285 +#endif +#ifndef __NR_openat +#define __NR_openat 286 +#define __NR_mkdirat 287 +#define __NR_mknodat 288 +#define __NR_fchownat 289 +#define __NR_futimesat 290 +#define __NR_fstatat64 291 +#define __NR_unlinkat 292 +#define __NR_renameat 293 +#define __NR_linkat 294 +#define __NR_symlinkat 295 +#define __NR_readlinkat 296 +#define __NR_fchmodat 297 +#define __NR_faccessat 298 +#endif +%endif +%ifarch ppc64 +#ifndef __NR_utimes +#define __NR_utimes 251 +#endif +#ifndef __NR_mq_open +#define __NR_mq_open 262 +#define __NR_mq_unlink 263 +#define __NR_mq_timedsend 264 +#define __NR_mq_timedreceive 265 +#define __NR_mq_notify 266 +#define __NR_mq_getsetattr 267 +#endif +#ifndef __NR_waitid +#define __NR_waitid 272 +#endif +#ifndef __NR_inotify_init +#define __NR_inotify_init 275 +#define __NR_inotify_add_watch 276 +#define __NR_inotify_rm_watch 277 +#endif +#ifndef __NR_pselect6 +#define __NR_pselect6 280 +#define __NR_ppoll 281 +#endif +#ifndef __NR_unshare +#define __NR_unshare 282 +#endif +#ifndef __NR_splice +#define __NR_splice 283 +#endif +#ifndef __NR_tee +#define __NR_tee 284 +#endif +#ifndef __NR_vmsplice +#define __NR_vmsplice 285 +#endif +#ifndef __NR_openat +#define __NR_openat 286 +#define __NR_mkdirat 287 +#define __NR_mknodat 288 +#define __NR_fchownat 289 +#define __NR_futimesat 290 +#define __NR_newfstatat 291 +#define __NR_unlinkat 292 +#define __NR_renameat 293 +#define __NR_linkat 294 +#define __NR_symlinkat 295 +#define __NR_readlinkat 296 +#define __NR_fchmodat 297 +#define __NR_faccessat 298 +#endif +%endif +%ifarch s390 +#ifndef __NR_timer_create +#define __NR_timer_create 254 +#define __NR_timer_settime (__NR_timer_create+1) +#define __NR_timer_gettime (__NR_timer_create+2) +#define __NR_timer_getoverrun (__NR_timer_create+3) +#define __NR_timer_delete (__NR_timer_create+4) +#define __NR_clock_settime (__NR_timer_create+5) +#define __NR_clock_gettime (__NR_timer_create+6) +#define __NR_clock_getres (__NR_timer_create+7) +#define __NR_clock_nanosleep (__NR_timer_create+8) +#endif +#ifndef __NR_fadvise64_64 +#define __NR_fadvise64_64 264 +#endif +#ifndef __NR_statfs64 +#define __NR_statfs64 265 +#define __NR_fstatfs64 266 +#endif +#ifndef __NR_mq_open +#define __NR_mq_open 271 +#define __NR_mq_unlink 272 +#define __NR_mq_timedsend 273 +#define __NR_mq_timedreceive 274 +#define __NR_mq_notify 275 +#define __NR_mq_getsetattr 276 +#endif +#ifndef __NR_waitid +#define __NR_waitid 281 +#endif +#ifndef __NR_inotify_init +#define __NR_inotify_init 284 +#define __NR_inotify_add_watch 285 +#define __NR_inotify_rm_watch 286 +#endif +#ifndef __NR_openat +#define __NR_openat 288 +#define __NR_mkdirat 289 +#define __NR_mknodat 290 +#define __NR_fchownat 291 +#define __NR_futimesat 292 +#define __NR_fstatat64 293 +#define __NR_unlinkat 294 +#define __NR_renameat 295 +#define __NR_linkat 296 +#define __NR_symlinkat 297 +#define __NR_readlinkat 298 +#define __NR_fchmodat 299 +#define __NR_faccessat 300 +#endif +#ifndef __NR_pselect6 +#define __NR_pselect6 301 +#define __NR_ppoll 302 +#endif +#ifndef __NR_unshare +#define __NR_unshare 303 +#endif +%endif +%ifarch s390x +#ifndef __NR_timer_create +#define __NR_timer_create 254 +#define __NR_timer_settime (__NR_timer_create+1) +#define __NR_timer_gettime (__NR_timer_create+2) +#define __NR_timer_getoverrun (__NR_timer_create+3) +#define __NR_timer_delete (__NR_timer_create+4) +#define __NR_clock_settime (__NR_timer_create+5) +#define __NR_clock_gettime (__NR_timer_create+6) +#define __NR_clock_getres (__NR_timer_create+7) +#define __NR_clock_nanosleep (__NR_timer_create+8) +#endif +#ifndef __NR_mq_open +#define __NR_mq_open 271 +#define __NR_mq_unlink 272 +#define __NR_mq_timedsend 273 +#define __NR_mq_timedreceive 274 +#define __NR_mq_notify 275 +#define __NR_mq_getsetattr 276 +#endif +#ifndef __NR_waitid +#define __NR_waitid 281 +#endif +#ifndef __NR_inotify_init +#define __NR_inotify_init 284 +#define __NR_inotify_add_watch 285 +#define __NR_inotify_rm_watch 286 +#endif +#ifndef __NR_openat +#define __NR_openat 288 +#define __NR_mkdirat 289 +#define __NR_mknodat 290 +#define __NR_fchownat 291 +#define __NR_futimesat 292 +#define __NR_newfstatat 293 +#define __NR_unlinkat 294 +#define __NR_renameat 295 +#define __NR_linkat 296 +#define __NR_symlinkat 297 +#define __NR_readlinkat 298 +#define __NR_fchmodat 299 +#define __NR_faccessat 300 +#endif +#ifndef __NR_pselect6 +#define __NR_pselect6 301 +#define __NR_ppoll 302 +#endif +#ifndef __NR_unshare +#define __NR_unshare 303 +#endif +%endif +%ifarch sparc sparcv9 sparc64 +#ifndef __NR_mq_open +#define __NR_mq_open 273 +#define __NR_mq_unlink 274 +#define __NR_mq_timedsend 275 +#define __NR_mq_timedreceive 276 +#define __NR_mq_notify 277 +#define __NR_mq_getsetattr 278 +#endif +#ifndef __NR_waitid +#define __NR_waitid 279 +#endif +#ifndef __NR_stat64 +#define __NR_fstat64 63 +#define __NR_lstat64 132 +#define __NR_stat64 139 +#endif +#ifndef __NR_inotify_init +#define __NR_inotify_init 151 +#define __NR_inotify_add_watch 152 +#define __NR_inotify_rm_watch 156 +#endif +#ifndef __NR_openat +#define __NR_openat 284 +#define __NR_mkdirat 285 +#define __NR_mknodat 286 +#define __NR_fchownat 287 +#define __NR_futimesat 288 +#define __NR_newfstatat 289 +#define __NR_unlinkat 290 +#define __NR_renameat 291 +#define __NR_linkat 292 +#define __NR_symlinkat 293 +#define __NR_readlinkat 294 +#define __NR_fchmodat 295 +#define __NR_faccessat 296 +#endif +#ifndef __NR_pselect6 +#define __NR_pselect6 297 +#define __NR_ppoll 298 +#endif +#ifndef __NR_unshare +#define __NR_unshare 299 +#endif +%endif +%ifarch x86_64 +#ifndef __NR_mq_open +#define __NR_mq_open 240 +#define __NR_mq_unlink 241 +#define __NR_mq_timedsend 242 +#define __NR_mq_timedreceive 243 +#define __NR_mq_notify 244 +#define __NR_mq_getsetattr 245 +#endif +#ifndef __NR_waitid +#define __NR_waitid 247 +#endif +#ifndef __NR_inotify_init +#define __NR_inotify_init 253 +#define __NR_inotify_add_watch 254 +#define __NR_inotify_rm_watch 255 +#endif +#ifndef __NR_openat +#define __NR_openat 257 +#define __NR_mkdirat 258 +#define __NR_mknodat 259 +#define __NR_fchownat 260 +#define __NR_futimesat 261 +#define __NR_newfstatat 262 +#define __NR_unlinkat 263 +#define __NR_renameat 264 +#define __NR_linkat 265 +#define __NR_symlinkat 266 +#define __NR_readlinkat 267 +#define __NR_fchmodat 268 +#define __NR_faccessat 269 +#endif +#ifndef __NR_pselect6 +#define __NR_pselect6 270 +#define __NR_ppoll 271 +#endif +#ifndef __NR_unshare +#define __NR_unshare 272 +#endif +#ifndef __NR_set_robust_list +#define __NR_set_robust_list 273 +#define __NR_get_robust_list 274 +#endif +#ifndef __NR_splice +#define __NR_splice 275 +#endif +#ifndef __NR_tee +#define __NR_tee 276 +#endif +#ifndef __NR_sync_file_range +#define __NR_sync_file_range 277 +#endif +#ifndef __NR_vmsplice +#define __NR_vmsplice 278 +#endif +%endif +#endif +EOF +cat > override_headers/asm/errno.h <<EOF +#ifndef _HACK_ASM_ERRNO_H +#include_next <asm/errno.h> +%ifarch alpha +#ifndef ENOKEY +#define ENOKEY 132 +#define EKEYEXPIRED 133 +#define EKEYREVOKED 134 +#define EKEYREJECTED 135 +#endif +#ifndef EOWNERDEAD +#define EOWNERDEAD 136 +#define ENOTRECOVERABLE 137 +#endif +%endif +%ifarch %{ix86} ia64 ppc ppc64 s390 s390x x86_64 +#ifndef ENOKEY +#define ENOKEY 126 +#define EKEYEXPIRED 127 +#define EKEYREVOKED 128 +#define EKEYREJECTED 129 +#endif +#ifndef EOWNERDEAD +#define EOWNERDEAD 130 +#define ENOTRECOVERABLE 131 +#endif +%endif +%ifarch sparc sparcv9 sparc64 +#ifndef ENOKEY +#define ENOKEY 128 +#define EKEYEXPIRED 129 +#define EKEYREVOKED 130 +#define EKEYREJECTED 131 +#endif +#ifndef EOWNERDEAD +#define EOWNERDEAD 132 +#define ENOTRECOVERABLE 133 +#endif +%endif +#endif +EOF + +# A lot of programs still misuse memcpy when they have to use +# memmove. The memcpy implementation below is not tolerant at +# all. +rm -f sysdeps/alpha/alphaev6/memcpy.S + +find . -type f -size 0 -o -name "*.orig" -exec rm -f {} \; +cat > find_provides.sh <<EOF +#!/bin/sh +/usr/lib/rpm/find-provides | grep -v GLIBC_PRIVATE +exit 0 +EOF +chmod +x find_provides.sh +touch `find . -name configure` +touch locale/programs/*-kw.h + +%build +GCC=gcc +GXX=g++ +%ifarch %{ix86} +BuildFlags="-march=%{_target_cpu} -mtune=generic" +%endif +%ifarch i686 +BuildFlags="-march=i686 -mtune=generic" +%endif +%ifarch i386 +BuildFlags="$BuildFlags -mno-tls-direct-seg-refs" +%endif +%ifarch x86_64 +BuildFlags="-mtune=generic" +%endif +%ifarch alphaev6 +BuildFlags="-mcpu=ev6" +%endif +%ifarch sparc +BuildFlags="-fcall-used-g6" +GCC="gcc -m32" +GXX="g++ -m32" +%endif +%ifarch sparcv9 +BuildFlags="-mcpu=ultrasparc -fcall-used-g6" +GCC="gcc -m32" +GXX="g++ -m32" +%endif +%ifarch sparc64 +BuildFlags="-mcpu=ultrasparc -mvis -fcall-used-g6" +GCC="gcc -m64" +GXX="g++ -m64" +%endif +%ifarch ppc64 +BuildFlags="-mno-minimal-toc" +GCC="gcc -m64" +GXX="g++ -m64" +%endif + +BuildFlags="$BuildFlags -DNDEBUG=1" +EnableKernel="--enable-kernel=%{enablekernel}" +echo "$GCC" > Gcc +AddOns=`echo */configure | sed -e 's!/configure!!g;s!\(linuxthreads\|nptl\|rtkaio\|powerpc-cpu\)\( \|$\)!!g;s! \+$!!;s! !,!g;s!^!,!;/^,\*$/d'` +%ifarch %{rtkaioarches} +AddOns=,rtkaio$AddOns +%endif + +build_nptl() +{ +builddir=build-%{nptl_target_cpu}-$1 +shift +rm -rf $builddir +mkdir $builddir ; cd $builddir +build_CFLAGS="$BuildFlags -g -O3 $*" +CC="$GCC" CXX="$GXX" CFLAGS="$build_CFLAGS" ../configure --prefix=%{_prefix} \ + --enable-add-ons=nptl$AddOns --without-cvs $EnableKernel \ + --with-headers=`cd ..; pwd`/override_headers:%{_prefix}/include --enable-bind-now \ + --with-tls --with-__thread --build %{nptl_target_cpu}-redhat-linux \ + --host %{nptl_target_cpu}-redhat-linux \ + --disable-profile +make %{?_smp_mflags} -r CFLAGS="$build_CFLAGS" PARALLELMFLAGS=-s + +cd .. +} + +build_nptl linuxnptl + +%if %{buildxen} +build_nptl linuxnptl-nosegneg -mno-tls-direct-seg-refs +%endif + +%if %{buildpower6} +( +platform=`LD_SHOW_AUXV=1 /bin/true | sed -n 's/^AT_PLATFORM:[[:blank:]]*//p'` +if [ "$platform" != power6 ]; then + mkdir -p power6emul/{lib,lib64} + $GCC -shared -O2 -fpic -o power6emul/%{_lib}/power6emul.so fedora/power6emul.c -Wl,-z,initfirst +%ifarch ppc + echo '' | gcc -shared -nostdlib -O2 -fpic -m64 -o power6emul/lib64/power6emul.so -xc - +%endif +%ifarch ppc64 + echo '' | gcc -shared -nostdlib -O2 -fpic -m32 -o power6emul/lib/power6emul.so -xc - +%endif + export LD_PRELOAD=`pwd`/power6emul/\$LIB/power6emul.so +fi +AddOns=",powerpc-cpu$AddOns --with-cpu=power6" +GCC="$GCC -mcpu=power6" +GXX="$GXX -mcpu=power6" +build_nptl linuxnptl-power6 +) +%endif + +cd build-%{nptl_target_cpu}-linuxnptl +$GCC -static -L. -Os ../fedora/glibc_post_upgrade.c -o glibc_post_upgrade.%{_target_cpu} \ + -DNO_SIZE_OPTIMIZATION \ +%ifarch i386 + -DARCH_386 \ +%endif + '-DLIBTLS="/%{_lib}/tls/"' \ + '-DGCONV_MODULES_DIR="%{_prefix}/%{_lib}/gconv"' \ + '-DLD_SO_CONF="/etc/ld.so.conf"' \ + '-DICONVCONFIG="%{_sbindir}/iconvconfig.%{_target_cpu}"' +cd .. + +%install +GCC=`cat Gcc` + +rm -rf $RPM_BUILD_ROOT +mkdir -p $RPM_BUILD_ROOT +make -j1 install_root=$RPM_BUILD_ROOT install -C build-%{nptl_target_cpu}-linuxnptl PARALLELMFLAGS=-s +%ifnarch %{auxarches} +cd build-%{nptl_target_cpu}-linuxnptl && \ + make %{?_smp_mflags} install_root=$RPM_BUILD_ROOT install-locales -C ../localedata objdir=`pwd` && \ + cd .. +%endif + +librtso=`basename $RPM_BUILD_ROOT/%{_lib}/librt.so.*` + +%ifarch %{rtkaioarches} +rm -f $RPM_BUILD_ROOT{,%{_prefix}}/%{_lib}/librtkaio.so* +rm -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/librt.so.* +mkdir -p $RPM_BUILD_ROOT/%{_lib}/rtkaio +mv $RPM_BUILD_ROOT/%{_lib}/librtkaio-*.so $RPM_BUILD_ROOT/%{_lib}/rtkaio/ +rm -f $RPM_BUILD_ROOT/%{_lib}/$librtso +ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/librt-*.so` $RPM_BUILD_ROOT/%{_lib}/$librtso +ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/rtkaio/librtkaio-*.so` $RPM_BUILD_ROOT/%{_lib}/rtkaio/$librtso +%endif + +%if %{buildxen} +%define nosegneg_subdir_base i686 +%define nosegneg_subdir i686/nosegneg +cd build-%{nptl_target_cpu}-linuxnptl-nosegneg +SubDir=%{nosegneg_subdir} +mkdir -p $RPM_BUILD_ROOT/%{_lib}/$SubDir/ +cp -a libc.so $RPM_BUILD_ROOT/%{_lib}/$SubDir/`basename $RPM_BUILD_ROOT/%{_lib}/libc-*.so` +ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/libc-*.so` $RPM_BUILD_ROOT/%{_lib}/$SubDir/`basename $RPM_BUILD_ROOT/%{_lib}/libc.so.*` +cp -a math/libm.so $RPM_BUILD_ROOT/%{_lib}/$SubDir/`basename $RPM_BUILD_ROOT/%{_lib}/libm-*.so` +ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/libm-*.so` $RPM_BUILD_ROOT/%{_lib}/$SubDir/`basename $RPM_BUILD_ROOT/%{_lib}/libm.so.*` +cp -a nptl/libpthread.so $RPM_BUILD_ROOT/%{_lib}/$SubDir/libpthread-%{version}.so +pushd $RPM_BUILD_ROOT/%{_lib}/$SubDir +ln -sf libpthread-*.so `basename $RPM_BUILD_ROOT/%{_lib}/libpthread.so.*` +popd +cp -a rt/librt.so $RPM_BUILD_ROOT/%{_lib}/$SubDir/`basename $RPM_BUILD_ROOT/%{_lib}/librt-*.so` +ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/librt-*.so` $RPM_BUILD_ROOT/%{_lib}/$SubDir/$librtso +cp -a nptl_db/libthread_db.so $RPM_BUILD_ROOT/%{_lib}/$SubDir/`basename $RPM_BUILD_ROOT/%{_lib}/libthread_db-*.so` +ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/libthread_db-*.so` $RPM_BUILD_ROOT/%{_lib}/$SubDir/`basename $RPM_BUILD_ROOT/%{_lib}/libthread_db.so.*` +%ifarch %{rtkaioarches} +mkdir -p $RPM_BUILD_ROOT/%{_lib}/rtkaio/$SubDir +cp -a rtkaio/librtkaio.so $RPM_BUILD_ROOT/%{_lib}/rtkaio/$SubDir/`basename $RPM_BUILD_ROOT/%{_lib}/librt-*.so | sed s/librt-/librtkaio-/` +ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/rtkaio/$SubDir/librtkaio-*.so` $RPM_BUILD_ROOT/%{_lib}/rtkaio/$SubDir/$librtso +%endif +cd .. +%endif + +%if %{buildpower6} +cd build-%{nptl_target_cpu}-linuxnptl-power6 +mkdir -p $RPM_BUILD_ROOT/%{_lib}/power6{,x} +cp -a libc.so $RPM_BUILD_ROOT/%{_lib}/power6/`basename $RPM_BUILD_ROOT/%{_lib}/libc-*.so` +ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/libc-*.so` $RPM_BUILD_ROOT/%{_lib}/power6/`basename $RPM_BUILD_ROOT/%{_lib}/libc.so.*` +cp -a math/libm.so $RPM_BUILD_ROOT/%{_lib}/power6/`basename $RPM_BUILD_ROOT/%{_lib}/libm-*.so` +ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/libm-*.so` $RPM_BUILD_ROOT/%{_lib}/power6/`basename $RPM_BUILD_ROOT/%{_lib}/libm.so.*` +cp -a nptl/libpthread.so $RPM_BUILD_ROOT/%{_lib}/power6/libpthread-%{version}.so +pushd $RPM_BUILD_ROOT/%{_lib}/power6 +ln -sf libpthread-*.so `basename $RPM_BUILD_ROOT/%{_lib}/libpthread.so.*` +popd +cp -a rt/librt.so $RPM_BUILD_ROOT/%{_lib}/power6/`basename $RPM_BUILD_ROOT/%{_lib}/librt-*.so` +ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/librt-*.so` $RPM_BUILD_ROOT/%{_lib}/power6/$librtso +cp -a nptl_db/libthread_db.so $RPM_BUILD_ROOT/%{_lib}/power6/`basename $RPM_BUILD_ROOT/%{_lib}/libthread_db-*.so` +ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/libthread_db-*.so` $RPM_BUILD_ROOT/%{_lib}/power6/`basename $RPM_BUILD_ROOT/%{_lib}/libthread_db.so.*` +pushd $RPM_BUILD_ROOT/%{_lib}/power6x +ln -sf ../power6/*.so . +cp -a ../power6/*.so.* . +popd +%ifarch %{rtkaioarches} +mkdir -p $RPM_BUILD_ROOT/%{_lib}/rtkaio/power6{,x} +cp -a rtkaio/librtkaio.so $RPM_BUILD_ROOT/%{_lib}/rtkaio/power6/`basename $RPM_BUILD_ROOT/%{_lib}/librt-*.so | sed s/librt-/librtkaio-/` +ln -sf `basename $RPM_BUILD_ROOT/%{_lib}/rtkaio/power6/librtkaio-*.so` $RPM_BUILD_ROOT/%{_lib}/rtkaio/power6/$librtso +pushd $RPM_BUILD_ROOT/%{_lib}/rtkaio/power6x +ln -sf ../power6/*.so . +cp -a ../power6/*.so.* . +popd +%endif +cd .. +%endif + +# compatibility hack: this locale has vanished from glibc, but some other +# programs are still using it. Normally we would handle it in the %pre +# section but with glibc that is simply not an option +mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/locale/ru_RU/LC_MESSAGES + +# Remove the files we don't want to distribute +rm -f $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libNoVersion* +rm -f $RPM_BUILD_ROOT/%{_lib}/libNoVersion* + +# NPTL <bits/stdio-lock.h> is not usable outside of glibc, so include +# the generic one (#162634) +cp -a bits/stdio-lock.h $RPM_BUILD_ROOT%{_prefix}/include/bits/stdio-lock.h +# And <bits/libc-lock.h> needs sanitizing as well. +cp -a fedora/libc-lock.h $RPM_BUILD_ROOT%{_prefix}/include/bits/libc-lock.h + +if [ -d $RPM_BUILD_ROOT%{_prefix}/info -a "%{_infodir}" != "%{_prefix}/info" ]; then + mkdir -p $RPM_BUILD_ROOT%{_infodir} + mv -f $RPM_BUILD_ROOT%{_prefix}/info/* $RPM_BUILD_ROOT%{_infodir} + rm -rf $RPM_BUILD_ROOT%{_prefix}/info +fi + +gzip -9nvf $RPM_BUILD_ROOT%{_infodir}/libc* + +ln -sf libbsd-compat.a $RPM_BUILD_ROOT%{_prefix}/%{_lib}/libbsd.a + +install -p -m 644 fedora/nsswitch.conf $RPM_BUILD_ROOT/etc/nsswitch.conf + +mkdir -p $RPM_BUILD_ROOT/etc/default +install -p -m 644 nis/nss $RPM_BUILD_ROOT/etc/default/nss + +# Take care of setuids +# -- new security review sez that this shouldn't be needed anymore +#chmod 755 $RPM_BUILD_ROOT%{_prefix}/libexec/pt_chown + +# This is for ncsd - in glibc 2.2 +install -m 644 nscd/nscd.conf $RPM_BUILD_ROOT/etc +mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d +install -m 755 nscd/nscd.init $RPM_BUILD_ROOT/etc/rc.d/init.d/nscd + +# Don't include ld.so.cache +rm -f $RPM_BUILD_ROOT/etc/ld.so.cache + +# Include ld.so.conf +echo 'include ld.so.conf.d/*.conf' > $RPM_BUILD_ROOT/etc/ld.so.conf +touch $RPM_BUILD_ROOT/etc/ld.so.cache +chmod 644 $RPM_BUILD_ROOT/etc/ld.so.conf +mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d +mkdir -p $RPM_BUILD_ROOT/etc/sysconfig +touch $RPM_BUILD_ROOT/etc/sysconfig/nscd + +# Include %{_prefix}/%{_lib}/gconv/gconv-modules.cache +> $RPM_BUILD_ROOT%{_prefix}/%{_lib}/gconv/gconv-modules.cache +chmod 644 $RPM_BUILD_ROOT%{_prefix}/%{_lib}/gconv/gconv-modules.cache + +# Install the upgrade program +install -m 700 build-%{nptl_target_cpu}-linuxnptl/glibc_post_upgrade.%{_target_cpu} \ + $RPM_BUILD_ROOT/usr/sbin/glibc_post_upgrade.%{_target_cpu} + +strip -g $RPM_BUILD_ROOT%{_prefix}/%{_lib}/*.o + +mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_prefix}/%{_lib} +cp -a $RPM_BUILD_ROOT%{_prefix}/%{_lib}/*.a \ + $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_prefix}/%{_lib}/ +rm -f $RPM_BUILD_ROOT%{_prefix}/lib/debug%{_prefix}/%{_lib}/*_p.a +# Now strip debugging info from static libraries +pushd $RPM_BUILD_ROOT%{_prefix}/%{_lib}/ +for i in *.a; do + if [ -f $i ]; then + case "$i" in + *_p.a) ;; + *) strip -g -R .comment $i ;; + esac + fi +done +popd + +# rquota.x and rquota.h are now provided by quota +rm -f $RPM_BUILD_ROOT%{_prefix}/include/rpcsvc/rquota.[hx] + +# Hardlink identical locale files together +%ifnarch %{auxarches} +gcc -O2 -o build-%{nptl_target_cpu}-linuxnptl/hardlink fedora/hardlink.c +build-%{nptl_target_cpu}-linuxnptl/hardlink -vc $RPM_BUILD_ROOT%{_prefix}/lib/locale +%endif + +rm -f ${RPM_BUILD_ROOT}/%{_lib}/libnss1-* +rm -f ${RPM_BUILD_ROOT}/%{_lib}/libnss-*.so.1 + +# Ugly hack for buggy rpm +ln -f ${RPM_BUILD_ROOT}%{_sbindir}/iconvconfig{,.%{_target_cpu}} + +rm -f $RPM_BUILD_ROOT/etc/gai.conf + +# BUILD THE FILE LIST +find $RPM_BUILD_ROOT -type f -or -type l | + sed -e 's|.*/etc|%config &|' \ + -e 's|.*/gconv/gconv-modules$|%verify(not md5 size mtime) %config(noreplace) &|' \ + -e 's|.*/gconv/gconv-modules.cache|%verify(not md5 size mtime) &|' \ + -e '/lib\/debug/d' > rpm.filelist.in +for n in %{_prefix}/share %{_prefix}/include %{_prefix}/lib/locale; do + find ${RPM_BUILD_ROOT}${n} -type d | \ + grep -v '%{_prefix}/share$' | \ + grep -v '%{_infodir}' | \ + sed "s/^/%dir /" >> rpm.filelist.in +done + +# primary filelist +SHARE_LANG='s|.*/share/locale/\([^/_]\+\).*/LC_MESSAGES/.*\.mo|%lang(\1) &|' +LIB_LANG='s|.*/lib/locale/\([^/_]\+\)|%lang(\1) &|' +# rpm does not handle %lang() tagged files hardlinked together accross +# languages very well, temporarily disable +# LIB_LANG='' +sed -e "s|$RPM_BUILD_ROOT||" -e "$LIB_LANG" -e "$SHARE_LANG" < rpm.filelist.in | + grep -v '/etc/\(localtime\|nsswitch.conf\|ld.so.conf\|ld.so.cache\|default\)' | \ + grep -v '/%{_lib}/lib\(pcprofile\|memusage\).so' | \ + grep -v 'bin/\(memusage\|mtrace\|xtrace\|pcprofiledump\)' | \ + sort > rpm.filelist + +mkdir -p $RPM_BUILD_ROOT%{_prefix}/%{_lib} +mv -f $RPM_BUILD_ROOT/%{_lib}/lib{pcprofile,memusage}.so $RPM_BUILD_ROOT%{_prefix}/%{_lib} +for i in $RPM_BUILD_ROOT%{_prefix}/bin/{xtrace,memusage}; do + cp -a $i $i.tmp + sed -e 's~=/%{_lib}/libpcprofile.so~=%{_prefix}/%{_lib}/libpcprofile.so~' \ + -e 's~=/%{_lib}/libmemusage.so~=%{_prefix}/%{_lib}/libmemusage.so~' \ + -e 's~='\''/\\\$LIB/libpcprofile.so~='\''%{_prefix}/\\$LIB/libpcprofile.so~' \ + -e 's~='\''/\\\$LIB/libmemusage.so~='\''%{_prefix}/\\$LIB/libmemusage.so~' \ + $i.tmp > $i + chmod 755 $i; rm -f $i.tmp +done + +grep '%{_infodir}' < rpm.filelist | grep -v '%{_infodir}/dir' > devel.filelist +grep '%{_prefix}/include/gnu/stubs-[32164]\+\.h' < rpm.filelist >> devel.filelist || : + +grep '%{_prefix}/include' < rpm.filelist | + egrep -v '%{_prefix}/include/(linuxthreads|gnu/stubs-[32164]+\.h)' \ + > headers.filelist + +mv rpm.filelist rpm.filelist.full +grep -v '%{_prefix}/%{_lib}/lib.*_p.a' rpm.filelist.full | + egrep -v "(%{_prefix}/include)|(%{_infodir})" > rpm.filelist + +grep '%{_prefix}/%{_lib}/lib.*\.a' < rpm.filelist >> devel.filelist +grep '%{_prefix}/%{_lib}/.*\.o' < rpm.filelist >> devel.filelist +grep '%{_prefix}/%{_lib}/lib.*\.so' < rpm.filelist >> devel.filelist + +mv rpm.filelist rpm.filelist.full +grep -v '%{_prefix}/%{_lib}/lib.*\.a' < rpm.filelist.full | + grep -v '%{_prefix}/%{_lib}/.*\.o' | + grep -v '%{_prefix}/%{_lib}/lib.*\.so'| + grep -v '%{_prefix}/%{_lib}/linuxthreads' | + grep -v 'nscd' > rpm.filelist + +grep '%{_prefix}/bin' < rpm.filelist >> common.filelist +grep '%{_prefix}/lib/locale' < rpm.filelist >> common.filelist +grep '%{_prefix}/libexec/pt_chown' < rpm.filelist >> common.filelist +grep '%{_prefix}/sbin/[^gi]' < rpm.filelist >> common.filelist +grep '%{_prefix}/share' < rpm.filelist \ + | grep -v '%{_prefix}/share/zoneinfo' >> common.filelist + +mv rpm.filelist rpm.filelist.full +grep -v '%{_prefix}/bin' < rpm.filelist.full | + grep -v '%{_prefix}/lib/locale' | + grep -v '%{_prefix}/libexec/pt_chown' | + grep -v '%{_prefix}/sbin/[^gi]' | + grep -v '%{_prefix}/share' > rpm.filelist + +> nosegneg.filelist +%if %{xenpackage} +grep '/%{_lib}/%{nosegneg_subdir}' < rpm.filelist >> nosegneg.filelist +mv rpm.filelist rpm.filelist.full +grep -v '/%{_lib}/%{nosegneg_subdir}' < rpm.filelist.full > rpm.filelist +%endif + +echo '%{_prefix}/sbin/build-locale-archive' >> common.filelist +echo '%{_prefix}/sbin/tzdata-update' >> common.filelist +echo '%{_prefix}/sbin/nscd' > nscd.filelist + +cat > utils.filelist <<EOF +%{_prefix}/%{_lib}/libmemusage.so +%{_prefix}/%{_lib}/libpcprofile.so +%{_prefix}/bin/memusage +%{_prefix}/bin/memusagestat +%{_prefix}/bin/mtrace +%{_prefix}/bin/pcprofiledump +%{_prefix}/bin/xtrace +EOF + +# /etc/localtime +rm -f $RPM_BUILD_ROOT/etc/localtime +cp -f $RPM_BUILD_ROOT%{_prefix}/share/zoneinfo/US/Eastern $RPM_BUILD_ROOT/etc/localtime +#ln -sf ..%{_prefix}/share/zoneinfo/US/Eastern $RPM_BUILD_ROOT/etc/localtime + +rm -rf $RPM_BUILD_ROOT%{_prefix}/share/zoneinfo + +# Make sure %config files have the same timestamp +touch -r fedora/glibc.spec.in $RPM_BUILD_ROOT/etc/ld.so.conf +touch -r timezone/northamerica $RPM_BUILD_ROOT/etc/localtime +touch -r sunrpc/etc.rpc $RPM_BUILD_ROOT/etc/rpc + +cd fedora +$GCC -Os -static -o build-locale-archive build-locale-archive.c \ + ../build-%{nptl_target_cpu}-linuxnptl/locale/locarchive.o \ + ../build-%{nptl_target_cpu}-linuxnptl/locale/md5.o \ + -DDATADIR=\"%{_datadir}\" -DPREFIX=\"%{_prefix}\" \ + -L../build-%{nptl_target_cpu}-linuxnptl +install -m 700 build-locale-archive $RPM_BUILD_ROOT/usr/sbin/build-locale-archive +$GCC -Os -static -o tzdata-update tzdata-update.c \ + -L../build-%{nptl_target_cpu}-linuxnptl +install -m 700 tzdata-update $RPM_BUILD_ROOT/usr/sbin/tzdata-update +cd .. + +# the last bit: more documentation +rm -rf documentation +mkdir documentation +cp crypt/README.ufc-crypt documentation/README.ufc-crypt +cp timezone/README documentation/README.timezone +cp ChangeLog{,.15,.16} documentation +bzip2 -9 documentation/ChangeLog* +cp posix/gai.conf documentation/ + +%ifarch s390x +# Compatibility symlink +mkdir -p $RPM_BUILD_ROOT/lib +ln -sf /%{_lib}/ld64.so.1 $RPM_BUILD_ROOT/lib/ld64.so.1 +%endif +%ifarch ia64 +%if "%{_lib}" == "lib64" +# Compatibility symlink +mkdir -p $RPM_BUILD_ROOT/lib +ln -sf /%{_lib}/ld-linux-ia64.so.2 $RPM_BUILD_ROOT/lib/ld-linux-ia64.so.2 +%endif +%endif + +# Increase timeouts +export TIMEOUTFACTOR=16 +parent=$$ +echo ====================TESTING========================= +cd build-%{nptl_target_cpu}-linuxnptl +( make %{?_smp_mflags} -k check PARALLELMFLAGS=-s 2>&1 + sleep 10s + teepid="`ps -eo ppid,pid,command | awk '($1 == '${parent}' && $3 ~ /^tee/) { print $2 }'`" + [ -n "$teepid" ] && kill $teepid +) | tee check.log || : +cd .. +%if %{buildxen} +echo ====================TESTING -mno-tls-direct-seg-refs============= +cd build-%{nptl_target_cpu}-linuxnptl-nosegneg +( make -j$numprocs -k check PARALLELMFLAGS=-s 2>&1 + sleep 10s + teepid="`ps -eo ppid,pid,command | awk '($1 == '${parent}' && $3 ~ /^tee/) { print $2 }'`" + [ -n "$teepid" ] && kill $teepid +) | tee check.log || : +cd .. +%endif +%if %{buildpower6} +echo ====================TESTING -mcpu=power6============= +cd build-%{nptl_target_cpu}-linuxnptl-power6 +( if [ -d ../power6emul ]; then + export LD_PRELOAD=`cd ../power6emul; pwd`/\$LIB/power6emul.so + fi + make -j$numprocs -k check PARALLELMFLAGS=-s 2>&1 + sleep 10s + teepid="`ps -eo ppid,pid,command | awk '($1 == '${parent}' && $3 ~ /^tee/) { print $2 }'`" + [ -n "$teepid" ] && kill $teepid +) | tee check.log || : +cd .. +%endif +echo ====================TESTING DETAILS================= +for i in `sed -n 's|^.*\*\*\* \[\([^]]*\.out\)\].*$|\1|p' build-*-linux*/check.log`; do + echo =====$i===== + cat $i || : + echo ============ +done +echo ====================TESTING END===================== +PLTCMD='/^Relocation section .*\(\.rela\?\.plt\|\.rela\.IA_64\.pltoff\)/,/^$/p' +echo ====================PLT RELOCS LD.SO================ +readelf -Wr $RPM_BUILD_ROOT/%{_lib}/ld-*.so | sed -n -e "$PLTCMD" +echo ====================PLT RELOCS LIBC.SO============== +readelf -Wr $RPM_BUILD_ROOT/%{_lib}/libc-*.so | sed -n -e "$PLTCMD" +echo ====================PLT RELOCS END================== + +%if "%{_enable_debug_packages}" == "1" + +case "$-" in *x*) save_trace=yes;; esac +set +x +echo Building debuginfo subpackage... + +blf=debugfiles.list +sf=debugsources.list +cblf=debugcommonfiles.list +csf=debugcommonsources.list + +echo -n > $sf +echo -n > $csf + +strip $RPM_BUILD_ROOT/{sbin/ldconfig,usr/sbin/glibc_post_upgrade.%{_target_cpu},usr/sbin/build-locale-archive} + +# Strip ELF binaries +for f in `cat rpm.filelist nosegneg.filelist \ + | grep -v '%%\(dir\|lang\|config\|verify\)'`; do + bf=$RPM_BUILD_ROOT$f + if [ -f $bf -a -x $bf -a ! -h $bf ]; then + if `file $bf 2>/dev/null | grep 'ELF.*, not stripped' | grep -vq 'statically linked'`; then + bd=`dirname $f` + outd=$RPM_BUILD_ROOT/usr/lib/debug$bd + mkdir -p $outd + echo extracting debug info from $f + /usr/lib/rpm/debugedit -b $RPM_BUILD_DIR -d /usr/src/debug -l $sf $bf + bn=`basename $f` + case $f in + /%{_lib}/*) eu-strip -g -f $outd/$bn.debug $bf || :;; + *) eu-strip -f $outd/$bn.debug $bf || :;; + esac + if [ -f $outd/$bn.debug ]; then echo /usr/lib/debug$bd/$bn.debug >> $blf; fi + fi + fi +done + +for f in `cat common.filelist utils.filelist nscd.filelist \ + | grep -v '%%\(dir\|lang\|config\|verify\)'`; do + bf=$RPM_BUILD_ROOT$f + if [ -f $bf -a -x $bf -a ! -h $bf ]; then + if `file $bf 2>/dev/null | grep 'ELF.*, not stripped' | grep -vq 'statically linked'`; then + bd=`dirname $f` + outd=$RPM_BUILD_ROOT/usr/lib/debug$bd + mkdir -p $outd + echo extracting debug info from $f + /usr/lib/rpm/debugedit -b $RPM_BUILD_DIR -d /usr/src/debug -l $csf $bf + bn=`basename $f` + eu-strip -f $outd/$bn.debug $bf || : + if [ -f $outd/$bn.debug ]; then echo /usr/lib/debug$bd/$bn.debug >> $cblf; fi + fi + fi +done + +for f in `find $RPM_BUILD_ROOT/%{_lib} -type l`; do + l=`ls -l $f` + l=${l#* -> } + t=/usr/lib/debug`dirname ${f#$RPM_BUILD_ROOT}` + if grep -q "^$t/$l.debug\$" $blf; then + ln -sf $l.debug $RPM_BUILD_ROOT$t/`basename $f`.debug + echo $t/`basename $f`.debug >> $blf + elif grep -q "^$t.debug/$l\$" $cblf; then + ln -sf $l.debug $RPM_BUILD_ROOT$t/`basename $f`.debug + echo $t/`basename $f`.debug >> $cblf + fi +done + +echo Sorting source file lists. Might take a while... +xargs -0 -n 1 echo < $sf | LC_ALL=C grep -v '/<internal>$\|\.gperf$' | LC_ALL=C sort -u > $sf.sorted +xargs -0 -n 1 echo < $csf | LC_ALL=C grep -v '/<internal>$\|\.gperf$' | LC_ALL=C sort -u > $csf.sorted +mkdir -p $RPM_BUILD_ROOT/usr/src/debug +cat $sf.sorted $csf.sorted \ + | (cd $RPM_BUILD_DIR; LC_ALL=C sort -u | cpio -pdm ${RPM_BUILD_ROOT}/usr/src/debug) +# stupid cpio creates new directories in mode 0700, fixup +find $RPM_BUILD_ROOT/usr/src/debug -type d -print | xargs chmod a+rx + +%ifarch %{debuginfocommonarches} +%ifarch %{auxarches} +%ifarch %{ix86} +%define basearch i386 +%endif +%ifarch alpha alphaev6 +%define basearch alpha +%endif +%ifarch sparc sparcv9 +%define basearch sparc +%endif +cat $blf > debuginfo.filelist +find $RPM_BUILD_ROOT/usr/src/debug/%{glibcsrcdir} -type d \ + | sed "s#^$RPM_BUILD_ROOT#%%dir #" >> debuginfo.filelist +grep '/generic/\|/linux/\|/%{basearch}/\|/nptl\(_db\)\?/\|^%{glibcsrcdir}/build' \ + $sf.sorted | sed 's|^|/usr/src/debug/|' >> debuginfo.filelist +touch debuginfocommon.filelist +%else +( grep '^%{glibcsrcdir}/build-\|dl-osinfo\.h' $csf.sorted || : ) > $csf.sorted.build +cat $blf > debuginfo.filelist +cat $cblf > debuginfocommon.filelist +grep '^%{glibcsrcdir}/build-\|dl-osinfo\.h' $sf.sorted \ + | sed 's|^|/usr/src/debug/|' >> debuginfo.filelist +find $RPM_BUILD_ROOT/usr/src/debug/%{glibcsrcdir} -type d \ + | sed "s#^$RPM_BUILD_ROOT#%%dir #" >> debuginfocommon.filelist +( cat $csf.sorted; grep -v -f $csf.sorted.build $sf.sorted ) \ + | grep -v 'dl-osinfo\.h' | LC_ALL=C sort -u \ + | sed 's|^|/usr/src/debug/|' >> debuginfocommon.filelist +%endif +%else +cat $blf $cblf | LC_ALL=C sort -u > debuginfo.filelist +echo '/usr/src/debug/%{glibcsrcdir}' >> debuginfo.filelist +%endif + +[ "x$save_trace" = xyes ] && set -x + +%endif + +%ifarch %{auxarches} +case "$-" in *x*) save_trace=yes;; esac +set +x +echo Cutting down the list of unpackaged files +for i in `sed '/%%dir/d;/%%config/d;/%%verify/d;s/%%lang([^)]*) //' \ + common.filelist devel.filelist headers.filelist \ + utils.filelist nscd.filelist`; do + [ -f "$RPM_BUILD_ROOT$i" ] && rm -f "$RPM_BUILD_ROOT$i" || : +done +[ "x$save_trace" = xyes ] && set -x + +%else + +mkdir -p $RPM_BUILD_ROOT/var/{db,run}/nscd +touch $RPM_BUILD_ROOT/var/{db,run}/nscd/{passwd,group,hosts} +touch $RPM_BUILD_ROOT/var/run/nscd/{socket,nscd.pid} +%endif + +touch $RPM_BUILD_ROOT/%{_prefix}/lib/locale/locale-archive + +%post -p /usr/sbin/glibc_post_upgrade.%{_target_cpu} + +%postun -p /sbin/ldconfig + +%post common -p /usr/sbin/build-locale-archive + +%triggerin common -p /usr/sbin/tzdata-update -- tzdata + +%post devel +/sbin/install-info %{_infodir}/libc.info.gz %{_infodir}/dir + +%pre headers +# this used to be a link and it is causing nightmares now +if [ -L %{_prefix}/include/scsi ] ; then + rm -f %{_prefix}/include/scsi +fi + +%preun devel +if [ "$1" = 0 ]; then + /sbin/install-info --delete %{_infodir}/libc.info.gz %{_infodir}/dir +fi + +%post utils -p /sbin/ldconfig + +%postun utils -p /sbin/ldconfig + +%pre -n nscd +/usr/sbin/useradd -M -o -r -d / -s /sbin/nologin \ + -c "NSCD Daemon" -u 28 nscd > /dev/null 2>&1 || : + +%post -n nscd +/sbin/chkconfig --add nscd + +%preun -n nscd +if [ $1 = 0 ] ; then + service nscd stop > /dev/null 2>&1 + /sbin/chkconfig --del nscd +fi + +%postun -n nscd +if [ $1 = 0 ] ; then + /usr/sbin/userdel nscd > /dev/null 2>&1 || : +fi +if [ "$1" -ge "1" ]; then + service nscd condrestart > /dev/null 2>&1 || : +fi + +%if %{xenpackage} +%post xen -p /sbin/ldconfig +%postun xen -p /sbin/ldconfig +%endif + +%clean +rm -rf "$RPM_BUILD_ROOT" +rm -f *.filelist* + +%files -f rpm.filelist +%defattr(-,root,root) +%ifarch %{rtkaioarches} +%dir /%{_lib}/rtkaio +%endif +%if %{buildxen} && !%{xenpackage} +%dir /%{_lib}/%{nosegneg_subdir_base} +%dir /%{_lib}/%{nosegneg_subdir} +%ifarch %{rtkaioarches} +%dir /%{_lib}/rtkaio/%{nosegneg_subdir_base} +%dir /%{_lib}/rtkaio/%{nosegneg_subdir} +%endif +%endif +%if %{buildpower6} +%dir /%{_lib}/power6 +%dir /%{_lib}/power6x +%ifarch %{rtkaioarches} +%dir /%{_lib}/rtkaio/power6 +%dir /%{_lib}/rtkaio/power6x +%endif +%endif +%ifarch s390x +%dir /lib +/lib/ld64.so.1 +%endif +%ifarch ia64 +%if "%{_lib}" == "lib64" +%dir /lib +/lib/ld-linux-ia64.so.2 +%endif +%endif +%verify(not md5 size mtime) %config(noreplace) /etc/localtime +%verify(not md5 size mtime) %config(noreplace) /etc/nsswitch.conf +%verify(not md5 size mtime) %config(noreplace) /etc/ld.so.conf +%dir /etc/ld.so.conf.d +%dir %{_prefix}/libexec/getconf +%dir %{_prefix}/%{_lib}/gconv +%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /etc/ld.so.cache +%doc README NEWS INSTALL FAQ BUGS NOTES PROJECTS CONFORMANCE +%doc COPYING COPYING.LIB README.libm LICENSES +%doc hesiod/README.hesiod + +%if %{xenpackage} +%files -f nosegneg.filelist xen +%defattr(-,root,root) +%dir /%{_lib}/%{nosegneg_subdir_base} +%dir /%{_lib}/%{nosegneg_subdir} +%endif + +%ifnarch %{auxarches} +%files -f common.filelist common +%defattr(-,root,root) +%attr(0644,root,root) %verify(not md5 size mtime mode) %ghost %config(missingok,noreplace) %{_prefix}/lib/locale/locale-archive +%dir %attr(755,root,root) /etc/default +%verify(not md5 size mtime) %config(noreplace) /etc/default/nss +%doc documentation/* + +%files -f devel.filelist devel +%defattr(-,root,root) + +%files -f headers.filelist headers +%defattr(-,root,root) + +%files -f utils.filelist utils +%defattr(-,root,root) + +%files -f nscd.filelist -n nscd +%defattr(-,root,root) +%config(noreplace) /etc/nscd.conf +%config /etc/rc.d/init.d/nscd +%dir %attr(0755,root,root) /var/run/nscd +%dir %attr(0755,root,root) /var/db/nscd +%attr(0644,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/nscd.pid +%attr(0666,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/socket +%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/passwd +%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/group +%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/run/nscd/hosts +%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/passwd +%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/group +%attr(0600,root,root) %verify(not md5 size mtime) %ghost %config(missingok,noreplace) /var/db/nscd/hosts +%ghost %config(missingok,noreplace) /etc/sysconfig/nscd +%endif + +%if "%{_enable_debug_packages}" == "1" +%files debuginfo -f debuginfo.filelist +%defattr(-,root,root) +%ifarch %{debuginfocommonarches} +%ifnarch %{auxarches} +%files debuginfo-common -f debuginfocommon.filelist +%defattr(-,root,root) +%dir %{_prefix}/lib/debug +%dir %{_prefix}/lib/debug/%{_prefix} +%dir %{_prefix}/lib/debug/%{_prefix}/%{_lib} +%{_prefix}/lib/debug/%{_prefix}/%{_lib}/*.a +%endif +%else +%dir %{_prefix}/lib/debug +%dir %{_prefix}/lib/debug/%{_prefix} +%dir %{_prefix}/lib/debug/%{_prefix}/%{_lib} +%{_prefix}/lib/debug/%{_prefix}/%{_lib}/*.a +%endif +%endif + +%changelog +* Wed Jul 4 2007 Jakub Jelinek <jakub@redhat.com> 2.5-18 +- save/restore errno around reading /etc/default/nss (BZ#4702) +- fix LD_HWCAP_MASK handling + +* Fri Jun 22 2007 Jakub Jelinek <jakub@redhat.com> 2.5-17 +- disable workaround for #210748 and #211133, instead backport + ld.so locking fixes from the trunk (#235026) +- Korean charsets additions (BZ#3954, BZ#3955) +- fix handling of 2001::/32 IPv6 addresses in getaddrinfo (BZ#4102) +- add inline optimization for fgetc_unlocked +- fix handling of 172.{1[7-9],2[0-9],3[01]}/16 IPv4 addresses in + getaddrinfo +- make sure NULL checks in routines with nonnull attribute aren't + optimized away +- don't write uninitialized padding bytes to nscd socket +- avoid misaligned reads/writes in gethostbyname_r (#243967, BZ#4381) +- fix dl{,v}sym, dl_iterate_phdr and dlopen if some library is + mapped into ld.so's inter-segment hole on x86_64 (#244545) +- fix LD_AUDIT=a:b program (#180432) + +* Fri Jun 8 2007 Jakub Jelinek <jakub@redhat.com> 2.5-16 +- don't crash on pseudo-zero long double values passed to + *printf on i?86/x86_64/ia64 (BZ#4586) +- fix *printf %La and strtold with some hexadecimal floating point + constants on ppc/ppc64 +- fix nextafterl on ppc/ppc64 + +* Wed May 30 2007 Jakub Jelinek <jakub@redhat.com> 2.5-15 +- robust mutex fixes (BZ#4512) +- *printf fixes (BZ#4514) +- as_IN updates (#218035) +- use MADV_DONTNEED in malloc (#237711) +- fix sem_timedwait on i?86 and x86_64 +- fix dladdr if some shared library is mapped into ld.so intersegment + VM hole (#232224, BZ#4131) +- fdatasync is a cancellation point (BZ#4465) +- add a temporary hack to avoid reruning DSO initializers if dlopen + is called from _dl_fini destructors (#234946) + +* Wed May 2 2007 Jakub Jelinek <jakub@redhat.com> 2.5-14 +- add transliteration for <U2044> (BZ#3213) +- fix *scanf with %f on hexadecimal floats without exponent (BZ#4342) +- fix *printf with very large precisions for %s (#238406, BZ#4438) +- fix inet_ntop size checking for AF_INET (BZ#4439) +- for *printf %e avoid 1.000e-00, for exponent 0 always use + sign (#238431) +- fix application crashes when doing NSS lookups through nscd + mmapped databases and nscd decides to start garbage collection + during the lookups (#219145, #225315) +- fix NIS+ __nisfind_server (#235229) +- assorted NIS+ speedups (#233460) +- fix power6 libm compat symbols on ppc32 (#232633) +- fix child refcntr in NPTL fork (#230198) +- fix ifaddrs with many net devices on > 4KB page size arches (#230151) +- fix pthread_mutex_timedlock on x86_64 (#228103) +- fix HAVE_LIBCAP configure detection (#178934) +- fix double free in fts_close (#222089) +- fix vfork+execvp memory leak (#221187) +- further localedef robustification (#203728) +- fix printf with %g and values tiny bit smaller than 1.e-4 (#235864, + BZ#4362, BZ#4070) +- fix _XOPEN_VERSION (BZ#4364) +- nexttoward*/nextafter* fixes (BZ#3306) +- various fixes (BZ#3919, BZ#4101, BZ#4130, BZ#4181, BZ#4069, BZ#3458, + BZ#3348, BZ#4344, BZ#4368, BZ#4305, BZ#4306) +- fix nftw with FTW_CHDIR on / (BZ#4076) +- nscd fixes (BZ#4074) +- fix euidaccess (BZ#3842) +- assorted locale data fixes (BZ#3322, BZ#3995, BZ#3884, BZ#3851, BZ#4411) +- fix strptime (BZ#3944) +- fix regcomp with REG_NEWLINE (BZ#3957) +- fix %0lld printing of 0LL on 32-bit architectures (BZ#3902) +- soft-fp fixes (BZ#2749) +- further strtod fixes (BZ#3855) +- update ru and sv translations +- fix fesetround return value on ia64 +- fix nscd SIGHUP database invalidation + +* Mon Jan 15 2007 Jakub Jelinek <jakub@redhat.com> 2.5-12 +- add a workaround for #210748 and #211133 +- fix NIS getservbyname when proto is NULL + +* Fri Jan 5 2007 Jakub Jelinek <jakub@redhat.com> 2.5-10 +- fix nss_compat +group handling (#220658) + +* Fri Dec 22 2006 Jakub Jelinek <jakub@redhat.com> 2.5-9 +- make sure pthread_kill doesn't return EINVAL even if + the target thread exits in between pthread_kill ESRCH check + and the actual tgkill syscall (#220420) + +* Tue Dec 19 2006 Jakub Jelinek <jakub@redhat.com> 2.5-8 +- fix setcontext on ppc32 (#219107) +- fix wide stdio after setvbuf (#217064, BZ#2337) +- fix {j,m}rand48{,_r} on 64-bit arches (BZ#3747) +- handle power6x AT_PLATFORM (#216970) +- fix a race condition in getXXbyYY_r (#219145) +- fix tst-pselect testcase + +* Tue Dec 12 2006 Jakub Jelinek <jakub@redhat.com> 2.5-7 +- fix hasmntopt (#218802) +- fix setusershell and getusershell (#218782) +- strtod fixes (BZ#3664, BZ#3673, BZ#3674) +- fix ttyname and ttyname_r with invalid file descriptor (#218276) +- fix nis_getnames if the default domain doesn't contain at least + two dots (#206483) +- fix memusage with realloc (x, 0) + +* Wed Nov 29 2006 Jakub Jelinek <jakub@redhat.com> 2.5-6 +- fix svc_run (#216834, BZ#3559) +- make sure there is consistent timestamp for /etc/ld.so.conf, + /etc/localtime and /etc/rpc between multilib glibc rpms +- fix :include: /etc/alias handling (#215572) +- update powerpc-cpu add-on to version 0.4 (#196319) +- add power6x subdir to /%{_lib}/ and /%{_lib}/rtkaio/, + link all libs from ../power6/* into them +- update nl, sv, pl and tr translations +- add mai_IN locale (#213415) +- fix es_ES LC_TIME (BZ#3320) + +* Tue Nov 14 2006 Jakub Jelinek <jakub@redhat.com> 2.5-5 +- remove bogus %{_libdir}/librt.so.1 symlink (#213555) +- fix memusage (#213656) +- fix sysconf (_SC_LEVEL{2,3}_CACHE_SIZE) on Intel Core Duo + CPUs +- fix ld.so locking on dlopen failures (#213037, BZ#3429) +- fix libthread_db.so on TLS_DTV_AT_TP architectures (#215513) +- fix --inhibit-rpath (#214569) +- fix _r_debug content when prelinked ld.so executes + a program as its argument +- handle new tzdata format to cope with year > 2037 transitions + on 64-bit architectures +- fix strxfrm +- fix i?86 floor and ceil inlines (BZ#3451) + +* Thu Oct 19 2006 Jakub Jelinek <jakub@redhat.com> 2.5-4 +- fix i?86 6 argument syscalls (e.g. splice) +- fix rtld minimal realloc (BZ#3352) +- fix RFC3484 getaddrinfo sorting according to rules 4 and 7 (BZ#3369) +- fix xdrmem_setpos (#211452) + +* Sun Oct 8 2006 Jakub Jelinek <jakub@redhat.com> 2.5-3 +- bump __GLIBC_MINOR__ +- increase PTHREAD_STACK_MIN on ppc{,64} to 128K to allow + 64K pagesize kernels (#209877) +- speed up initgroups on NIS+ (#208203) + +* Mon Oct 2 2006 Jakub Jelinek <jakub@redhat.com> 2.5-2 +- fix nscd database growing (#207928) +- bypass prelinking when LD_DYNAMIC_WEAK=1 is in the environment + +* Fri Sep 29 2006 Jakub Jelinek <jakub@redhat.com> 2.5-1 +- glibc 2.5 release + +* Wed Sep 27 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-36 +- rebuilt with gcc-4.1.1-26 to fix unwind info + +* Mon Sep 25 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-35 +- fix glob with large number of matches (BZ#3253) +- fix fchownat on kernels that don't support that syscall (BZ#3252) +- fix lrintl on s390{,64} + +* Sat Sep 23 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-34 +- fix ppc{32,64} longjmp (BZ#3225) +- fix user visible spelling errors (BZ#3137) +- fix l{,l}rint{,f,l} around zero (BZ#2592) +- avoid stack trampoline in s390{,x} makecontext + +* Tue Sep 15 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-33 +- fix dlclose (#206639) +- don't load platform optimized libraries if kernel doesn't set + AT_PLATFORM +- fix ppc{32,64} libSegFault.so +- use -mtune=generic even for glibc-devel.i386 (#206437) +- fix /%{_lib}/librt.so.1 symlink + +* Fri Sep 15 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-32 +- on ppc* use just AT_PLATFORM and altivec AT_HWCAP bit for library selection +- fix lrintl and lroundl on ppc{,64} +- use hidden visibility on fstatat{,64} and mknodat in libc_nonshared.a + +* Sun Sep 10 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-31 +- fix pthread_cond_{,timed}wait cancellation (BZ#3123) +- fix lrint on ppc32 (BZ#3155) +- fix malloc allocating more than half of address space (BZ#2775) +- fix mktime on 32-bit arches a few years after 2038 (BZ#2821) + +* Thu Sep 7 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-30 +- add librtkaio, to use it add /%{lib}/rtkaio to your + LD_LIBRARY_PATH or /etc/ld.so.conf +- fix or_IN February name (#204730) +- fix pthread_create called from cancellation handlers (BZ#3124) +- fix regex case insensitive searches with characters where upper + and lower case multibyte representations have different length + (e.g. I and dotless i, #202991) + +* Tue Sep 5 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-29 +- randomize resolver query ids before use instead after use (#205113) +- fix resolver symver checking with DT_GNU_HASH (#204909) +- put .hash section in glibc libraries at the end of RO segment + when .gnu.hash is present + +* Thu Aug 31 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-28 +- another malloc doubly linked list corruption problem fix (#204653) + +* Thu Aug 31 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-27 +- allow $LIB and $PLATFORM in dlopen parameters even in suid/sgid (#204399) +- handle $LIB/$PLATFORM in LD_LIBRARY_PATH +- fix splice prototype (#204530) + +* Mon Aug 28 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-26 +- real fix for the doubly linked list corruption problem +- try harder in realloc to allocate memory (BZ#2684) +- fix getnameinfo error reporting (#204122) +- make localedef more robust on invalid input (#203728) + +* Fri Aug 25 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-25 +- temporarily back out code to limit number of unsorted block + sort iterations (#203735, #204027) +- handle PLT symbols in dladdr properly (BZ#2683) +- avoid malloc infinite looping for allocations larger than + the system can allocate (#203915) + +* Tue Aug 22 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-23 +- malloc fixes, especially for 32-bit arches (#202309) +- further *_IN locale fixes (#200230) +- fix get{serv,rpc}ent{,_r} if NIS map is empty (#203237) +- fix /usr/bin/iconv (#203400) + +* Fri Aug 18 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-22 +- rebuilt with latest binutils to pick up 64K -z commonpagesize + on ppc/ppc64 (#203001) + +* Tue Aug 15 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-21 +- if some test gets stuck, kill the tee process after make check + finishes +- build with -mtune=generic on i686 and x86_64 + +* Tue Aug 15 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-20 +- PTHREAD_PRIO_PROTECT support +- fix errno if nice() fails (#201826) + +* Thu Aug 10 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-19 +- adaptive malloc brk/mmap threshold +- fix fchownat to use kernel syscall (if available) on many arches (#201870) +- only define O_DIRECT with -D_GNU_SOURCE on ia64 to match all + other arches (#201748) + +* Mon Aug 7 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-18 +- NIS+ fixes +- fix memusage and xtrace scripts (#200736) +- redirect /sbin/service sshd condrestart std{out,err} to /dev/null + when executed from glibc_post_upgrade + +* Wed Aug 2 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-17 +- typo fix for the dladdr patch +- build i?86 glibc with -mno-tls-direct-seg-refs (#200469) + +* Wed Aug 2 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-16 +- fix dladdr on binaries/libraries with only DT_GNU_HASH and no + DT_HASH (#200635) +- fix early timeout of initgroups data in nscd (#173019) +- add am/pm display to es_PE and es_NI locales (#167101) +- fix nss_compat failures when nis/nis+ unavailable (#192072) + +* Mon Jul 31 2006 Roland McGrath <roland@redhat.com> 2.4.90-15 +- fix missing destructor calls in dlclose (#197932) +- enable transliteration support in all locales (#196713) +- disallow RTLD_GLOBAL flag for dlmopen in secondary namespaces (#197462) +- PI mutex support + +* Tue Jul 10 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-13 +- DT_GNU_HASH support + +* Fri Jun 30 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-12 +- buildrequire gettext +- enable fstatat64/newfstatat syscalls even on ppc*/s390*/ia64 (#196494) +- fix out of memory behavior in gettext (#194321) +- fix regex on multi-byte non-UTF-8 charsets (#193873) +- minor NIS+ fixes (#190803) +- don't use cancellable calls in posix_spawn* and only set{u,g}id + current thread if requested (#193631) + +* Wed May 31 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-11 +- don't exit from nscd -i <database> before the database is + actually invalidated, add locking to prune_cache (#191464) +- build glibc-devel.i386 static libraries with + -mno-tls-direct-seg-refs -DNO_TLS_DIRECT_SEG_REFS +- RFC3542 support (advanced API for IPv6; #191001, BZ##2693) + +* Wed May 24 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-10 +- on i686 make glibc owner of /lib/i686 directory (#192597) +- search parent NIS+ domains (#190803) + +* Sun May 21 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-9 +- update from CVS + - big NIS+ changes + +* Fri May 19 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-8 +- update from CVS + - fix nss_compat when SETENT_BATCH_READ=TRUE is in /etc/default/nss + - fix RFC3484 precedence table for site-local and ULA addresses (#188364) + - fix a sunrpc memory leak + +* Thu May 11 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-7 +- update from CVS + - fix tcgetattr (#177965) + - fix <sys/queue.h> (#191264) + +* Fri May 5 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-6 +- update from CVS +- rebuilt using fixed rpm + +* Fri May 5 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-5 +- update from CVS + - some NIS+ fixes + - allow overriding rfc3484 address sorting tables for getaddrinfo + through /etc/gai.conf (sample config file included in %%doc directory) + +* Mon May 1 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-4 +- update from CVS + - SETENT_BATCH_READ /etc/default/nss option for speeding up + some usages of NIS+ (#188246) + - move debug state change notification (#179208) + - fix ldd script if one of the dynamic linkers is not installed (#190259) + +* Thu Apr 27 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-3 +- update from CVS + - fix a typo in nscd.conf (#190085) + - fix handling of SIGHUP in nscd when some caches are disabled (#189978) + - make nscd paranoia mode working with non-root server-user (#189779) + +* Wed Apr 26 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-2 +- update from CVS + - fix getaddrinfo (#190002) + - add auto-propagate nscd.conf options (#177154) + - fix nscd auditing (#169148) + +* Tue Apr 25 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-1 +- update from CVS + +* Mon Apr 24 2006 Jakub Jelinek <jakub@redhat.com> 2.4-6 +- update from CVS + - NIS+ fixes + - don't segfault on too large argp key values (#189545) + - getaddrinfo fixes for RFC3484 (#188364) + +* Tue Mar 28 2006 Jakub Jelinek <jakub@redhat.com> 2.4-5 +- update from CVS + - pshared robust mutex support + - fix btowc and bwtoc in C++ (#186410) + - fix NIS+ (#186592) + - don't declare __wcsto*l_internal for non-GCC or if not -O1+ (#185667) +- don't mention nscd failures on 2.0 kernels (#185335) + +* Tue Mar 7 2006 Roland McGrath <roland@redhat.com> 2.4-4 +- back up %%{ix86} gdb conflicts to < 6.3.0.0-1.111 + +* Tue Mar 7 2006 Jakub Jelinek <jakub@redhat.com> 2.4-3 +- really fix rintl on ppc64 + +* Tue Mar 7 2006 Jakub Jelinek <jakub@redhat.com> 2.4-2 +- accurate unwind info for lowlevellock.h stubs on %%{ix86} +- fix ppc/ppc64 ceill, floorl, rintl, roundl and truncl (BZ#2423) + +* Mon Mar 6 2006 Jakub Jelinek <jakub@redhat.com> 2.4-1 +- update from CVS + - glibc 2.4 release + +* Mon Mar 6 2006 Jakub Jelinek <jakub@redhat.com> 2.3.91-2 +- update from CVS + - fix sYSMALLOc for MALLOC_ALIGNMENT > 2 * SIZE_SZ (#183895) + - revert ppc32 malloc alignment patch, it breaks malloc_set_state + and needs some further thoughts and time (#183894) +- provide accurate unwind info for lowlevellock.h stubs on x86_64 + +* Thu Mar 2 2006 Jakub Jelinek <jakub@redhat.com> 2.3.91-1 +- update from CVS + - fixes for various arches +- ensure malloc returns pointers aligned to at least + MIN (2 * sizeof (size_t), __alignof__ (long double)) + (only on ppc32 this has not been the case lately with addition + of 128-bit long double, #182742) + +* Wed Mar 1 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-39 +- update from CVS + +* Fri Feb 17 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-38 +- update from CVS + - robust mutexes rewrite + +* Mon Feb 13 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-37 +- update from CVS + - *at fixes + - unshare syscall wrapper + +* Sat Feb 4 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-36 +- update from CVS + - fix frequency setting for ITIMER_PROF (#179938, BZ#2268) + - fix powerpc inline fegetround () + - fix nptl_db (#179946) + +* Fri Feb 3 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-35 +- update from CVS + - handle futimesat (fd, NULL, tvp) as futimes (fd, tvp) +- fix <stdlib.h> q{e,f,g}cvt{,_r} for -mlong-double-64 + +* Thu Feb 2 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-34 +- fix <math.h> with C++ and -mlong-double-64 (#179742) +- add nexttowardl redirect for -mlong-double-64 + +* Thu Feb 2 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-33 +- update from CVS + - long double support fixes + +* Wed Feb 1 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-32 +- update from CVS + - 128-bit long double fixes for ppc{,64}, s390{,x} and sparc{,v9}, + alpha 128-bit long double support +- add inotify syscall numbers to the override <asm/unistd.h> headers + (#179366) + +* Mon Jan 30 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-31 +- update from CVS + - 128-bit long double on ppc, ppc64, s390, s390x and sparc{,v9} +- add some new syscall numbers to the override <asm/unistd.h> + headers + +* Mon Jan 9 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-30 +- update from CVS + - <pthread.h> initializer fixes for -std=c{8,9}9 on 32-bit + arches +- avoid writable .rodata (#177121) + +* Fri Jan 6 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-29 +- update from CVS + - make pthread_mutex_t an unnamed union again, as it affects + libstdc++ ABI mangling + +* Fri Jan 6 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-28 +- update from CVS + - make aio_suspend interruptible by signals (#171968) + +* Fri Jan 6 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-27 +- only rely on d_type in 32-bit getdents on s390 for 2.6.11+ + +* Wed Jan 4 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-26 +- update from CVS + - for newly linked lio_listio* callers, send per request + notifications (#170116) + - fixup nscd -S option removal changes (#176860) + - remove nonnull attribute from ctermid (#176753) + - fix PTHREAD_*_INITIALIZER{,_NP} on 64-bit arches + - SPARC NPTL support for pre-v9 CPUs +- drop support for 2.4.xx and < 2.6.9 kernels + +* Mon Jan 2 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-25 +- update from CVS + - s390{,x} and sparc{,64} pointer mangling fixes +- install a sanitized LinuxThreads <bits/libc-lock.h> + +* Mon Jan 2 2006 Jakub Jelinek <jakub@redhat.com> 2.3.90-24 +- update from CVS + - nscd audit changes (#174422) + - ppc{32,64} vDSO support and ppc32 hp-timing + +* Tue Dec 27 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-23 +- update from CVS + - robust mutexes +- fix transliteration segfaults (#176573, #176583) +- ignore prelink temporaries in ldconfig (#176570) + +* Wed Dec 21 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-22 +- update from CVS + - minor fts fixes +- revert broken _Pragma () workaround +- fix ldconfig on bi-arch architectures (#176316) + +* Tue Dec 20 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-21 +- update from CVS + - fix pointer (de)mangling in gconv_cache.c + +* Tue Dec 20 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-20 +- update from CVS + - time ((void *) 1) should segfault, not return -EFAULT (#174856, BZ#1952) + - fix errlist generation +- update ulps for GCC 4.1 on IA-64 + +* Mon Dec 19 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-19 +- update from CVS + - sysdeps/generic reorg + - setjmp/longjmp jump pointer mangling +- rebuilt with GCC 4.1-RH prerelease, worked around broken _Pragma () + handling in it +- remove glibc-profile subpackage +- use non-PLT calls for malloc/free/realloc/memalign invocations in + mtrace and mcheck hooks (#175261) +- setjmp/longjmp jump pointer mangling on ppc{,64}/ia64/s390{,x} + +* Sat Nov 19 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-18 +- update from CVS + - change <sys/stat.h> for broken apps that #define const /**/, + handle non-GCC compilers + - fix ppc{32,64} strncmp (BZ#1877, #173643, IT#83510) + - provide shmatt_t typedef in ia64 <sys/shm.h (#173680) + - support 2nd arg to futimesat being NULL (#173581) + +* Wed Nov 16 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-17 +- update from CVS + - fix <sys/stat.h> in C++ + - {fstat,fchown,rename,unlink}at fixes + - epoll_wait is now a cancellation point + +* Tue Nov 15 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-16 +- update from CVS +- make sure waitid syscall is used on ppc*/s390* + +* Thu Oct 20 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-15 +- update from CVS + - be permissive in %n check because of kernel bug #165351 (#171240) + - don't misalign stack in pthread_once on x86_64 (#170786, IT#81521) + - many locale fixes + +* Mon Oct 10 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-14 +- update from CVS + - fix malloc bug after fork introduced in the last update + - fix getent hosts IP for IPv4 IPs (#169831) + +* Mon Oct 3 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-13 +- update from CVS + - fix setuid etc. hangs if some thread exits during the call (#167766) + - fix innetgr memory leak (#169051) + - support > 2GB nscd log files (#168851) + - too many other changes to list here +- include errno in nscd message if audit_open failed (#169148) + +* Mon Sep 12 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-12 +- update from CVS + - netgrp handling fixes (#167728) + - fix memory leak in setlocale (BZ#1318) + - fix hwcaps computation + - several regex portability improvements (#167019) + - hypotf fix + - fix *printf return code if underlying write fails (BZ#1146) + - PPC64 dl{,v}sym fixes for new ABI .opd symbols +- fix calloc with MALLOC_PERTURB_ in environment on 64-bit architectures + (#166719) +- source /etc/sysconfig/nscd (if it exists) in /etc/rc.d/init.d/nscd + (#167083) +- add %%triggerin for tzdata to glibc-common, so that tzdata updates + update /etc/localtime and /var/spool/postfix/etc/localtime if they + exist (#167787) + +* Mon Aug 29 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-11 +- FUTEX_WAKE_OP support to speed up pthread_cond_signal + +* Wed Aug 24 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-10 +- update from CVS + - fix growing of nscd persistent database (BZ#1204) + - fix _FORTIFY_SOURCE mbstowcs and wcstombs if destination size + is known at compile time, but length argument is not + +* Mon Aug 22 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-9 +- update from CVS + - fix resolving over TCP (#161181, #165802) + - on ia64 don't abort on unhandled math function exception codes + (#165693) + +* Mon Aug 8 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-8 +- update from CVS + - nscd persistent database verifier (#164001) + - cleanup _FORTIFY_SOURCE bits/*.h headers (#165000) + - handle EINTR in sigwait properly +- make sure poor man's stack guard randomization keeps first + byte 0 even on big-endian 32-bit arches +- fix {elf,nptl}/tst-stackguard1 +- obsolete linuxthreads-devel in glibc-devel + +* Fri Jul 29 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-7 +- update from CVS +- do some poor man's stack guard randomization even without + the costly --enable-stackguard-randomization +- rebuilt with new GCC to make it use -msecure-plt on PPC32 + +* Mon Jul 25 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-6 +- update from CVS + - fix execvp if PATH is not in environment and the call is going + to fail (BZ#1125) + - another bits/wchar2.h fix (#163990) + +* Fri Jul 22 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-5 +- update from CVS + - fix stubs.h generation +- don't use _G_va_list in bits/wchar2.h + +* Fri Jul 22 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-4 +- update from CVS + - make sure bits/wchar2.h header is installed + - fix __getgroups_chk return type + +* Thu Jul 21 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-3 +- update from CVS + - make sure nscd cmsg buffers aren't misaligned, handle EINTR from + poll when contacting nscd more gracefully + - remove malloc attribute from posix_memalign + - correctly size nscd buffer for grpcache key (#163538) + - fix atan2f + - fix error memory leaks + - some more _FORTIFY_SOURCE protection + +* Fri Jul 8 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-2 +- update from CVS + - ia64 stack protector support + - handle DNS referral results as server errors (#162625) + - ctan{,h}{,f,l} fixes (#160759) + - pass argc, argv and envp also to executable's *ni_array + functions (BZ#974) + - add ellipsis to clone prototype (#161593) + - fix glibc-profile (#162601) + - nss_compat fixes +- use sysdeps/generic version of <bits/stdio-lock.h> in installed + headers instead of NPTL version (#162634) + +* Mon Jun 27 2005 Jakub Jelinek <jakub@redhat.com> 2.3.90-1 +- update from CVS + - stack protector support + - fix xdr_{,u_}{longlong_t,hyper} on 64-bit arches (#161583) +- enable @GLIBC_2.4 symbols +- remove linuxthreads + +* Mon Jun 20 2005 Jakub Jelinek <jakub@redhat.com> 2.3.5-11 +- update from CVS + - PPC32 -msecure-plt support + - support classes keyword in /etc/hesiod.conf (#150350) + - add RLIMIT_NICE and RLIMIT_RTPRIO to <sys/resources.h> (#157049) + - decrease number of .plt relocations in libc.so + - use -laudit in nscd (#159217) + - handle big amounts of networking interfaces in getifaddrs/if_nameindex + (#159399) + - fix pa_IN locale's am_pm (#158715, BZ#622) + - fix debugging of PIEs + +* Mon May 30 2005 Jakub Jelinek <jakub@redhat.com> 2.3.5-10 +- fix LD_ASSUME_KERNEL (since 2.3.5-8 GLRO(dl_osversion) + has been always overwritten with the version of currently + running kernel) +- remove linuxthreads man pages other than those covered in + 3p section, as 3p man pages are far better quality and describe + POSIX behaviour that NPTL implements (#159084) + +* Tue May 24 2005 Jakub Jelinek <jakub@redhat.com> 2.3.5-9 +- update from CVS + - increase bindresvport's LOWPORT to 512, apparently some + broken daemons don't think 0 .. 511 ports are reserved + +* Mon May 23 2005 Jakub Jelinek <jakub@redhat.com> 2.3.5-8 +- update from CVS + - fix kernel version check in ld.so +- fix sendfile{,64} prototypes (BZ#961) +- try more ports in bindresvport if all 600..1023 are + used, don't use priviledged ports when talking to portmap + (#141773) + +* Fri May 20 2005 Jakub Jelinek <jakub@redhat.com> 2.3.5-7 +- update from CVS + - make regexec thread safe (BZ#934) +- fix statically linked programs on i?86, x86_64, s390* and + sparc* (#158027) +- fix IBM939 iconv module (BZ#955) + +* Wed May 4 2005 Jakub Jelinek <jakub@redhat.com> 2.3.5-6 +- update from CVS + - fix cancellation on i?86 + - add call frame information to i?86 assembly + +* Tue May 3 2005 Jakub Jelinek <jakub@redhat.com> 2.3.5-5 +- update from CVS + - add some more UTF-8 locales (#156115) +- clean up /lib64/tls instead of /lib/tls on x86-64, s390x and + ppc64 in glibc_post_upgrade (#156656) +- fix posix_fallocate{,64} (#156289) + +* Thu Apr 28 2005 Jakub Jelinek <jakub@redhat.com> 2.3.5-4 +- update from CVS + - fix nscd cache pruning (#150748) + +* Wed Apr 27 2005 Jakub Jelinek <jakub@redhat.com> 2.3.5-3 +- update from CVS + - fix linuxthreads clocks +- put xen libs into the glibc-2*.i686 package instead of a separate one +- fix librt.so symlink in linuxthreads-devel +- do not include linuxthreads-devel on %{auxarches}, + just on the base architectures + +* Wed Apr 27 2005 Jakub Jelinek <jakub@redhat.com> 2.3.5-2 +- update from CVS + - with MALLOC_CHECK_=N N>0 (#153003) + - fix recursive dlclose (#154641) + - handle %z in strptime (#154804) + - automatically append /%{_lib}/obsolete/linuxthreads/ + to standard library search path if LD_ASSUME_KERNEL=N N <= 2.4.19 + or for glibc 2.0 binaries (or broken ones that don't use errno/h_errno + properly). Warning: all those will stop working when LinuxThreads + is finally nuked, which is not very far away + - remove nonnull attribute from acct prototype (BZ#877) + - kernel CPU clocks support + - fix *scanf in locales with multi-byte decimal point + +* Wed Apr 27 2005 Roland McGrath <roland@redhat.com> +- glibc-xen subpackage for i686 + +* Fri Apr 15 2005 Roland McGrath <roland@redhat.com> 2.3.5-1 +- update from CVS + - fix execvp regression (BZ#851) + - ia64 libm updates + - sparc updates + - fix initstate{,_r}/strfry (#154504) + - grok PT_NOTE in vDSO for kernel version and extra hwcap dirs, + support "hwcap" keyword in ld.so.conf files + +* Tue Apr 4 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-21 +- update from CVS + - fix xdr_rmtcall_args on 64-bit arches (#151686) +- fix <pthread.h> and <bits/libc-lock.h> with -std=c89 -fexceptions (#153774) + +* Mon Apr 4 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-20 +- move LinuxThreads libraries to /%{_lib}/obsolete/linuxthreads/ + and NPTL libraries to /%{_lib}. To run a program against LinuxThreads, + LD_ASSUME_KERNEL=2.4.xx LD_LIBRARY_PATH=/%{_lib}/obsolete/linuxthreads/ + is now needed +- bzip2 ChangeLog* files instead of gzipping them + +* Sat Apr 2 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-19 +- update from CVS + - fix nextafterl and several other libm routines on ia64 + - fix initgroups (BZ#661) +- kill nptl-devel subpackage, add linuxthreads-devel, + compile and link by default against NPTL and only with + -I/usr/include/linuxthreads -L/usr/%{_lib}/linuxthreads + against LinuxThreads +- package /usr/lib/debug/%{_lib}/tls/i{5,6}86 symlinks in + i386 glibc-debuginfo +- limit number of ChangeLog* files in glibc-common %%doc + to last 2.5 years of changes only to save space + +* Fri Mar 25 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-18 +- fix build on 64-bit arches with new GCC + +* Thu Mar 24 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-17 +- update from CVS + - fix LD_AUDIT in LinuxThreads ld.so + - fix calloc with M_PERTURB + - fix error handling in pthread_create with PTHREAD_EXPLICIT_SCHED + on ppc*/ia64/alpha/mips (BZ#801) + - fix a typo in WINDOWS-31J charmap (#151739) + - fix NIS ypprot_err (#151469) + +* Sun Mar 20 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-16 +- fix pread with -D_FILE_OFFSET_BITS=64 (#151573) + +* Sat Mar 19 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-15 +- update from CVS + - better fix for the dlclose bug (#145810, #150414) + - fix regex crash on case insensitive search in zh_CN locale + (#151215) + - fix malloc_trim (BZ#779) + - with -D_FORTIFY_SOURCE=*, avoid defining read and a bunch of others + as function-like macros, there are too many broken programs + out there +- add %%dir %{_prefix}/%{_lib}/gconv to glibc's file list (#151372) + +* Sun Mar 6 2005 Roland McGrath <roland@redhat.com> 2.3.4-14 +- fix bits/socket2.h macro typos + +* Sat Mar 5 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-12 +- fix tst-chk{2,3} +- fix up AS_NEEDED directive in /usr/%{_lib}/libc.so +- BuildReq binutils >= 2.15.94.0.2-1 for AS_NEEDED, in + glibc-devel Conflict with binutils < 2.15.94.0.2-1 + +* Thu Mar 3 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-11 +- update from CVS + - fix execvp (#149290) + - fix dlclose (#145810) + - clear padding in gconv-modules.cache (#146614, BZ#776) +- rebuilt with GCC4 +- changed __GLIBC_MINOR__ for now back to 3 +- back out the newly added GLIBC_2.4 *_chk routines, instead + do the checking in macros + +* Sat Feb 12 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-10 +- hopefully fix interaction with prelink (#147655) + +* Fri Feb 11 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-9 +- update from CVS + - bi-arch <gnu/stubs.h> (BZ#715) + +* Fri Feb 11 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-8 +- update from CVS + - bi-arch <gnu/lib-names.h> (BZ#632) + - fix libdl on s390 and maybe other platforms + - fix initstate{,_r} (BZ#710) + - fix <gnu/stubs.h> generation (BZ#157) +- define CMSPAR in bits/termios.h (#147533) + +* Tue Feb 8 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-7 +- update from CVS + - fix TLS handling in linuxthreads + +* Tue Feb 8 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-6 +- update from CVS + - ld.so auditing + - fix segfault if chrooted app attempts to dlopen a library + and no standard library directory exists at all (#147067, #144303) + - fix initgroups when nscd is running, but has group caching disabled + (#146588) + - fix pthread_key_{create,destroy} in LinuxThreads when pthread_create + has not been called yet (#146710) + - fix ppc64 swapcontext and setcontext (#146736, BZ#700) + - service nscd cosmetic fixes (#146776) + - fix IA-32 and x86-64 stack alignment in DSO constructors (#145689) + - fix zdump -v segfaults on x86-64 (#146210) + - avoid calling sigaction (SIGPIPE, ...) inside syslog (#146021, IT#56686) + - fix errno values for futimes (BZ#633) + - unconditionally include <features.h> in malloc.h (BZ#650) + - change regex \B handling to match old GNU regex as well as perl/grep's dfa + (from empty string inside of word to empty string not at a word boundary, + BZ#693) + - slightly optimize i686 TLS accesses, use direct TLS %gs access in sem_* + and allow building -mno-tls-direct-seg-refs glibc that is free of direct TLS + %gs access with negative offsets + - fix addseverity + - fix fmemopen + - fix rewinddir + - increase svc{tcp,unix}_create listen backlog + +* Thu Jan 6 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-5 +- update from CVS + - add some warn_unused_result marking + - make ftruncate available even for just -D_POSIX_C_SOURCE=200112L + (BZ#640) + +* Thu Jan 6 2005 Jakub Jelinek <jakub@redhat.com> 2.3.4-4 +- update from CVS + - fix IA-32 stack alignment for LinuxThreads thread functions + and functions passed to clone(2) directly + - fix ecvt{,_r} on denormals (#143279) + - fix __tls_get_addr typo + - fix rounding in IA-64 alarm (#143710) + - don't reinitialize __environ in __libc_start_main, so that + effects of setenv/putenv done in DSO initializers are preserved + (#144037, IT#57403) + - fix fmemopen + - fix vDSO l_map_end and l_text_end values + - IA64 libm update (#142494) +- fix ppc rint/ceil etc. (BZ#602) + +* Tue Dec 21 2004 Jakub Jelinek <jakub@redhat.com> 2.3.4-3 +- rebuilt + +* Mon Dec 20 2004 Jakub Jelinek <jakub@redhat.com> 2.3.4-2 +- work around rpm bug some more, this time by copying + iconvconfig to iconvconfig.%%{_target_cpu}. + +* Mon Dec 20 2004 Jakub Jelinek <jakub@redhat.com> 2.3.4-1 +- update from CVS + - glibc 2.3.4 release + - add -o and --nostdlib options to iconvconfig +- if /sbin/ldconfig doesn't exist when running + glibc_post_upgrade.%%{_target_cpu}, just don't attempt to run it. + This can happen during first install of bi-arch glibc and the + other arch glibc's %post wil run /sbin/ldconfig (#143326) +- use -o and --nostdlib options to create all needed + gconv-modules.cache files on bi-arch setups + +* Sun Dec 19 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-99 +- rebuilt + +* Sat Dec 18 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-98 +- add .%%{_target_cpu} to glibc_post_upgrade, only run telinit u + if /sbin/init is the same ELF class and machine as + glibc_post_upgrade.%%{_target_cpu} and similarly with + condrestarting sshd (#143046) + +* Fri Dec 17 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-97 +- update from CVS + - fix ppc64 getcontext and swapcontext (BZ#610) + - sparc/sparc64 fixes + +* Wed Dec 15 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-96 +- update from CVS + - fix i686 __USE_STRING_INLINES strncat + - make sure ppc/ppc64 maintain correct stack alignment + across clone + +* Wed Dec 15 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-95 +- export nis_domain_of_r from libnsl.so again which was + unintentionally lost + +* Wed Dec 15 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-93 +- update from CVS + - ppc/ppc64 clone without CLONE_THREAD getpid () adjustement + - fix MALLOC_CHECK_={1,2,3} for non-contiguous main arena + (BZ#457) + - fix sysconf (_POSIX_V6_*) for other ABI environments in + bi-arch setups +- s390/s390x clone without CLONE_THREAD getpid () adjustement + +* Tue Dec 14 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-92 +- update from CVS +- fix %{_prefix}/libexec/getconf filenames generation + +* Tue Dec 14 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-91 +- update from CVS + - double buffer size in getXXbyYY or getXXent on ERANGE + instead of adding BUFLEN (#142617) + - avoid busy loop in malloc if another thread is doing fork + (#142214) + - some more realloc corruption checks + - fix getconf _POSIX_V6_WIDTH_RESTRICTED_ENVS output, + tweak %{_prefix}/libexec/getconf/ filenames + +* Fri Dec 10 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-90 +- update from CVS + - regex speedups + - use | cat in ldd if running under bash3+ to allow running + it on binaries that are not through SELinux allowed to access + console or tty +- add __NR_waitid defines for alpha and ia64 + +* Wed Dec 8 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-89 +- update from CVS + - fix clone2 on ia64 + - avoid tst-timer5 failing with linuxthreads implementation +- if __libc_enable_secure, disallow mode != normal +- change ldd script to imply -r when -u is used, properly + propagate return value and handle suid binaries + +* Tue Dec 7 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-88 +- update from CVS + - disregard LD_SHOW_AUXV and LD_DYNAMIC_WEAK if __libc_enable_secure + - disregard LD_DEBUG if __libc_enable_secure in normal mode + if /suid-debug doesn't exist + - fix fseekpos after ungetc + - avoid reading bytes before start of buffers in regex's + check_dst_limits_calc_pos_1 (#142060) + - make getpid () working with clone/clone2 without CLONE_THREAD + (so far on i386/x86_64/ia64 only) +- move %{_prefix}/libexec/getconf/* to glibc from glibc-common +- make %{_prefix}/libexec/getconf directory owned by glibc package + +* Fri Dec 3 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-87 +- update from CVS + - build libpthread_nonshared.a objects with -fPIC on s390/s390x + - fix mktime with < 0 or > 59 tm_sec on entry + - remove nonnull attribute for realpath + - add $(make-target-directory) for errlist-compat.c rule + (hopefully fix #141404) +- add testcase for ungetc bug +- define _POSIX_{,THREAD_}CPUTIME to 0 on all Linux arches + +* Tue Nov 30 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-86 +- update from CVS + - some posix_opt.h fixes +- fix strtold use of unitialized memory (#141000) +- some more bugfixes for bugs detected by valgrind +- rebuilt with GCC >= 3.4.3-5 to avoid packed stack layout + on s390{,x} (#139678) + +* Fri Nov 26 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-85 +- update from CVS + - support -v specification in getconf + - fix sysconf (_SC_LFS64_CFLAGS) etc. + - avoid thread stack aliasing issues on EM64T (#140803) +- move %{_prefix}/include/nptl headers from nptl-devel + to glibc-headers, so that even NPTL specific programs + can be built bi-arch without problems + +* Wed Nov 24 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-84 +- update from CVS + - fix memory leak in getaddrinfo if using nscd (#139559) + - handle large lines in /etc/hosts and /etc/networks + (#140378) + - add nonnull attributes to selected dirent.h and dlfcn.h + functions + +* Sun Nov 21 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-83 +- update from CVS + - add deprecated and/or nonnull attribute to some signal.h + functions + - speed up tzset () by only using stat instead of open/fstat + when calling tzset for the second and following time if + /etc/localtime has not changed +- fix tgamma (BZ #552) + +* Sat Nov 20 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-82 +- update from CVS + - some malloc () checking + - libpthread.a object dependency cleanups (#115157) + - <bits/socket.h> fix for -std=c89 -pedantic-errors (#140132) + +* Fri Nov 19 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-81 +- don't use chunksize in <= 2 * SIZE_SZ free () checks + +* Fri Nov 19 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-80 +- update from CVS + - with -D_FORTIFY_SOURCE=2, prevent missing %N$ formats + - for -D_FORTIFY_SOURCE=2 and %n in writable format string, + issue special error message instead of using the buffer overflow + detected one + - speedup regex searching with REG_NOSUB, add RE_NO_SUB, + speedup searching with nested subexps (BZ #544) + - block SIGCANCEL in NPTL timer_* helper thread +- further free () checking + +* Tue Nov 16 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-79 +- update from CVS +- fix free () checking +- move /etc/default/nss into glibc-common (hopefully fix #132392) + +* Mon Nov 15 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-78 +- update from CVS + - fix LD_DEBUG=statistics + - issue error message before aborting in __chk_fail () +- some more free () checking + +* Fri Nov 12 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-77 +- update from CVS + - speedup regex on palindromes (BZ #429) + - fix NPTL set{,e,re,res}[ug]id, so that even if making process + less priviledged all threads change their credentials successfully + +* Wed Nov 10 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-76 +- update from CVS + - fix regcomp crash (#138439) + - fix ftell{,o,o64} (#137885) + - robustification of nscd to cope with corrupt databases (#137140) + - fix NPTL with pthread_exit immediately after pthread_create (BZ #530) + - some regex optimizations + +* Tue Nov 2 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-75 +- update from CVS + - mktime cleanups (BZ #487, #473) + - unique comments in free(3) check error messages +- adjust some x86_64 headers for -m32 (#129712) +- object size checking support even with GCC-3.4.2-RH >= 3.4.2-8 + +* Wed Oct 27 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-74 +- fix <netinet/udp.h> header +- fix globfree (#137176) +- fix exiting if there are dlmopened libraries in namespaces + other than main one not closed yet +- export again _res_opcodes and __p_{class,type}_syms from + libresolv.so that were lost in -69 + +* Thu Oct 21 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-73 +- remove setaltroot and key{_add,_request,ctl} also from Versions +- back out _sys_errlist changes + +* Thu Oct 21 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-72 +- back out setaltroot and key{_add,_request,ctl} addition +- fix severe x86-64 symbol versioning regressions that breaks + e.g. java binaries + +* Wed Oct 20 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-71 +- update from CVS + - fix minor catchsegv temp file handling vulnerability + (CAN-2004-0968, #136319) + - add 4 new errno codes + - setaltroot, key{_add,_request,ctl} syscalls on some arches + - export _dl_debug_state@GLIBC_PRIVATE from ld.so again for + gdb purpose + - use inet_pton to decide what is address and what is hostname + in getent (#135422) + - change dladdr/dladdr1, so that dli_saddr is the same kind + of value as dlsym/dlvsym return (makes difference on ia64/hppa only) + - fix catchsegv script so that it works with both 32-bit and 64-bit + programs on multi-arch platforms + +* Tue Oct 19 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-70 +- update from CVS +- require newer selinux-policy (#135978) +- add %%dir for /var/run/nscd and /var/db/nscd and %%ghost + files in it +- conflict with gcc4 4.0.0-0.6 and earlier (needs __builtin_object_size) + +* Mon Oct 18 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-69 +- update from CVS + - object size checking support (-D_FORTIFY_SOURCE={1,2}) + +* Thu Oct 14 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-68 +- update from CVS + - support for namespaces in the dynamic linker + - fix dlclose (BZ #77) + - libSegFault.so uses now backtrace() to work on IA-64, x86-64 + and s390 (#130254) + +* Tue Oct 12 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-67 +- update from CVS + - use non-blocking sockets in resolver (#135234) + - reset pd->res options on thread exit, so that threads + reusing cached stacks get resolver state properly initialized + (BZ #434) + +* Wed Oct 6 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-66 +- update from CVS +- avoid using perl in the spec file, buildrequire sed >= 3.95 + (#127671) +- export TIMEOUTFACTOR=16 +- fix _JMPBUF_CFA_UNWINDS_ADJ on s390{,x} + +* Tue Oct 5 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-65 +- update from CVS + - define _POSIX_THREAD_PROCESS_SHARED and _POSIX_CLOCK_SELECTION + to -1 in LinuxThreads + - define _POSIX_CPUTIME and _POSIX_THREAD_CPUTIME to 0 + on i?86/ia64 and make sure sysconf (_SC_{,THREAD_}CPUTIME) + returns correct value +- if _POSIX_CLOCK_SELECTION == -1 in nscd, still try + sysconf (_SC_CLOCK_SELECTION) and if it returns true, + dlopen libpthread.so and dlsym pthread_condattr_setclock +- build nscd with -z relro and -z now + +* Mon Oct 4 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-64 +- update from CVS + - stop using __builtin_expect in assert and assert_perror + (#127606) + - try to avoid too much VA fragmentation with malloc + on flexmap layout (#118574) + - nscd robustification + - change valloc to use debugging hooks (#134385) +- make glibc_post_upgrade more verbose on errors (Fergal Daly, + #125700) + +* Fri Oct 1 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-63 +- update from CVS + - fix __nscd_getgrouplist + - fix a typo in x86_64 pthread_mutex_timedwait fix + +* Fri Oct 1 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-62 +- update from CVS + - fix NPTL pthread_mutex_timedwait on i386/x86_64 (BZ #417) + +* Thu Sep 30 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-61 +- update from CVS + - some nscd fixes (#134193) + - cache initgroups in nscd (#132850) + - reread /etc/localtime in tzset () even if just mtime changed + (#133481) + - fix glob (#126460) + - another get_myaddress fix + +* Wed Sep 29 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-60 +- update from CVS + - fix get_myaddress (#133982) + - remove nonnull attribute from second utime argument (#133866) + - handle SIGSETXID the same way as SIGCANCEL in + sigaction/pthread_kill/sigwait/sigwaitinfo etc. + - add __extension__ to long long types in NPTL <bits/pthreadtypes.h> + +* Mon Sep 27 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-59 +- update from CVS + - fix BZ #151, #362, #381, #407 + - fdim fix for +inf/+inf (BZ #376) + +* Sun Sep 26 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-58 +- update from CVS + - vasprintf fix (BZ #346) + - gettext locking (BZ #322) +- change linuxthreads useldt.h inclusion login again, the last + one failed all linuxthreads FLOATING_STACKS tests + +* Sat Sep 25 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-57 +- update from CVS + - fix setuid in LD_ASSUME_KERNEL=2.2.5 libc (#133558) + - fix nis locking (#132204) + - RTLD_DEEPBIND support + - fix pthread_create bugs (BZ #401, #405) + +* Wed Sep 22 2004 Roland McGrath <roland@redhat.com> 2.3.3-56 +- migrated CVS to fedora-branch in sources.redhat.com glibc repository + - source tarballs renamed + - redhat/ moved to fedora/, some old cruft removed +- update from trunk + - some __nonnull annotations + +* Wed Sep 22 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-55 +- update from CVS + - set{re,e,res}[ug]id now affect the whole process in NPTL + - return EAGAIN instead of ENOMEM when not enough memory + in pthread_create + +* Fri Sep 17 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-54 +- update from CVS + - nscd getaddrinfo caching + +* Tue Sep 14 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-53 +- restore temporarily old definition of __P()/__PMT() + for third party apps + +* Tue Sep 14 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-52 +- update from CVS + - nscd bi-arch fix + - remove all uses of __P()/__PMT() from glibc headers +- update and reenable nscd SELinux patch +- remove libnss1* and libnss*.so.1 compatibility NSS modules + on IA-32, SPARC and Alpha + +* Fri Sep 10 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-51 +- update from CVS + - disable one of the malloc double free checks for non-contiguous + arenas where it doesn't have to be true even for non-broken + apps + +* Thu Sep 9 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-50 +- update from CVS + - pwd/grp/host loops with nscd speed up by sharing the + nscd cache r/o with applications + - inexpensive double free check in free(3) + - make NPTL pthread.h initializers usable even from C++ + (BZ #375) +- use atomic instructions even in i386 nscd on i486+ CPUs + (conditionally) + +* Sat Sep 3 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-49 +- update from CVS +- fix linuxthreads tst-cancel{[45],-static} + +* Fri Sep 3 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-48 +- update from CVS + - fix pthread_cond_destroy (BZ #342) + - fix fnmatch without FNM_NOESCAPE (BZ #361) + - fix ppc32 setcontext (BZ #357) +- add NPTL support for i386 glibc (only if run on i486 or higher CPU) +- add __NR_waitid defines for i386, x86_64 and sparc* + +* Tue Aug 31 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-47 +- update from CVS + - persistent nscd caching + - ppc64 32-bit atomicity fix + - fix x86-64 nptl-devel headers for -m32 compilation +- %%ghost /etc/ld.so.cache (#130597) +- edit /etc/ld.so.conf in glibc_post_upgrade if + include ld.so.conf.d/*.conf line is missing (#120588) +- ugly hacks for the IA-64 /emul braindamage (#124996, #128267) + +* Sat Aug 21 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-46 +- update from CVS + +* Thu Aug 19 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-45 +- update from CVS + - fix nss_compat's initgroups handling (#130363) + - fix getaddrinfo ai_canonname setting + +* Thu Aug 19 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-44 +- update from CVS + - add ip6-dotint resolv.conf option, make + no-ip6-dotint the default +- BuildPrereq libselinux-devel (#129946) +- on ppc64, build without dot symbols + +* Thu Aug 12 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-43 +- update from CVS + - remove debugging printout (#129747) + - make <sys/shm.h> usable in C++ (IT#45148) +- update RLIMIT_* constants in <bits/resource.h>, make + <sys/resource.h> POSIX compliant (#129740) + +* Wed Aug 11 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-42 +- fix last tzset () fixes, disable rereading of /etc/localtime + every time for now +- really enable SELinux support for NSCD + +* Wed Aug 11 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-41 +- update from CVS + - fread_unlocked/fwrite_unlocked macro fixes (BZ #309, #316) + - tzset () fixes (BZ #154) +- speed up pthread_rwlock_unlock on arches other than i386 and + x86_64 (#129455) +- fix compilation with -ansi (resp. -std=c89 or -std=c99) and + -D_XOPEN_SOURCE=[56]00 but no -D_POSIX_SOURCE* or -D_POSIX_C_SOURCE* + (BZ #284) +- add SELinux support for NSCD + +* Fri Aug 6 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-40 +- update from CVS + - change res_init to force all threads to re-initialize + resolver before they use it next time (#125712) + - various getaddrinfo and related fixes (BZ #295, #296) + - fix IBM{932,943} iconv modules (#128674) + - some nscd fixes (e.g. BZ #292) + - RFC 3678 support (Multicast Source Filters) +- handle /lib/i686/librtkaio-* in i386 glibc_post_upgrade + the same as /lib/i686/librt-* + +* Fri Jul 23 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-39 +- update from CVS + - conformance related changes in headers +- remove -finline-limit=2000 for GCC 3.4.x+ + +* Thu Jul 22 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-38 +- update from CVS + - fix res_init leaks + - fix newlocale races + - fix ppc64 setjmp +- fix strtold (BZ #274) + +* Fri Jul 16 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-37 +- update from CVS + - allow pthread_cancel in DSO destructors run at exit time +- fix pow{f,,l} on IA-32 and powl on x86-64 +- allow PIEs on IA-32 to have main in a shared library they depend on + +* Mon Jul 5 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-36 +- s390* .plt slot reduction +- fix pthread_rwlock_timedrdlock on x86_64 + +* Wed Jun 30 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-35 +- tweak spec file for the libpthread-0.61.so -> libpthread-2.3.3.so + NPTL changes + +* Wed Jun 30 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-34 +- update from CVS + - if_nameindex using preferably netlink + - printf_parsemb initialization fix + - NPTL version is now the same as glibc version + +* Mon Jun 28 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-33 +- update from CVS + - reread resolv.conf for nscd --invalidate=hosts + - fix F_GETLK/F_SETLK/F_SETLKW constants on x86_64 for + -m32 -D_FILE_OFFSET_BITS=64 compilations + - avoid calling non-existing fcntl64 syscall on ppc64 + +* Mon Jun 14 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-32 +- update from CVS + - FUTEX_CMP_REQUEUE support (fix pthread_cond_* deadlocks) + - fix backtrace in statically linked programs +- rebuilt with GCC 3.4, adjusted ulps and i386 <bits/string.h> + +* Fri May 28 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-31 +- update from CVS +- <bits/string2.h> and <bits/mathinline.h> changes for GCC 3.{2,4,5}+ +- make c_stubs buildable even with GCC 3.2.x (#123042) + +* Fri May 21 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-30 +- fix pthread_cond_wait on architectures other than IA-32 and + x86_64 + +* Thu May 20 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-29 +- use lib64 instead of lib on ia64 if %%{_lib} is defined to lib64 + +* Wed May 19 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-28 +- update from CVS + - FUTEX_REQUEUE fixes (#115349) + - SPARC GCC 3.4 build fix + - fix handling of undefined TLS symbols on IA32 (RELA only), + SPARC and SH + - regex translate fix + - speed up sprintf + - x86_64 makecontext alignment fix + - make POSIX sigpause the default sigpause, unless BSD sigpause + requested + +* Tue May 11 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-27 +- remove /lib64/tls/librtkaio-2.3.[23].so in glibc_post_upgrade + on x86-64, s390x and ppc64 instead of /lib/tls/librtkaio-2.3.[23].so +- build mq_{send,receive} with -fexceptions + +* Fri May 7 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-26 +- update from CVS + - fix <tgmath.h> + - fix memory leaks in nis, getifaddrs, etc. caused by incorrect + use of realloc +- remove /lib/{tls,i686}/librtkaio-2.3.[23].so in glibc_post_upgrade + and rerun ldconfig if needed, otherwise after glibc upgrade librt.so.1 + might be a stale symlink + +* Wed May 5 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-25 +- update from CVS +- disable FUTEX_REQUEUE (work around #115349) +- mq for sparc/sparc64/ia64 + +* Tue May 4 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-24 +- update from CVS + - define S_ISSOCK in -D_XOPEN_SOURCE=600 and S_I[FS]SOCK + plus F_[SG]ETOWN also in -D_XOPEN_SOURCE=500 (both + included already in XNS5) + - reorder dlopen checks, so that dlopening ET_REL objects + complains about != ET_DYN != ET_EXEC, not about phentsize + (#121606) + - fix strpbrk macro for GCC 3.4+ (BZ #130) + - fix <sys/sysctl.h> (BZ #140) + - sched_[gs]etaffinity documentation fix (BZ #131) + - fix sparc64 build (BZ #139) + - change linuxthreads back to use non-cancellable writes + to manager pipes etc. + - fix sem_timedwait return value in linuxthreads (BZ #133) + - ia64 unnecessary PLT relocs removal + +* Thu Apr 22 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-23 +- update from CVS + - fix *scanf + - fix shm_unlink, sem_unlink and mq_unlink errno values + - avoid memory leaks in error + - execstack fixes on s390 + +* Mon Apr 19 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-22 +- update from CVS + - mq and timer fixes +- rebuilt with binutils >= 2.15.90.0.3-2 to fix IA-64 statically + linked binaries +- fix linuxthreads librt.so on s390{,x}, so it is no longer DT_TEXTREL + +* Sat Apr 17 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-21 +- disable rtkaio +- update from CVS + - POSIX message passing support + - fixed SIGEV_THREAD support for POSIX timers + - fix free on non-malloced memory in syslog + - fix ffsl on some 64-bit arches + - fix sched_setaffinity on x86-64, ia64 + - fix ppc64 umount + - NETID_AUTHORITATIVE, SERVICES_AUTHORITATIVE support + - various NIS speedups + - fix fwrite with > 2GB sizes on 64-bit arches + - fix pthread_getattr_np guardsize reporting in NPTL +- report PLT relocations in ld.so and libc.so during the build + +* Fri Mar 25 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-20 +- update from CVS + - change NPTL PTHREAD_MUTEX_ADAPTIVE_NP mutexes to spin on SMP + - strtol speed optimization + - don't try to use certainly unimplemented syscalls on ppc64 +- kill -debug subpackage, move the libs to glibc-debuginfo{,-common} + into /usr/lib/debug/usr/%{_lib}/ directory +- fix c_stubs with gcc 3.4 +- move all the up to 3 builds into %%build scriptlet and + leave only installation in the %%install scriptlet + +* Mon Mar 22 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-19 +- update from CVS + - affinity API changes + +* Thu Mar 18 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-18 +- update from CVS + - fix ia64 iopl (#118591) + - add support for /etc/ld.so.conf.d/*.conf + - fix x86-64 LD_DEBUG=statistics +- fix hwcap handling when using ld.so.cache (#118518) + +* Mon Mar 15 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-17 +- update from CVS + - implement non-_l function on top of _l functions + +* Thu Mar 11 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-16 +- update from CVS +- fix s390{,x} TLS handling + +* Wed Mar 10 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-15 +- update from CVS + - special section for compatibility code + - make getpid () work even in vfork () child +- configure with --enable-bind-now to avoid lazy binding in ld.so + and libc.so + +* Fri Mar 5 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-14 +- update from CVS + - fix iconv -c (#117021) + - fix PIEs on sparc/sparc64 + - fix posix_fadvise on 64-bit architectures +- add locale-archive as %%ghost file (#117014) + +* Mon Mar 1 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-13 +- update from CVS + +* Fri Feb 27 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-12 +- update from CVS + +* Fri Feb 27 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-11 +- update from CVS + - fix ld.so when vDSO is randomized + +* Fri Feb 20 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-10 +- update from CVS + +* Fri Feb 20 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-9 +- update from CVS + +* Tue Feb 10 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-8 +- update from CVS + +* Tue Jan 27 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-7 +- update from CVS + - dl_iterate_phdr extension to signal number of added/removed + libraries +- fix PT_GNU_RELRO support on ppc* with prelinking + +* Fri Jan 23 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-6 +- rebuilt with fixed GCC on IA-64 + +* Thu Jan 22 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-5 +- fix PT_GNU_RELRO support + +* Wed Jan 21 2004 Jakub Jelinek <jakub@redhat.com> 2.3.3-4 +- update from CVS + - some further regex speedups + - fix re.translate handling in regex (#112869) + - change regfree to match old regex behaviour (what is freed + and clearing of freed pointers) + - fix accesses to unitialized memory in regex (#113507, #113425, + #113421) + - PT_GNU_RELRO support + +* Tue Dec 30 2003 Jakub Jelinek <jakub@redhat.com> 2.3.3-3 +- update from CVS + - fix pmap_set fd and memory leak (#112726) +- fix backreference handling in regex +- rebuilt under glibc without the above bug to fix + libc.so linker script (#112738) + +* Mon Dec 29 2003 Jakub Jelinek <jakub@redhat.com> 2.3.3-2 +- update from CVS + - faster getpid () in NPTL builds + - fix to make pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, ) + really disable cancellation (#112512) + - more regex fixes and speedups + - fix nextafter*/nexttoward* + - handle 6th syscall(3) argument on AMD64 + - handle memalign/posix_memalign in mtrace + - fix linuxthreads memory leak (#112208) + - remove throw () from cancellation points in linuxthreads (#112602) + - fix NPTL unregister_atfork + - fix unwinding through alternate signal stacks + +* Mon Dec 1 2003 Jakub Jelinek <jakub@redhat.com> 2.3.3-1 +- update from CVS + - 2.3.3 release + - lots of regex fixes and speedups (#110401) + - fix atan2 + - fix pshared condvars in NPTL + - fix pthread_attr_destroy for attributes created with + pthread_attr_init@GLIBC_2.0 +- for the time being, include both nb_NO* and no_NO* as locales + so that the distribution can catch up with the no_NO->nb_NO + transition +- add BuildPrereq texinfo (#110252) + +* Tue Nov 18 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-102 +- update from CVS + - fix getifaddrs (CAN-2003-0859) + - fix ftw fd leak + - fix linuxthreads sigaction (#108634) + - fix glibc 2.0 stdio compatibility + - fix uselocale (LC_GLOBAL_LOCALE) + - speed up stdio locking in non-threaded programs on IA-32 + - try to maintain correct order of cleanups between those + registered with __attribute__((cleanup)) + and with LinuxThreads style pthread_cleanup_push/pop (#108631) + - fix segfault in regex (#109606) + - fix RE_ICASE multi-byte handling in regex + - fix pthread_exit in libpthread.a (#109790) + - FTW_ACTIONRETVAL support + - lots of regex fixes and speedups + - fix ceill/floorl on AMD64 + +* Mon Oct 27 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-101 +- update from CVS + - fix ld.so --verify (and ldd) + +* Mon Oct 27 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-100 +- update from CVS + - fix sprof (#103727) + - avoid infinite loops in {,f}statvfs{,64} with hosed mounts file + - prevent dlopening of executables + - fix glob with GLOB_BRACE and without GLOB_NOESCAPE + - fix locale printing of word values on 64-bit big-endian arches + (#107846) + - fix getnameinfo and getaddrinfo with reverse IPv6 lookups + (#101261) + +* Wed Oct 22 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-99 +- update from CVS + - dl_iterate_phdr in libc.a on arches other than IA-64 + - LD_DEBUG=statistics prints number of relative relocations + - fix hwcap computation +- NPTL is now part of upstream glibc CVS +- include {st,xh,zu}_ZA{,.UTF-8} locales + +* Sat Oct 4 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-98 +- update from CVS + - fix close, pause and fsync (#105348) + - fix pthread_once on IA-32 +- implement backtrace () on IA-64, handle -fomit-frame-pointer + in AMD64 backtrace () (#90402) + +* Tue Sep 30 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-97 +- update from CVS + - fix <sys/sysmacros.h> with C++ or -ansi or -pedantic C + - fix mknod/ustat return value when given bogus device number (#105768) + +* Fri Sep 26 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-96 +- rebuilt + +* Fri Sep 26 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-95 +- fix IA-64 getcontext + +* Thu Sep 25 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-94 +- update from CVS +- fix syslog with non-C non-en_* locales (#61296, #104979) +- filter GLIBC_PRIVATE symbols from glibc provides +- fix NIS+ + +* Thu Sep 25 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-93 +- update from CVS +- assume 2.4.21 kernel features on RHEL/ppc*, so that + {make,set,get,swap}context works +- backout execstack support for RHEL +- build rtkaio on amd64 too + +* Wed Sep 24 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-92 +- update from CVS + - execstack/noexecstack support + - build nscd as PIE +- move __libc_stack_end back to @GLIBC_2.1 +- build against elfutils >= 0.86 to fix stripping on s390x + +* Mon Sep 22 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-91 +- rebuilt + +* Mon Sep 22 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-90 +- update from CVS + - NPTL locking change (#102682) +- don't jump around lock on amd64 + +* Thu Sep 18 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-89 +- fix open_memstream/syslog (#104661) + +* Thu Sep 18 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-88 +- update from CVS + - retrieve affinity in pthread_getattr_np + - fix pthread_attr_[gs]etaffinity_np + - handle hex and octal in wordexp + +* Wed Sep 17 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-87 +- update from CVS + - truncate instead of round in utimes when utimes syscall is not available + - don't align stack in every glibc function unnecessarily on IA-32 + - make sure threads have their stack 16 byte aligned on IA-32 + - move sched_[sg]etaffinity to GLIBC_2.3.3 symbol version (#103231) + - fix pthread_getattr_np for the initial thread (#102683) + - avoid linuxthreads signal race (#104368) +- ensure all gzip invocations are done with -n option + +* Fri Sep 12 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-86 +- update from CVS +- avoid linking in libgcc_eh.a unnecessarily +- change ssize_t back to long int on s390 -m31, unless + gcc 2.95.x is used + +* Wed Sep 10 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-85 +- update from CVS + - fix IA-64 memccpy (#104114) + +* Tue Sep 9 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-84 +- update from CVS + - undo broken amd64 signal context changes + +* Tue Sep 9 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-83 +- update from CVS +- change *nlink_t, *ssize_t and *intptr_t types on s390 -m31 to + {unsigned,} int +- change *u_quad_t, *quad_t, *qaddr_t, *dev_t, *ino64_t, *loff_t, + *off64_t, *rlim64_t, *blkcnt64_t, *fsblkcnt64_t, *fsfilcnt64_t + on 64-bit arches from {unsigned,} long long int {,*} to + {unsigned,} long int {,*} to restore binary compatibility + for C++ functions using these types as arguments + +* Sun Sep 7 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-82 +- rebuilt + +* Sat Sep 6 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-81 +- update from CVS + - fix tc[gs]etattr/cf[gs]et[io]speed on ppc (#102732) + - libio fixes + +* Thu Sep 4 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-80 +- update from CVS + - fix IA-64 cancellation when mixing __attribute__((cleanup ())) + and old-style pthread_cleanup_push cleanups + +* Tue Sep 2 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-79 +- updated from CVS + - lots of cancellation fixes + - fix posix_fadvise* on ppc32 + - TLS layout fix + - optimize stdio cleanups (#103354) + - sparcv9 NPTL + - include sigset, sighold, sigrelse, sigpause and sigignore prototypes + in signal.h even if -D_XOPEN_SOURCE_EXTENDED (#103269) + - fix svc_getreqset on 64-bit big-endian arches + - return ENOSYS in linuxthreads pthread_barrierattr_setpshared for + PTHREAD_PROCESS_SHARED + - add pthread_cond_timedwait stubs to libc.so (#102709) +- split glibc-devel into glibc-devel and glibc-headers to ensure + amd64 /usr/include always wins on amd64/i386 bi-arch installs +- increase PTHREAD_STACK_MIN on alpha, ia64 and sparc* +- get rid of __syscall_* prototypes and stubs in sysdeps/unix/sysv/linux +- run make check also with linuxthreads (on IA-32 non-FLOATING_STACKS) + ld.so and NPTL (on IA-32 also FLOATING_STACKS linuxthreads) libraries + and tests + +* Tue Aug 25 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-78 +- include dl-osinfo.h only in glibc-debuginfo-2*.rpm, not + in glibc-debuginfo-common* + +* Mon Aug 25 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-77 +- update from CVS + - fix glibc 2.0 libio compatibility (#101385) + - fix ldconfig with /usr/lib/lib*.so symlinks (#102853) + - fix assert.h (#102916, #103017) + - make ld.so.cache identical between IA-32 and AMD64 (#102887) + - fix static linking of large IA-64 binaries (#102586) +- avoid using floating point regs in lazy binding code on ppc64 (#102763) + +* Fri Aug 22 2003 Roland McGrath <roland@redhat.com> 2.3.2-76 +- add td_thr_tls_get_addr changes missed in initial nptl_db rewrite + +* Sun Aug 17 2003 Roland McGrath <roland@redhat.com> 2.3.2-74 +- nptl_db rewrite not yet in CVS + +* Thu Aug 14 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-72 +- update from CVS + - fix rtkaio aio_fsync{,64} + - update rtkaio for !BROKEN_THREAD_SIGNALS + - fix assert macro when used on pointers + +* Wed Aug 13 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-71 +- update from CVS + +* Tue Aug 12 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-70 +- update from CVS +- disable CLONE_STOPPED for now until it is resolved +- strip crt files +- fix libio on arches with no < GLIBC_2.2 support (#102102, #102105) +- fix glibc-debuginfo to include all nptl and nptl_db sources + +* Thu Aug 7 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-69 +- update from CVS + - fix pthread_create@GLIBC_2.0 (#101767) +- __ASSUME_CLONE_STOPPED on all arches but s390* in RHEL + +* Sun Aug 3 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-68 +- update from CVS + - only use CLONE_STOPPED if kernel supports it, fix setting of thread + explicit scheduling (#101457) + +* Fri Aug 1 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-67 +- update from CVS + - fix utimes and futimes if kernel doesn't support utimes syscall + - fix s390 ssize_t type + - fix dlerror when called before any dlopen/dlsym + - update IA-64 bits/sigcontext.h (#101344) + - various warning fixes + - fix pthread.h comment typos (#101363) + +* Wed Jul 30 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-66 +- update from CVS +- fix dlopen of libraries using TLS IE/LE models + +* Tue Jul 29 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-65 +- update from CVS + - fix timer_create + - use __extension__ before long long typedefs in <bits/types.h> (#100718) + +* Mon Jul 28 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-64 +- update from CVS + - fix wcpncpy (#99462) + - export _res@GLIBC_2.0 even from NPTL libc.so (__res_state () + unlike __errno_location () or __h_errno_location () was introduced + in glibc 2.2) + - fix zic bug on 64-bit platforms + - some TLS handling fixes + - make ldconfig look into alternate ABI dirs by default (#99402) +- move %{_datadir}/zoneinfo to tzdata package, so that it can be + errataed separately from glibc +- new add-on - rtkaio +- prereq libgcc, as glibc now relies on libgcc_s.so.1 for pthread_cancel + +* Tue Jul 15 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-63 +- fix thread cancellation on ppc64 + +* Sat Jul 12 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-62 +- update from CVS + - fix thread cancellation on ppc32, s390 and s390x + +* Thu Jul 10 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-61 +- update from CVS + - build libc_nonshared.a with -fPIC instead of -fpic +- fix ppc64 PIE support +- add cfi directives to NPTL sysdep-cancel.h on ppc/ppc64/s390/s390x + +* Tue Jul 8 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-60 +- update from CVS + +* Thu Jul 3 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-59 +- update from CVS +- on IA-64 use different symbols for cancellation portion of syscall + handlers to make gdb happier + +* Thu Jun 26 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-58 +- update from CVS + - nss_compat supporting LDAP etc. + +* Tue Jun 24 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-57 +- update from CVS + +* Thu Jun 19 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-56 +- fix condvars and semaphores in ppc* NPTL +- fix test-skeleton.c reporting of timed-out tests (#91269) +- increase timeouts for tests during make check + +* Wed Jun 18 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-55 +- make ldconfig default to both /lib+/usr/lib and /lib64+/usr/lib64 + on bi-ABI architectures (#97557) +- disable FUTEX_REQUEUE on ppc* temporarily + +* Wed Jun 18 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-54 +- update from CVS +- fix glibc_post_upgrade on ppc + +* Tue Jun 17 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-53 +- update from CVS +- fix localedef (#90659) +- tweak linuxthreads for librt cancellation + +* Mon Jun 16 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-52 +- update from CVS + +* Thu Jun 12 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-51 +- update from CVS +- fix <gnu/stubs.h> (#97169) + +* Wed Jun 11 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-50 +- update from CVS + +* Tue Jun 10 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-49 +- update from CVS + - fix pthread_cond_signal on IA-32 (#92080, #92253) + - fix setegid (#91567) +- don't prelink -R libc.so on any architecture, it prohibits + address randomization + +* Fri Jun 5 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-48 +- update from CVS + - fix IA-64 NPTL build + +* Thu Jun 5 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-47 +- update from CVS +- PT_GNU_STACK segment in binaries/executables and .note.GNU-stack + section in *.[oa] + +* Sun Jun 1 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-46 +- update from CVS +- enable NPTL on AMD64 +- avoid using trampolines in localedef + +* Fri May 29 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-45 +- enable NPTL on IA-64 + +* Fri May 29 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-44 +- update from CVS +- enable NPTL on s390 and s390x +- make __init_array_start etc. symbols in elf-init.oS hidden undefined + +* Thu May 29 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-43 +- update from CVS + +* Fri May 23 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-42 +- update from CVS + +* Tue May 20 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-41 +- update from CVS +- use NPTL libs if uname -r contains nptl substring or is >= 2.5.69 + or set_tid_address syscall is available instead of checking + AT_SYSINFO dynamic tag + +* Thu May 15 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-40 +- update from CVS + +* Wed May 14 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-39 +- update from CVS + - fix for prelinking of libraries with no dependencies + +* Tue May 13 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-38 +- update from CVS +- enable NPTL on ppc and ppc64 + +* Tue May 6 2003 Matt Wilson <msw@redhat.com> 2.3.2-37 +- rebuild + +* Sun May 4 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-36 +- update from CVS + +* Sat May 3 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-35 +- update from CVS + - make -jN build fixes + +* Fri May 2 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-34 +- update from CVS +- avoid using trampolines in iconvconfig for now + +* Sat Apr 26 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-33 +- update from CVS + +* Fri Apr 25 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-32 +- update from CVS +- more ppc TLS fixes + +* Wed Apr 23 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-31 +- update from CVS + - nscd fixes + - fix Bahrain spelling (#56298) + - fix Ukrainian collation (#83973) + - accept trailing spaces in /etc/ld.so.conf (#86032) + - perror fix (#85994) + - fix localedef (#88978) + - fix getifaddrs (#89026) + - fix strxfrm (#88409) +- fix ppc TLS +- fix getaddrinfo (#89448) +- don't print warning about errno, h_errno or _res if + LD_ASSUME_KERNEL=2.4.1 or earlier + +* Tue Apr 15 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-30 +- update from CVS +- fix prelink on ppc32 +- add TLS support on ppc32 and ppc64 +- make sure on -m64 arches all helper binaries are built with this + option + +* Mon Apr 14 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-29 +- update from CVS + - fix strxfrm (#88409) +- use -m64 -mno-minimal-toc on ppc64 +- conflict with kernels < 2.4.20 on ppc64 and < 2.4.0 on x86_64 +- link glibc_post_upgrade against newly built libc.a + +* Sun Apr 13 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-28 +- update from CVS + - fix NPTL pthread_detach and already terminated, but not yet + joined thread (#88219) + - fix bug-regex4 testcase (#88118) + - reenable prelink support broken in 2.3.2-13 + - fix register_printf_function (#88052) + - fix double free with fopen using ccs= (#88056) + - fix potential access below $esp in {set,swap}context (#88093) + - fix buffer underrun in gencat -H (#88099) + - avoid using unitialized variable in tst-tgmath (#88101) + - fix gammal (#88104) + - fix iconv -c + - fix xdr_string (PR libc/4999) + - fix /usr/lib/nptl/librt.so symlink + - avoid running NPTL cleanups twice in some cases + - unblock __pthread_signal_cancel in linuxthreads, so that + linuxthreads threaded programs work correctly if spawned + from NPTL threaded programs + - fix sysconf _SC_{NPROCESSORS_{CONF,ONLN},{,AV}PHYS_PAGES} +- remove /lib/i686 directory before running ldconfig in glibc post + during i686 -> i386 glibc "upgrades" (#88456) + +* Wed Apr 2 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-22 +- update from CVS + - add pthread_atfork to libpthread.a + +* Tue Apr 1 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-21 +- update from CVS +- make sure linuxthreads pthread_mutex_lock etc. is not a cancellation + point + +* Sat Mar 29 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-20 +- update from CVS +- if kernel >= 2.4.1 doesn't support NPTL, fall back to + /lib/i686 libs on i686, not stright to /lib + +* Fri Mar 28 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-19 +- update from CVS + - timers fixes + +* Thu Mar 27 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-18 +- update from CVS +- fix NPTL pthread_cond_timedwait +- fix sysconf (_SC_MONOTONIC_CLOCK) +- use /%%{_lib}/tls instead of /lib/tls on x86-64 +- add /%{_lib}/tls/librt*so* and /%{_lib}/i686/librt*so* +- display content of .out files for all make check failures + +* Wed Mar 26 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-17 +- update from CVS + - kernel POSIX timers support + +* Sat Mar 22 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-16 +- update from CVS + - export __fork from glibc again +- fix glibc-compat build in NPTL +- fix c_stubs +- fix some more atomic.h problems +- don't check abi in glibc-compat libs + +* Fri Mar 21 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-15 +- update from CVS +- build glibc-compat (for glibc 2.0 compatibility) and c_stubs add-ons +- condrestart sshd in glibc_post_upgrade so that the user can + log in remotely and handle the rest (#86339) +- fix a typo in glibc_post_upgrade on sparc + +* Tue Mar 18 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-14 +- update from CVS +- change i686/athlon libc.so.6 base to 0x00e80000 + +* Mon Mar 17 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-13 +- update from CVS + - hopefully last fix for condvar problems + +* Fri Mar 14 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-12 +- fix bits/syscall.h creation on x86-64 + +* Thu Mar 13 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-11 +- update from CVS + +* Wed Mar 12 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-10 +- update from CVS + +* Tue Mar 11 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-9 +- update from CVS +- fix glibc-debug description (#85111) +- make librt.so a symlink again, not linker script + +* Tue Mar 4 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-8 +- update from CVS +- remove the workarounds for broken software accessing GLIBC_PRIVATE + symbols + +* Mon Mar 3 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-7 +- update from CVS + +* Sun Mar 2 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-6 +- fix TLS IE/LE model handling in dlopened libraries + on TCB_AT_TP arches + +* Thu Feb 25 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-5 +- update from CVS + +* Tue Feb 25 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-4 +- update from CVS + +* Mon Feb 24 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-3 +- update from CVS +- only warn about errno, h_errno or _res for binaries, never + libraries +- rebuilt with gcc-3.2.2-4 to use direct %gs TLS access insn sequences + +* Sun Feb 23 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-2 +- update from CVS + +* Sat Feb 22 2003 Jakub Jelinek <jakub@redhat.com> 2.3.2-1 +- update from CVS + +* Thu Feb 20 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-51 +- update from CVS + +* Wed Feb 19 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-50 +- update from CVS + +* Wed Feb 19 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-49 +- update from CVS +- remove nisplus and nis from the default nsswitch.conf (#67401, #9952) + +* Tue Feb 18 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-48 +- update from CVS + +* Sat Feb 15 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-47 +- update from CVS + +* Fri Feb 14 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-46 +- update from CVS + - pthread_cond* NPTL fixes, new NPTL testcases + +* Thu Feb 13 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-45 +- update from CVS +- include also linuxthreads FLOATING_STACKS libs on i686 and athlon: + LD_ASSUME_KERNEL=2.2.5 to LD_ASSUME_KERNEL=2.4.0 is non-FLOATING_STACKS lt, + LD_ASSUME_KERNEL=2.4.1 to LD_ASSUME_KERNEL=2.4.19 is FLOATING_STACKS lt, + later is NPTL +- enable TLS on alpha/alphaev6 +- add BuildPreReq: /usr/bin/readlink + +* Tue Feb 11 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-44 +- update from CVS + - pthread_once fix + +* Mon Feb 10 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-43 +- update from CVS +- vfork fix on s390 +- rebuilt with binutils 2.13.90.0.18-5 so that accesses to errno + don't bind locally (#83325) + +* Thu Feb 06 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-42 +- update from CVS +- fix pthread_create after vfork+exec in linuxthreads + +* Wed Feb 05 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-41 +- update from CVS + +* Thu Jan 30 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-40 +- update from CVS + +* Wed Jan 29 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-39 +- update from CVS +- enable TLS on s390{,x} and sparc{,v9} + +* Fri Jan 17 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-38 +- update from CVS +- initialize __environ in glibc_post_upgrade to empty array, + so that it is not NULL +- compat symlink for s390x /lib/ld64.so.1 +- enable glibc-profile on x86-64 +- only include libNoVersion.so on IA-32, Alpha and Sparc 32-bit + +* Thu Jan 16 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-37 +- update from CVS + - nscd fixes, *scanf fix +- fix %%nptlarches noarch build (#81909) +- IA-64 TLS fixes + +* Tue Jan 14 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-36 +- update from CVS +- rework -debuginfo subpackage, add -debuginfo-common + subpackage on IA-32, Alpha and Sparc (ie. auxiliary arches) +- fix vfork in libc.a on PPC32, Alpha, Sparc +- fix libio locks in linuxthreads libc.so if libpthread.so + is dlopened later (#81374) + +* Mon Jan 13 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-35 +- update from CVS + - dlclose bugfixes +- fix NPTL libpthread.a +- fix glibc_post_upgrade on several arches + +* Sat Jan 11 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-34 +- update from CVS +- TLS support on IA-64 + +* Wed Jan 8 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-33 +- fix vfork in linuxthreads (#81377, #81363) + +* Tue Jan 7 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-32 +- update from CVS +- don't use TLS libs if kernel doesn't set AT_SYSINFO + (#80921, #81212) +- add ntp_adjtime on alpha (#79996) +- fix nptl_db (#81116) + +* Sun Jan 5 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-31 +- update from CVS +- support all architectures again + +* Fri Jan 3 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-30 +- fix condvar compatibility wrappers +- add ugly hack to use non-TLS libs if a binary is seen + to have errno, h_errno or _res symbols in .dynsym + +* Fri Jan 3 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-29 +- update from CVS + - fixes for new condvar + +* Thu Jan 2 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-28 +- new NPTL condvar implementation plus related linuxthreads + symbol versioning updates + +* Thu Jan 2 2003 Jakub Jelinek <jakub@redhat.com> 2.3.1-27 +- update from CVS +- fix #include <sys/stat.h> with -D_BSD_SOURCE or without + feature set macros +- make *sigaction, sigwait and raise the same between + -lpthread -lc and -lc -lpthread in linuxthreads builds + +* Tue Dec 31 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-26 +- fix dlclose + +* Sun Dec 29 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-25 +- enable sysenter by default for now +- fix endless loop in ldconfig + +* Sat Dec 28 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-24 +- update from CVS + +* Fri Dec 27 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-23 +- update from CVS + - fix ptmalloc_init after clearenv (#80370) + +* Sun Dec 22 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-22 +- update from CVS +- add IA-64 back +- move TLS libraries from /lib/i686 to /lib/tls + +* Thu Dec 19 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-21 +- system(3) fix for linuxthreads +- don't segfault in pthread_attr_init from libc.so +- add cancellation tests from nptl to linuxthreads + +* Wed Dec 18 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-20 +- fix up lists of exported symbols + their versions + from the libraries + +* Wed Dec 18 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-19 +- fix --with-tls --enable-kernel=2.2.5 libc on IA-32 + +* Wed Dec 18 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-18 +- update from CVS + - fix NPTL hanging mozilla + - initialize malloc in mALLOPt (fixes problems with squid, #79957) + - make linuxthreads work with dl_dynamic_weak 0 + - clear dl_dynamic_weak everywhere + +* Tue Dec 17 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-17 +- update from CVS + - NPTL socket fixes, flockfile/ftrylockfile/funlockfile fix + - kill -debug sub-package, rename -debug-static to -debug + - clear dl_dynamic_weak for NPTL + +* Mon Dec 16 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-16 +- fix <bits/mathinline.h> and <bits/nan.h> for C++ +- automatically generate NPTL libpthread wrappers + +* Mon Dec 16 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-15 +- update from CVS + - all functions which need cancellation should now be cancellable + both in libpthread.so and libc.so + - removed @@GLIBC_2.3.2 cancellation wrappers + +* Fri Dec 13 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-14 +- update from CVS + - replace __libc_lock_needed@GOTOFF(%ebx) with + %gs:offsetof(tcbhead_t, multiple_threads) + - start of new NPTL cancellation wrappers + +* Thu Dec 12 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-13 +- update from CVS +- use inline locks in malloc + +* Tue Dec 10 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-12 +- update from CVS + - support LD_ASSUME_KERNEL=2.2.5 in statically linked programs + +* Mon Dec 9 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-11 +- update from CVS +- rebuilt with gcc-3.2.1-2 + +* Fri Dec 6 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-10 +- update from CVS +- non-nptl --with-tls --without-__thread FLOATING_STACKS libpthread + should work now +- faster libc locking when using nptl +- add OUTPUT_FORMAT to linker scripts +- fix x86_64 sendfile (#79111) + +* Wed Dec 4 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-9 +- update from CVS + - RUSCII support (#78906) +- for nptl builds add BuildRequires +- fix byteswap.h for non-gcc (#77689) +- add nptl-devel package + +* Tue Dec 3 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-8 +- update from CVS + - make --enable-kernel=2.2.5 --with-tls --without-__thread + ld.so load nptl and other --with-__thread libs +- disable nptl by default for now + +* Wed Nov 27 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-7 +- update from CVS +- restructured redhat/Makefile and spec, so that src.rpm contains + glibc-<date>.tar.bz2, glibc-redhat-<date>.tar.bz2 and glibc-redhat.patch +- added nptl + +* Fri Nov 8 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-6 +- update from CVS + - even more regex fixes +- run sed testsuite to check glibc regex + +* Thu Oct 24 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-5 +- fix LD_DEBUG=statistics and LD_TRACE_PRELINKING in programs + using libpthread.so. + +* Thu Oct 24 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-4 +- update from CVS + - fixed %a and %A in *printf (#75821) + - fix re_comp memory leaking (#76594) + +* Tue Oct 22 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-3 +- update from CVS + - some more regex fixes +- fix libpthread.a (#76484) +- fix locale-archive enlarging + +* Fri Oct 18 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-2 +- update from CVS + - don't need to use 128K of stacks for DNS lookups + - regex fixes + - updated timezone data e.g. for this year's Brasil DST + changes + - expand ${LIB} in RPATH/RUNPATH/dlopen filenames + +* Fri Oct 11 2002 Jakub Jelinek <jakub@redhat.com> 2.3.1-1 +- update to 2.3.1 final + - support really low thread stack sizes (#74073) +- tzdata update + +* Wed Oct 9 2002 Jakub Jelinek <jakub@redhat.com> 2.3-2 +- update from CVS + - handle low stack limits + - move s390x into */lib64 + +* Thu Oct 3 2002 Jakub Jelinek <jakub@redhat.com> 2.3-1 +- update to 2.3 final + - fix freopen on libstdc++ <= 2.96 stdin/stdout/stderr (#74800) + +* Sun Sep 29 2002 Jakub Jelinek <jakub@redhat.com> 2.2.94-3 +- don't prelink -r libc.so on ppc/x86-64/sparc*, it doesn't + speed things up, because they are neither REL arches, nor + ELF_MACHINE_REL_RELATIVE +- fix sparc64 build + +* Sun Sep 29 2002 Jakub Jelinek <jakub@redhat.com> 2.2.94-2 +- update from CVS + +* Sat Sep 28 2002 Jakub Jelinek <jakub@redhat.com> 2.2.94-1 +- update from CVS +- prelink on ppc and x86-64 too +- don't remove ppc memset +- instead of listing on which arches to remove glibc-compat + list where it should stay + +* Fri Sep 6 2002 Jakub Jelinek <jakub@redhat.com> 2.2.93-5 +- fix wcsmbs functions with invalid character sets (or malloc + failures) +- make sure __ctype_b etc. compat vars are updated even if + they are copy relocs in the main program + +* Thu Sep 5 2002 Jakub Jelinek <jakub@redhat.com> 2.2.93-4 +- fix /lib/libnss1_dns.so.1 (missing __set_h_errno definition + leading to unresolved __set_h_errno symbol) + +* Wed Sep 4 2002 Jakub Jelinek <jakub@redhat.com> 2.2.93-3 +- security fix - increase dns-network.c MAXPACKET to at least + 65536 to avoid buffer overrun. Likewise glibc-compat + dns-{host,network}.c. + +* Tue Sep 3 2002 Jakub Jelinek <jakub@redhat.com> 2.2.93-2 +- temporarily add back __ctype_b, __ctype_tolower and __ctype_toupper to + libc.a and export them as @@GLIBC_2.0 symbols, not @GLIBC_2.0 + from libc.so - we have still lots of .a libraries referencing + __ctype_{b,tolower,toupper} out there... + +* Tue Sep 3 2002 Jakub Jelinek <jakub@redhat.com> 2.2.93-1 +- update from CVS + - 2.2.93 release + - use double instead of single indirection in isXXX macros + - per-locale wcsmbs conversion state + +* Sat Aug 31 2002 Jakub Jelinek <jakub@redhat.com> 2.2.92-2 +- update from CVS + - fix newlocale/duplocale/uselocale +- disable profile on x86_64 for now + +* Sat Aug 31 2002 Jakub Jelinek <jakub@redhat.com> 2.2.92-1 +- update from CVS + - 2.2.92 release + - fix gettext after uselocale + - fix locales in statically linked threaded programs + - fix NSS + +* Thu Aug 29 2002 Jakub Jelinek <jakub@redhat.com> 2.2.91-1 +- update from CVS + - 2.2.91 release + - fix fd leaks in locale-archive reader (#72043) +- handle EROFS in build-locale-archive gracefully (#71665) + +* Wed Aug 28 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-27 +- update from CVS + - fix re_match (#72312) +- support more than 1024 threads + +* Fri Aug 23 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-26 +- update from CVS + - fix i386 build + +* Thu Aug 22 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-25 +- update from CVS + - fix locale-archive loading hang on some (non-primary) locales + (#72122, #71878) + - fix umount problems with locale-archives when /usr is a separate + partition (#72043) +- add LICENSES file + +* Fri Aug 16 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-24 +- update from CVS + - only mmap up to 2MB of locale-archive on 32-bit machines + initially + - fix fseek past end + fread segfault with mmaped stdio +- include <sys/debugreg.h> which is mistakenly not included + in glibc-devel on IA-32 + +* Fri Aug 16 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-23 +- don't return normalized locale name in setlocale when using + locale-archive + +* Thu Aug 15 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-22 +- update from CVS + - optimize for primary system locale +- localedef fixes (#71552, #67705) + +* Wed Aug 14 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-21 +- fix path to locale-archive in libc reader +- build locale archive at glibc-common %post time +- export __strtold_internal and __wcstold_internal on Alpha again +- workaround some localedata problems + +* Tue Aug 13 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-20 +- update from CVS +- patch out set_thread_area for now + +* Fri Aug 9 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-19 +- update from CVS +- GB18030 patch from Yu Shao +- applied Debian patch for getaddrinfo IPv4 vs. IPv6 +- fix regcomp (#71039) + +* Sun Aug 4 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-18 +- update from CVS +- use /usr/sbin/prelink, not prelink (#70376) + +* Thu Jul 25 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-17 +- update from CVS + +* Thu Jul 25 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-16 +- update from CVS + - ungetc fix (#69586) + - fseek errno fix (#69589) + - change *etrlimit prototypes for C++ (#68588) +- use --without-tls instead of --disable-tls + +* Thu Jul 11 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-15 +- set nscd user's shell to /sbin/nologin (#68369) +- fix glibc-compat buffer overflows (security) +- buildrequire prelink, don't build glibc's own copy of it (#67567) +- update from CVS + - regex fix (#67734) + - fix unused warnings (#67706) + - fix freopen with mmap stdio (#67552) + - fix realloc (#68499) + +* Tue Jun 25 2002 Bill Nottingham <notting@redhat.com> 2.2.90-14 +- update from CVS + - fix argp on long words + - update atime in libio + +* Sat Jun 22 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-13 +- update from CVS + - a thread race fix + - fix readdir on invalid dirp + +* Wed Jun 19 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-12 +- update from CVS + - don't use __thread in headers +- fix system(3) in threaded apps +- update prelink, so that it is possible to prelink -u libc.so.6.1 + on Alpha + +* Fri Jun 7 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-11 +- update from CVS + - fix __moddi3 (#65612, #65695) + - fix ether_line (#64427) +- fix setvbuf with mmap stdio (#65864) +- --disable-tls for now, waiting for kernel +- avoid duplication of __divtf3 etc. on IA-64 +- make sure get*ent_r and _IO_wfile_jumps are exported (#62278) + +* Tue May 21 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-10 +- update from CVS + - fix Alpha pthread bug with gcc 3.1 + +* Fri Apr 19 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-35 +- fix nice + +* Mon Apr 15 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-34 +- add relocation dependencies even for weak symbols (#63422) +- stricter check_fds check for suid/sgid binaries +- run make check at %%install time + +* Sat Apr 13 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-33 +- handle Dec 31 1969 in mktime for timezones west of GMT (#63369) +- back out do-lookup.h change (#63261, #63305) +- use "memory" clobber instead all the fancy stuff in i386/i686/bits/string.h + since lots of compilers break on it +- fix sparc build with gcc 3.1 +- fix spec file for athlon + +* Tue Apr 9 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-32 +- fix debugging of threaded apps (#62804) +- fix DST for Estonia (#61494) +- document that pthread_mutexattr_?etkind_np are deprecated + and pthread_mutexattr_?ettype should be used instead in man + pages (#61485) +- fix libSegFault.so undefined externals + +* Fri Apr 5 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-31 +- temporarily disable prelinking ld.so, as some statically linked + binaries linked against debugging versions of old glibcs die on it + (#62352) +- fix <semaphore.h> for -std=c99 (#62516) +- fix ether_ntohost segfault (#62397) +- remove in glibc_post_upgrade on i386 all /lib/i686/libc-*.so, + /lib/i686/libm-*.so and /lib/i686/libpthread-*.so, not just current + version (#61633) +- prelink -r on alpha too + +* Thu Mar 28 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-30 +- update GB18030 iconv module (Yu Shao) + +* Tue Mar 26 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-29 +- features.h fix + +* Tue Mar 26 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-28 +- update from CVS + - fix nscd with huge groups + - fix nis to not close fds it shouldn't +- rebuilt against newer glibc-kernheaders to use the correct + PATH_MAX +- handle .athlon.rpm glibc the same way as .i686.rpm +- add a couple of .ISO-8859-15 locales (#61922) +- readd temporarily currencies which were superceeded by Euro + into the list of accepted currencies by localedef to make + standard conformance testsuites happy +- temporarily moved __libc_waitpid back to make Sun JDK happy +- use old malloc code +- prelink i686/athlon ld.so and prelink -r i686/athlon libc.so + +* Thu Mar 14 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-27 +- update from CVS + - fix DST handling for southern hemisphere (#60747) + - fix daylight setting for tzset (#59951) + - fix ftime (#60350) + - fix nice return value + - fix a malloc segfault +- temporarily moved __libc_wait, __libc_fork and __libc_stack_end + back to what they used to be exported at +- censorship (#60758) + +* Thu Feb 28 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-26 +- update from CVS +- use __attribute__((visibility(...))) if supported, use _rtld_local + for ld.so only objects +- provide libc's own __{,u}{div,mod}di3 + +* Wed Feb 27 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-25 +- switch back to 2.2.5, mmap stdio needs work + +* Mon Feb 25 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-8 +- fix two other mmap stdio bugs (#60228) + +* Thu Feb 21 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-7 +- fix yet another mmap stdio bug (#60145) + +* Tue Feb 19 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-6 +- fix mmap stdio bug (seen on ld as File truncated error, #60043) +- apply Andreas Schwab's fix for pthread sigwait +- remove /lib/i686/ libraries in glibc_post_upgrade when + performing i386 glibc install + +* Thu Feb 14 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-5 +- update to CVS +- added glibc-utils subpackage +- disable autoreq in glibc-debug +- readd %%lang() to locale files + +* Fri Feb 7 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-4 +- update to CVS +- move glibc private symbols to GLIBC_PRIVATE symbol version + +* Wed Jan 9 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-3 +- fix a sqrt bug on alpha which caused SHN_UNDEF $__full_ieee754_sqrt..ng + symbol in libm + +* Tue Jan 8 2002 Jakub Jelinek <jakub@redhat.com> 2.2.90-2 +- add debug-static package + +* Mon Dec 31 2001 Jakub Jelinek <jakub@redhat.com> 2.2.90-1 +- update from CVS +- remove -D__USE_STRING_INLINES +- add debug subpackage to trim glibc and glibc-devel size + +* Wed Oct 3 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-19 +- fix strsep + +* Fri Sep 28 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-18 +- fix a ld.so bug with duplicate searchlists in l_scope +- fix erfcl(-inf) +- turn /usr/lib/librt.so into linker script + +* Wed Sep 26 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-17 +- fix a ld.so lookup bug after lots of dlopen calls +- fix CMSG_DATA for non-gcc non-ISOC99 compilers (#53984) +- prelinking support for Sparc64 + +* Fri Sep 21 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-16 +- update from CVS to fix DT_SYMBOLIC +- prelinking support for Alpha and Sparc + +* Tue Sep 18 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-15 +- update from CVS + - linuxthreads now retries if -1/EINTR is returned from + reading or writing to thread manager pipe (#43742) +- use DT_FILTER in librt.so (#53394) + - update glibc prelink patch so that it handles filters +- fix timer_* with SIGEV_NONE (#53494) +- make glibc_post_upgrade work on PPC (patch from Franz Sirl) + +* Mon Sep 10 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-14 +- fix build on sparc32 +- 2.2.4-13 build for some reason missed some locales + on alpha/ia64 + +* Mon Sep 3 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-13 +- fix iconvconfig + +* Mon Sep 3 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-12 +- add fam to /etc/rpc (#52863) +- fix <inttypes.h> for C++ (#52960) +- fix perror + +* Mon Aug 27 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-11 +- fix strnlen(x, -1) + +* Mon Aug 27 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-10 +- doh, <bits/libc-lock.h> should only define __libc_rwlock_t + if __USE_UNIX98. + +* Mon Aug 27 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-9 +- fix bits/libc-lock.h so that gcc can compile +- fix s390 build + +* Fri Aug 24 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-8 +- kill stale library symlinks in ldconfig (#52350) +- fix inttypes.h for G++ < 3.0 +- use DT_REL*COUNT + +* Wed Aug 22 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-7 +- fix strnlen on IA-64 (#50077) + +* Thu Aug 16 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-6 +- glibc 2.2.4 final +- fix -lpthread -static (#51672) + +* Fri Aug 10 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-5 +- doh, include libio/tst-swscanf.c + +* Fri Aug 10 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-4 +- don't crash on catclose(-1) +- fix wscanf %[] handling +- fix return value from swprintf +- handle year + %U/%W week + week day in strptime + +* Thu Aug 9 2001 Jakub Jelinek <jakub@redhat.com> 2.2.4-3 +- update from CVS to + - fix strcoll (#50548) + - fix seekdir (#51132) + - fix memusage (#50606) +- don't make gconv-modules.cache %%config file, just don't verify + its content. + +* Mon Aug 6 2001 Jakub Jelinek <jakub@redhat.com> +- fix strtod and *scanf (#50723, #50724) + +* Sat Aug 4 2001 Jakub Jelinek <jakub@redhat.com> +- update from CVS + - fix iconv cache handling +- glibc should not own %{_infodir}, %{_mandir} nor %{_mandir}/man3 (#50673) +- add gconv-modules.cache as emtpy config file (#50699) +- only run iconvconfig if /usr is mounted read-write (#50667) + +* Wed Jul 25 2001 Jakub Jelinek <jakub@redhat.com> +- move iconvconfig from glibc-common into glibc subpackage, + call it from glibc_post_upgrade instead of common's post. + +* Tue Jul 24 2001 Jakub Jelinek <jakub@redhat.com> +- turn off debugging printouts in iconvconfig + +* Tue Jul 24 2001 Jakub Jelinek <jakub@redhat.com> +- update from CVS + - fix IA-32 makecontext + - make fflush(0) thread-safe (#46446) + +* Mon Jul 23 2001 Jakub Jelinek <jakub@redhat.com> +- adjust prelinking DT_* and SHT_* values in elf.h +- update from CVS + - iconv cache + - make iconv work in SUID/SGID programs (#34611) + +* Fri Jul 20 2001 Jakub Jelinek <jakub@redhat.com> +- update from CVS + - kill non-pic code in libm.so + - fix getdate + - fix some locales (#49402) +- rebuilt with binutils-2.11.90.0.8-5 to place .interp section + properly in libBrokenLocale.so, libNoVersion.so and libanl.so +- add floating stacks on IA-64, Alpha, Sparc (#49308) + +* Mon Jul 16 2001 Jakub Jelinek <jakub@redhat.com> +- make /lib/i686 directory owned by glibc*.i686.rpm + +* Mon Jul 9 2001 Jakub Jelinek <jakub@redhat.com> +- remove rquota.[hx] headers which are now provided by quota (#47141) +- add prelinking patch + +* Thu Jul 5 2001 Jakub Jelinek <jakub@redhat.com> +- require sh-utils for nscd + +* Mon Jun 25 2001 Jakub Jelinek <jakub@redhat.com> +- update from CVS (#43681, #43350, #44663, #45685) +- fix ro_RO bug (#44644) + +* Wed Jun 6 2001 Jakub Jelinek <jakub@redhat.com> +- fix a bunch of math bugs (#43210, #43345, #43346, #43347, #43348, #43355) +- make rpc headers -ansi compilable (#42390) +- remove alphaev6 optimized memcpy, since there are still far too many + broken apps which call memcpy where they should call memmove +- update from CVS to (among other things): + - fix tanhl bug (#43352) + +* Tue May 22 2001 Jakub Jelinek <jakub@redhat.com> +- fix #include <signal.h> with -D_XOPEN_SOURCE=500 on ia64 (#35968) +- fix a dlclose reldeps handling bug +- some more profiling fixes +- fix tgmath.h + +* Thu May 17 2001 Jakub Jelinek <jakub@redhat.com> +- make ldconfig more quiet +- fix LD_PROFILE on i686 (#41030) + +* Wed May 16 2001 Jakub Jelinek <jakub@redhat.com> +- fix the hardlink program, so that it really catches all files with + identical content +- add a s390x clone fix + +* Wed May 16 2001 Jakub Jelinek <jakub@redhat.com> +- fix rpc for non-threaded apps using svc_fdset and similar variables (#40409) +- fix nss compatibility DSO versions for alphaev6 +- add a hardlink program instead of the shell 3x for plus cmp -s/link + which takes a lot of time during build +- rework BuildPreReq and Conflicts with gcc, so that + it applies only where it has to + +* Fri May 11 2001 Jakub Jelinek <jakub@redhat.com> +- fix locale name of ja_JP in UTF-8 (#39783) +- fix re_search_2 (#40244) +- fix memusage script (#39138, #39823) +- fix dlsym(RTLD_NEXT, ) from main program (#39803) +- fix xtrace script (#39609) +- make glibc conflict with glibc-devel 2.2.2 and below (to make sure + libc_nonshared.a has atexit) +- fix getconf LFS_CFLAGS on 64bitters +- recompile with gcc-2.96-84 or above to fix binary compatibility problem + with __frame_state_for function (#37933) + +* Fri Apr 27 2001 Jakub Jelinek <jakub@redhat.com> +- glibc 2.2.3 release + - fix strcoll (#36539) +- add BuildPreReqs (#36378) + +* Wed Apr 25 2001 Jakub Jelinek <jakub@redhat.com> +- update from CVS + +* Fri Apr 20 2001 Jakub Jelinek <jakub@redhat.com> +- update from CVS + - fix sparc64, ia64 + - fix some locale syntax errors (#35982) + +* Wed Apr 18 2001 Jakub Jelinek <jakub@redhat.com> +- update from CVS + +* Wed Apr 11 2001 Jakub Jelinek <jakub@redhat.com> +- update from CVS + +* Fri Apr 6 2001 Jakub Jelinek <jakub@redhat.com> +- support even 2.4.0 kernels on ia64, sparc64 and s390x +- include UTF-8 locales +- make gconv-modules %%config(noreplace) + +* Fri Mar 23 2001 Jakub Jelinek <jakub@redhat.com> +- back out sunrpc changes + +* Wed Mar 21 2001 Jakub Jelinek <jakub@redhat.com> +- update from CVS + - fix ia64 build + - fix pthread_getattr_np + +* Fri Mar 16 2001 Jakub Jelinek <jakub@redhat.com> +- update from CVS + - run atexit() registered functions at dlclose time if they are in shared + libraries (#28625) + - add pthread_getattr_np API to make JVM folks happy + +* Wed Mar 14 2001 Jakub Jelinek <jakub@redhat.com> +- require 2.4.1 instead of 2.4.0 on platforms where it required 2.4 kernel +- fix ldd behaviour on unresolved symbols +- remove nonsensical ldconfig warning, update osversion for the most + recent library with the same soname in the same directory instead (#31703) +- apply selected patches from CVS +- s390x spec file changes from Florian La Roche + +* Wed Mar 7 2001 Jakub Jelinek <jakub@redhat.com> +- fix gencat (#30894) +- fix ldconfig changes from yesterday, fix LD_ASSUME_KERNEL handling + +* Tue Mar 6 2001 Jakub Jelinek <jakub@redhat.com> +- update from CVS +- make pthread_attr_setstacksize consistent before and after pthread manager + is started (#28194) +- pass back struct sigcontext from pthread signal wrapper (on ia32 only so + far, #28493) +- on i686 ship both --enable-kernel 2.2.5 and 2.4.0 libc/libm/libpthread, + make ld.so pick the right one + +* Sat Feb 17 2001 Preston Brown <pbrown@redhat.com> +- glib-common doesn't require glibc, until we can figure out how to get out of dependency hell. + +* Sat Feb 17 2001 Jakub Jelinek <jakub@redhat.com> +- make glibc require particular version of glibc-common + and glibc-common prerequire glibc. + +* Fri Feb 16 2001 Jakub Jelinek <jakub@redhat.com> +- glibc 2.2.2 release + - fix regex REG_ICASE bug seen in ksymoops + +* Sat Feb 10 2001 Jakub Jelinek <jakub@redhat.com> +- fix regexec leaking memory (#26864) + +* Fri Feb 9 2001 Jakub Jelinek <jakub@redhat.com> +- update from CVS + - fix ia64 build with gnupro + - make regex 64bit clean + - fix tgmath make check failures on alpha + +* Tue Feb 6 2001 Jakub Jelinek <jakub@redhat.com> +- update again for ia64 DF_1_INITFIRST + +* Fri Feb 2 2001 Jakub Jelinek <jakub@redhat.com> +- update from CVS + - fix getaddrinfo (#25437) + - support DF_1_INITFIRST (#25029) + +* Wed Jan 24 2001 Jakub Jelinek <jakub@redhat.com> +- build all auxiliary arches with --enablekernel 2.4.0, those wanting + to run 2.2 kernels can downgrade to the base architecture glibc. + +* Sat Jan 20 2001 Jakub Jelinek <jakub@redhat.com> +- remove %%lang() flags from %%{_prefix}/lib/locale files temporarily + +* Sun Jan 14 2001 Jakub Jelinek <jakub@redhat.com> +- update to 2.2.1 final + - fix a pthread_kill_other_threads_np breakage (#23966) + - make static binaries using dlopen work on ia64 again +- fix a typo in glibc-common group + +* Wed Jan 10 2001 Bernhard Rosenkraenzer <bero@redhat.com> +- devel requires glibc = %%{version} +- noreplace /etc/nscd.conf + +* Wed Jan 10 2001 Jakub Jelinek <jakub@redhat.com> +- some more security fixes: + - don't look up LD_PRELOAD libs in cache for SUID apps + (because that bypasses SUID bit checking on the library) + - place output files for profiling SUID apps into /var/profile, + use O_NOFOLLOW for them + - add checks for $MEMUSAGE_OUTPUT and $SEGFAULT_OUTPUT_NAME +- hardlink identical locale files together +- add %%lang() tags to locale stuff +- remove ko_KR.utf8 for now, it is provided by locale-utf8 package + +* Mon Jan 8 2001 Jakub Jelinek <jakub@redhat.com> +- add glibc-common subpackage +- fix alphaev6 memcpy (#22494) +- fix sys/cdefs.h (#22908) +- don't define stdin/stdout/stderr as macros for -traditional (#22913) +- work around a bug in IBM JDK (#22932, #23012) +- fix pmap_unset when network is down (#23176) +- move nscd in rc.d before netfs on shutdown +- fix $RESOLV_HOST_CONF in SUID apps (#23562) + +* Fri Dec 15 2000 Jakub Jelinek <jakub@redhat.com> +- fix ftw and nftw + +* Wed Dec 13 2000 Jakub Jelinek <jakub@redhat.com> +- fix fcvt (#22184) +- ldd /lib/ld-linux.so.2 is not crashing any longer again (#22197) +- fix gencat + +* Mon Dec 11 2000 Jakub Jelinek <jakub@redhat.com> +- fix alpha htonl and alphaev6 stpcpy + +* Sat Dec 9 2000 Jakub Jelinek <jakub@redhat.com> +- update to CVS to: + - fix getnameinfo (#21934) + - don't stomp on memory in rpath handling (#21544) + - fix setlocale (#21507) +- fix libNoVersion.so.1 loading code (#21579) +- use auxarches define in spec file for auxiliary + architectures (#21219) +- remove /usr/share directory from filelist (#21218) + +* Sun Nov 19 2000 Jakub Jelinek <jakub@redhat.com> +- update to CVS to fix getaddrinfo + +* Fri Nov 17 2000 Jakub Jelinek <jakub@redhat.com> +- update to CVS to fix freopen +- remove all alpha workarounds, not needed anymore + +* Wed Nov 15 2000 Jakub Jelinek <jakub@redhat.com> +- fix dladdr bug on alpha/sparc32/sparc64 +- fix Makefiles so that they run static tests properly + +* Tue Nov 14 2000 Jakub Jelinek <jakub@redhat.com> +- update to CVS to fix ldconfig + +* Thu Nov 9 2000 Jakub Jelinek <jakub@redhat.com> +- update to glibc 2.2 release + +* Mon Nov 6 2000 Jakub Jelinek <jakub@redhat.com> +- update to CVS to: + - export __sysconf@@GLIBC_2.2 (#20417) + +* Fri Nov 3 2000 Jakub Jelinek <jakub@redhat.com> +- merge to 2.1.97 + +* Mon Oct 30 2000 Jakub Jelinek <jakub@redhat.com> +- update to CVS, including: + - fix WORD_BIT/LONG_BIT definition in limits.h (#19088) + - fix hesiod (#19375) + - set LC_MESSAGES in zic/zdump for proper error message output (#19495) + - fix LFS fcntl when used with non-LFS aware kernels (#19730) + +* Thu Oct 19 2000 Jakub Jelinek <jakub@redhat.com> +- fix alpha semctl (#19199) +- update to CVS, including: + - fix glibc headers for Compaq non-gcc compilers + - fix locale alias handling code (#18832) + - fix rexec on little endian machines (#18886) +- started writing changelog again + +* Thu Aug 10 2000 Adrian Havill <havill@redhat.com> +- added ja ujis alias for backwards compatibility diff --git a/fedora/glibc_post_upgrade.c b/fedora/glibc_post_upgrade.c new file mode 100644 index 0000000000..cde931bde3 --- /dev/null +++ b/fedora/glibc_post_upgrade.c @@ -0,0 +1,340 @@ +#if defined __sparc__ && defined __arch64__ +register void *__thread_self __asm ("g7"); +#endif +#include <sys/types.h> +#include <sys/wait.h> +#include <stdio.h> +#include <errno.h> +#include <unistd.h> +#include <sys/time.h> +#include <dirent.h> +#include <stddef.h> +#include <fcntl.h> +#include <string.h> +#include <sys/stat.h> +#include <elf.h> + +#define verbose_exec(failcode, path...) \ + do \ + { \ + char *const arr[] = { path, NULL }; \ + vexec (failcode, arr); \ + } while (0) + +__attribute__((noinline)) void vexec (int failcode, char *const path[]); +__attribute__((noinline)) void says (const char *str); +__attribute__((noinline)) void sayn (long num); +__attribute__((noinline)) void message (char *const path[]); +__attribute__((noinline)) int check_elf (const char *name); + +int +main (void) +{ + char initpath[256]; + + char buffer[4096]; + struct pref { + char *p; + int len; + } prefix[] = { { "libc-", 5 }, { "libm-", 5 }, + { "librt-", 6 }, { "libpthread-", 11 }, + { "librtkaio-", 10 }, { "libthread_db-", 13 } }; + int i, j, fd; + off_t base; + ssize_t ret; +#ifdef __i386__ + const char *remove_dirs[] = { "/lib/tls", "/lib/i686", "/lib/tls/i486", "/lib/tls/i586", "/lib/tls/i686" }; +#else +#ifndef LIBTLS +#define LIBTLS "/lib/tls" +#endif + const char *remove_dirs[] = { LIBTLS }; +#endif + for (j = 0; j < sizeof (remove_dirs) / sizeof (remove_dirs[0]); ++j) + { + size_t rmlen = strlen (remove_dirs[j]); + fd = open (remove_dirs[j], O_RDONLY); + if (fd >= 0 + && (ret = getdirentries (fd, buffer, sizeof (buffer), &base)) + >= (ssize_t) offsetof (struct dirent, d_name)) + { + for (base = 0; base + offsetof (struct dirent, d_name) < ret; ) + { + struct dirent *d = (struct dirent *) (buffer + base); + + for (i = 0; i < sizeof (prefix) / sizeof (prefix[0]); i++) + if (! strncmp (d->d_name, prefix[i].p, prefix[i].len)) + { + char *p = d->d_name + prefix[i].len; + + while (*p == '.' || (*p >= '0' && *p <= '9')) p++; + if (p[0] == 's' && p[1] == 'o' && p[2] == '\0' + && p + 3 - d->d_name + < sizeof (initpath) - rmlen - 1) + { + memcpy (initpath, remove_dirs[j], rmlen); + initpath[rmlen] = '/'; + strcpy (initpath + rmlen + 1, d->d_name); + unlink (initpath); + break; + } + } + base += d->d_reclen; + } + close (fd); + } + } + + int ldsocfd = open (LD_SO_CONF, O_RDONLY); + struct stat ldsocst; + if (ldsocfd >= 0 && fstat (ldsocfd, &ldsocst) >= 0) + { + char p[ldsocst.st_size + 1]; + if (read (ldsocfd, p, ldsocst.st_size) == ldsocst.st_size) + { + p[ldsocst.st_size] = '\0'; + if (strstr (p, "include ld.so.conf.d/*.conf") == NULL) + { + close (ldsocfd); + ldsocfd = open (LD_SO_CONF, O_WRONLY | O_TRUNC); + if (ldsocfd >= 0) + { + size_t slen = strlen ("include ld.so.conf.d/*.conf\n"); + if (write (ldsocfd, "include ld.so.conf.d/*.conf\n", slen) + != slen + || write (ldsocfd, p, ldsocst.st_size) != ldsocst.st_size) + _exit (109); + } + } + } + if (ldsocfd >= 0) + close (ldsocfd); + } + + /* If installing bi-arch glibc, rpm sometimes doesn't unpack all files + before running one of the lib's %post scriptlet. /sbin/ldconfig will + then be run by the other arch's %post. */ + if (! access ("/sbin/ldconfig", X_OK)) + verbose_exec (110, "/sbin/ldconfig", "/sbin/ldconfig"); + + if (! utimes (GCONV_MODULES_DIR "/gconv-modules.cache", NULL)) + { +#ifndef ICONVCONFIG +#define ICONVCONFIG "/usr/sbin/iconvconfig" +#endif + verbose_exec (113, ICONVCONFIG, "/usr/sbin/iconvconfig", + "-o", GCONV_MODULES_DIR"/gconv-modules.cache", + "--nostdlib", GCONV_MODULES_DIR); + } + + /* Check if telinit is available and the init fifo as well. */ + if (access ("/sbin/telinit", X_OK) || access ("/dev/initctl", F_OK)) + _exit (0); + /* Check if we are not inside of some chroot, because we'd just + timeout and leave /etc/initrunlvl. */ + if (readlink ("/proc/1/exe", initpath, 256) <= 0 || + readlink ("/proc/1/root", initpath, 256) <= 0) + _exit (0); + + if (check_elf ("/proc/1/exe")) + verbose_exec (116, "/sbin/telinit", "/sbin/telinit", "u"); + + /* Check if we can safely condrestart sshd. */ + if (access ("/sbin/service", X_OK) == 0 + && access ("/usr/sbin/sshd", X_OK) == 0 + && access ("/bin/bash", X_OK) == 0) + { + if (check_elf ("/usr/sbin/sshd")) + verbose_exec (-121, "/sbin/service", "/sbin/service", "sshd", "condrestart"); + } + + _exit(0); +} + +#ifndef NO_SIZE_OPTIMIZATION +int __libc_multiple_threads __attribute__((nocommon)); +int __libc_enable_asynccancel (void) { return 0; } +void __libc_disable_asynccancel (int x) { } +void __libc_csu_init (void) { } +void __libc_csu_fini (void) { } +pid_t __fork (void) { return -1; } +char thr_buf[65536]; + +# ifndef __powerpc__ +int +__libc_start_main (int (*main) (void), int argc, char **argv, + void (*init) (void), void (*fini) (void), + void (*rtld_fini) (void), void * stack_end) +# else +struct startup_info +{ + void *sda_base; + int (*main) (int, char **, char **, void *); + int (*init) (int, char **, char **, void *); + void (*fini) (void); +}; + +int +__libc_start_main (int argc, char **ubp_av, char **ubp_ev, + void *auxvec, void (*rtld_fini) (void), + struct startup_info *stinfo, + char **stack_on_entry) +# endif +{ +#if defined __ia64__ || defined __powerpc64__ + register void *r13 __asm ("r13") = thr_buf + 32768; + __asm ("" : : "r" (r13)); +#elif defined __sparc__ + register void *g6 __asm ("g6") = thr_buf + 32768; +# ifdef __arch64__ + __thread_self = thr_buf + 32768; +# else + register void *__thread_self __asm ("g7") = thr_buf + 32768; +# endif + __asm ("" : : "r" (g6), "r" (__thread_self)); +#elif defined __s390__ && !defined __s390x__ + __asm ("sar %%a0,%0" : : "d" (thr_buf + 32768)); +#elif defined __s390x__ + __asm ("sar %%a1,%0; srlg 0,%0,32; sar %%a0,0" : : "d" (thr_buf + 32768) : "0"); +#elif defined __powerpc__ && !defined __powerpc64__ + register void *r2 __asm ("r2") = thr_buf + 32768; + __asm ("" : : "r" (r2)); +#endif + main(); + return 0; +} +#endif + +void +vexec (int failcode, char *const path[]) +{ + pid_t pid; + int status, save_errno; + int devnull = 0; + + if (failcode < 0) + { + devnull = 1; + failcode = -failcode; + } + pid = vfork (); + if (pid == 0) + { + int fd; + if (devnull && (fd = open ("/dev/null", O_WRONLY)) >= 0) + { + dup2 (fd, 1); + dup2 (fd, 2); + close (fd); + } + execv (path[0], path + 1); + save_errno = errno; + message (path); + says (" exec failed with errno "); + sayn (save_errno); + says ("\n"); + _exit (failcode); + } + else if (pid < 0) + { + save_errno = errno; + message (path); + says (" fork failed with errno "); + sayn (save_errno); + says ("\n"); + _exit (failcode + 1); + } + if (waitpid (0, &status, 0) != pid || !WIFEXITED (status)) + { + message (path); + says (" child terminated abnormally\n"); + _exit (failcode + 2); + } + if (WEXITSTATUS (status)) + { + message (path); + says (" child exited with exit code "); + sayn (WEXITSTATUS (status)); + says ("\n"); + _exit (WEXITSTATUS (status)); + } +} + +void +says (const char *str) +{ + write (1, str, strlen (str)); +} + +void +sayn (long num) +{ + char string[sizeof (long) * 3 + 1]; + char *p = string + sizeof (string) - 1; + + *p = '\0'; + if (num == 0) + *--p = '0'; + else + while (num) + { + *--p = '0' + num % 10; + num = num / 10; + } + + says (p); +} + +void +message (char *const path[]) +{ + says ("/usr/sbin/glibc_post_upgrade: While trying to execute "); + says (path[0]); +} + +int +check_elf (const char *name) +{ + /* Play safe, if we can't open or read, assume it might be + ELF for the current arch. */ + int ret = 1; + int fd = open (name, O_RDONLY); + if (fd >= 0) + { + Elf32_Ehdr ehdr; + if (read (fd, &ehdr, offsetof (Elf32_Ehdr, e_version)) + == offsetof (Elf32_Ehdr, e_version)) + { + ret = 0; + if (ehdr.e_ident[EI_CLASS] + == (sizeof (long) == 8 ? ELFCLASS64 : ELFCLASS32)) + { +#if defined __i386__ + ret = ehdr.e_machine == EM_386; +#elif defined __x86_64__ + ret = ehdr.e_machine == EM_X86_64; +#elif defined __ia64__ + ret = ehdr.e_machine == EM_IA_64; +#elif defined __powerpc64__ + ret = ehdr.e_machine == EM_PPC64; +#elif defined __powerpc__ + ret = ehdr.e_machine == EM_PPC; +#elif defined __s390__ || defined __s390x__ + ret = ehdr.e_machine == EM_S390; +#elif defined __x86_64__ + ret = ehdr.e_machine == EM_X86_64; +#elif defined __sparc__ + if (sizeof (long) == 8) + ret = ehdr.e_machine == EM_SPARCV9; + else + ret = (ehdr.e_machine == EM_SPARC + || ehdr.e_machine == EM_SPARC32PLUS); +#else + ret = 1; +#endif + } + } + close (fd); + } + return ret; +} diff --git a/fedora/hardlink.c b/fedora/hardlink.c new file mode 100644 index 0000000000..62e633786d --- /dev/null +++ b/fedora/hardlink.c @@ -0,0 +1,344 @@ +/* Copyright (C) 2001 Red Hat, Inc. + + Written by Jakub Jelinek <jakub@redhat.com>. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public + License along with this program; see the file COPYING. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +/* Changes by Rémy Card to use constants and add option -n. */ + +#define _GNU_SOURCE +#include <sys/types.h> +#include <stdlib.h> +#include <stdio.h> +#include <unistd.h> +#include <sys/stat.h> +#include <sys/mman.h> +#include <string.h> +#include <dirent.h> +#include <fcntl.h> + +#define NHASH 131072 /* Must be a power of 2! */ +#define NAMELEN 4096 +#define NBUF 64 + +struct _f; +typedef struct _h { + struct _h *next; + struct _f *chain; + off_t size; + time_t mtime; +} h; + +typedef struct _d { + struct _d *next; + char name[0]; +} d; + +d *dirs; + +h *hps[NHASH]; + +int no_link = 0; +int verbose = 0; +int content_only = 0; + +typedef struct _f { + struct _f *next; + ino_t ino; + dev_t dev; + unsigned int cksum; + char name[0]; +} f; + +inline unsigned int hash(off_t size, time_t mtime) +{ + return (size ^ mtime) & (NHASH - 1); +} + +inline int stcmp(struct stat *st1, struct stat *st2, int content_only) +{ + if (content_only) + return st1->st_size != st2->st_size; + return st1->st_mode != st2->st_mode || st1->st_uid != st2->st_uid || + st1->st_gid != st2->st_gid || st1->st_size != st2->st_size || + st1->st_mtime != st2->st_mtime; +} + +long long ndirs, nobjects, nregfiles, nmmap, ncomp, nlinks, nsaved; + +void doexit(int i) +{ + if (verbose) { + fprintf(stderr, "\n\n"); + fprintf(stderr, "Directories %lld\n", ndirs); + fprintf(stderr, "Objects %lld\n", nobjects); + fprintf(stderr, "IFREG %lld\n", nregfiles); + fprintf(stderr, "Mmaps %lld\n", nmmap); + fprintf(stderr, "Comparisons %lld\n", ncomp); + fprintf(stderr, "%s %lld\n", (no_link ? "Would link" : "Linked"), nlinks); + fprintf(stderr, "%s %lld\n", (no_link ? "Would save" : "saved"), nsaved); + } + exit(i); +} + +void usage(prog) +{ + fprintf (stderr, "Usage: %s [-cnv] directories...\n", prog); + exit(255); +} + +unsigned int buf[NBUF]; +char nambuf1[NAMELEN], nambuf2[NAMELEN]; + +void rf (char *name) +{ + struct stat st, st2, st3; + nobjects++; + if (lstat (name, &st)) + return; + if (S_ISDIR (st.st_mode)) { + d * dp = malloc(sizeof(d) + 1 + strlen (name)); + if (!dp) { + fprintf(stderr, "\nOut of memory 3\n"); + doexit(3); + } + strcpy (dp->name, name); + dp->next = dirs; + dirs = dp; + } else if (S_ISREG (st.st_mode)) { + int fd, i; + f * fp, * fp2; + h * hp; + char *p, *q; + char *n1, *n2; + int cksumsize = sizeof(buf); + unsigned int cksum; + time_t mtime = content_only ? 0 : st.st_mtime; + unsigned int hsh = hash (st.st_size, mtime); + nregfiles++; + if (verbose > 1) + fprintf(stderr, " %s", name); + fd = open (name, O_RDONLY); + if (fd < 0) return; + if (st.st_size < sizeof(buf)) { + cksumsize = st.st_size; + memset (((char *)buf) + cksumsize, 0, (sizeof(buf) - cksumsize) % sizeof(buf[0])); + } + if (read (fd, buf, cksumsize) != cksumsize) { + close(fd); + if (verbose > 1) + fprintf(stderr, "\r%*s\r", (int)strlen(name)+2, ""); + return; + } + cksumsize = (cksumsize + sizeof(buf[0]) - 1) / sizeof(buf[0]); + for (i = 0, cksum = 0; i < cksumsize; i++) { + if (cksum + buf[i] < cksum) + cksum += buf[i] + 1; + else + cksum += buf[i]; + } + for (hp = hps[hsh]; hp; hp = hp->next) + if (hp->size == st.st_size && hp->mtime == mtime) + break; + if (!hp) { + hp = malloc(sizeof(h)); + if (!hp) { + fprintf(stderr, "\nOut of memory 1\n"); + doexit(1); + } + hp->size = st.st_size; + hp->mtime = mtime; + hp->chain = NULL; + hp->next = hps[hsh]; + hps[hsh] = hp; + } + for (fp = hp->chain; fp; fp = fp->next) + if (fp->cksum == cksum) + break; + for (fp2 = fp; fp2 && fp2->cksum == cksum; fp2 = fp2->next) + if (fp2->ino == st.st_ino && fp2->dev == st.st_dev) { + close(fd); + if (verbose > 1) + fprintf(stderr, "\r%*s\r", (int)strlen(name)+2, ""); + return; + } + if (fp) { + p = mmap (NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0); + nmmap++; + if (p == (void *)-1) { + close(fd); + fprintf(stderr, "\nFailed to mmap %s\n", name); + return; + } + } + for (fp2 = fp; fp2 && fp2->cksum == cksum; fp2 = fp2->next) + if (!lstat (fp2->name, &st2) && S_ISREG (st2.st_mode) && + !stcmp (&st, &st2, content_only) && + st2.st_ino != st.st_ino && + st2.st_dev == st.st_dev) { + int fd2 = open (fp2->name, O_RDONLY); + if (fd2 < 0) continue; + if (fstat (fd2, &st2) || !S_ISREG (st2.st_mode)) { + close (fd2); + continue; + } + ncomp++; + q = mmap (NULL, st.st_size, PROT_READ, MAP_SHARED, fd2, 0); + if (q == (void *)-1) { + close(fd2); + fprintf(stderr, "\nFailed to mmap %s\n", fp2->name); + continue; + } + if (memcmp (p, q, st.st_size)) { + munmap (q, st.st_size); + close(fd2); + continue; + } + munmap (q, st.st_size); + close(fd2); + if (lstat (name, &st3)) { + fprintf(stderr, "\nCould not stat %s again\n", name); + munmap (p, st.st_size); + close(fd); + return; + } + st3.st_atime = st.st_atime; + if (stcmp (&st, &st3, 0)) { + fprintf(stderr, "\nFile %s changed underneath us\n", name); + munmap (p, st.st_size); + close(fd); + return; + } + n1 = fp2->name; + n2 = name; + if (!no_link) { + strcpy (stpcpy (nambuf2, n2), ".$$$___cleanit___$$$"); + if (rename (n2, nambuf2)) { + fprintf(stderr, "\nFailed to rename %s to %s\n", n2, nambuf2); + continue; + } + if (link (n1, n2)) { + fprintf(stderr, "\nFailed to hardlink %s to %s\n", n1, n2); + if (rename (nambuf2, n2)) { + fprintf(stderr, "\nBad bad - failed to rename back %s to %s\n", nambuf2, n2); + } + munmap (p, st.st_size); + close(fd); + return; + } + unlink (nambuf2); + } + nlinks++; + if (st3.st_nlink > 1) { + /* We actually did not save anything this time, since the link second argument + had some other links as well. */ + if (verbose > 1) + fprintf(stderr, "\r%*s\r%s %s to %s\n", (int)strlen(name)+2, "", (no_link ? "Would link" : "Linked"), n1, n2); + } else { + nsaved+=st.st_size; + if (verbose > 1) + fprintf(stderr, "\r%*s\r%s %s to %s, %s %ld\n", (int)strlen(name)+2, "", (no_link ? "Would link" : "Linked"), n1, n2, (no_link ? "would save" : "saved"), st.st_size); + } + munmap (p, st.st_size); + close(fd); + return; + } + if (fp) + munmap (p, st.st_size); + fp2 = malloc(sizeof(f) + 1 + strlen (name)); + if (!fp2) { + fprintf(stderr, "\nOut of memory 2\n"); + doexit(2); + } + close(fd); + fp2->ino = st.st_ino; + fp2->dev = st.st_dev; + fp2->cksum = cksum; + strcpy(fp2->name, name); + if (fp) { + fp2->next = fp->next; + fp->next = fp2; + } else { + fp2->next = hp->chain; + hp->chain = fp2; + } + if (verbose > 1) + fprintf(stderr, "\r%*s\r", (int)strlen(name)+2, ""); + return; + } +} + +int main(int argc, char **argv) +{ + int ch; + int i; + char *p; + d * dp; + DIR *dh; + struct dirent *di; + while ((ch = getopt (argc, argv, "cnv")) != -1) { + switch (ch) { + case 'n': + no_link++; + break; + case 'v': + verbose++; + break; + case 'c': + content_only++; + break; + default: + usage(argv[0]); + } + } + if (optind >= argc) + usage(argv[0]); + for (i = optind; i < argc; i++) + rf(argv[i]); + while (dirs) { + dp = dirs; + dirs = dp->next; + strcpy (nambuf1, dp->name); + free (dp); + strcat (nambuf1, "/"); + p = strchr (nambuf1, 0); + dh = opendir (nambuf1); + if (dh == NULL) + continue; + ndirs++; + while ((di = readdir (dh)) != NULL) { + if (!di->d_name[0]) + continue; + if (di->d_name[0] == '.') { + char *q; + if (!di->d_name[1] || !strcmp (di->d_name, "..") || !strncmp (di->d_name, ".in.", 4)) + continue; + q = strrchr (di->d_name, '.'); + if (q && strlen (q) == 7 && q != di->d_name) { + *p = 0; + if (verbose) + fprintf(stderr, "Skipping %s%s\n", nambuf1, di->d_name); + continue; + } + } + strcpy (p, di->d_name); + rf(nambuf1); + } + closedir(dh); + } + doexit(0); + return 0; +} diff --git a/fedora/libc-lock.h b/fedora/libc-lock.h new file mode 100644 index 0000000000..5037caf4da --- /dev/null +++ b/fedora/libc-lock.h @@ -0,0 +1,340 @@ +/* libc-internal interface for mutex locks. LinuxThreads version. + Copyright (C) 1996,1997,1998,1999,2000,2001,2002,2003 + 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 + modify it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#ifndef _BITS_LIBC_LOCK_H +#define _BITS_LIBC_LOCK_H 1 + +#include <pthread.h> + +/* Mutex type. */ +#ifdef _IO_MTSAFE_IO +typedef pthread_mutex_t __libc_lock_t; +typedef struct { pthread_mutex_t mutex; } __libc_lock_recursive_t; +# ifdef __USE_UNIX98 +typedef pthread_rwlock_t __libc_rwlock_t; +# else +typedef struct __libc_rwlock_opaque__ __libc_rwlock_t; +# endif +typedef __libc_lock_recursive_t __rtld_lock_recursive_t; +#else +typedef struct __libc_lock_opaque__ __libc_lock_t; +typedef struct __libc_lock_recursive_opaque__ __libc_lock_recursive_t; +typedef struct __libc_rwlock_opaque__ __libc_rwlock_t; +#endif + +/* Type for key to thread-specific data. */ +typedef pthread_key_t __libc_key_t; + +/* Define a lock variable NAME with storage class CLASS. The lock must be + initialized with __libc_lock_init before it can be used (or define it + with __libc_lock_define_initialized, below). Use `extern' for CLASS to + declare a lock defined in another module. In public structure + definitions you must use a pointer to the lock structure (i.e., NAME + begins with a `*'), because its storage size will not be known outside + of libc. */ +#define __libc_lock_define(CLASS,NAME) \ + CLASS __libc_lock_t NAME; +#define __libc_rwlock_define(CLASS,NAME) \ + CLASS __libc_rwlock_t NAME; +#define __libc_lock_define_recursive(CLASS,NAME) \ + CLASS __libc_lock_recursive_t NAME; +#define __rtld_lock_define_recursive(CLASS,NAME) \ + CLASS __rtld_lock_recursive_t NAME; + +/* Define an initialized lock variable NAME with storage class CLASS. + + For the C library we take a deeper look at the initializer. For + this implementation all fields are initialized to zero. Therefore + we don't initialize the variable which allows putting it into the + BSS section. (Except on PA-RISC and other odd architectures, where + initialized locks must be set to one due to the lack of normal + atomic operations.) */ + +#if __LT_SPINLOCK_INIT == 0 +# define __libc_lock_define_initialized(CLASS,NAME) \ + CLASS __libc_lock_t NAME; +#else +# define __libc_lock_define_initialized(CLASS,NAME) \ + CLASS __libc_lock_t NAME = PTHREAD_MUTEX_INITIALIZER; +#endif + +#define __libc_rwlock_define_initialized(CLASS,NAME) \ + CLASS __libc_rwlock_t NAME = PTHREAD_RWLOCK_INITIALIZER; + +/* Define an initialized recursive lock variable NAME with storage + class CLASS. */ +#define __libc_lock_define_initialized_recursive(CLASS,NAME) \ + CLASS __libc_lock_recursive_t NAME = _LIBC_LOCK_RECURSIVE_INITIALIZER; +#define _LIBC_LOCK_RECURSIVE_INITIALIZER \ + {PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP} + +#define __rtld_lock_define_initialized_recursive(CLASS,NAME) \ + CLASS __rtld_lock_recursive_t NAME = _RTLD_LOCK_RECURSIVE_INITIALIZER; +#define _RTLD_LOCK_RECURSIVE_INITIALIZER \ + {PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP} + +#if defined __PIC__ +# define __libc_maybe_call(FUNC, ARGS, ELSE) \ + (__extension__ ({ __typeof (FUNC) *_fn = (FUNC); \ + _fn != NULL ? (*_fn) ARGS : ELSE; })) +#else +# define __libc_maybe_call(FUNC, ARGS, ELSE) \ + (FUNC != NULL ? FUNC ARGS : ELSE) +#endif +#define __libc_maybe_call2(FUNC, ARGS, ELSE) __libc_maybe_call (__##FUNC, ARGS, ELSE) + +/* Initialize the named lock variable, leaving it in a consistent, unlocked + state. */ +#define __libc_lock_init(NAME) \ + (__libc_maybe_call2 (pthread_mutex_init, (&(NAME), NULL), 0)) +#define __libc_rwlock_init(NAME) \ + (__libc_maybe_call (__pthread_rwlock_init, (&(NAME), NULL), 0)); + +/* Same as last but this time we initialize a recursive mutex. */ +#define __libc_lock_init_recursive(NAME) \ + do { \ + if (__pthread_mutex_init != NULL) \ + { \ + pthread_mutexattr_t __attr; \ + __pthread_mutexattr_init (&__attr); \ + __pthread_mutexattr_settype (&__attr, PTHREAD_MUTEX_RECURSIVE_NP); \ + __pthread_mutex_init (&(NAME).mutex, &__attr); \ + __pthread_mutexattr_destroy (&__attr); \ + } \ + } while (0); +#define __rtld_lock_init_recursive(NAME) \ + __libc_lock_init_recursive (NAME) + +/* Finalize the named lock variable, which must be locked. It cannot be + used again until __libc_lock_init is called again on it. This must be + called on a lock variable before the containing storage is reused. */ +#define __libc_lock_fini(NAME) \ + (__libc_maybe_call2 (pthread_mutex_destroy, (&(NAME)), 0)); +#define __libc_rwlock_fini(NAME) \ + (__libc_maybe_call (__pthread_rwlock_destroy, (&(NAME)), 0)); + +/* Finalize recursive named lock. */ +#define __libc_lock_fini_recursive(NAME) __libc_lock_fini ((NAME).mutex) +#define __rtld_lock_fini_recursive(NAME) __libc_lock_fini_recursive (NAME) + +/* Lock the named lock variable. */ +#define __libc_lock_lock(NAME) \ + (__libc_maybe_call2 (pthread_mutex_lock, (&(NAME)), 0)); +#define __libc_rwlock_rdlock(NAME) \ + (__libc_maybe_call (__pthread_rwlock_rdlock, (&(NAME)), 0)); +#define __libc_rwlock_wrlock(NAME) \ + (__libc_maybe_call (__pthread_rwlock_wrlock, (&(NAME)), 0)); + +/* Lock the recursive named lock variable. */ +#define __libc_lock_lock_recursive(NAME) __libc_lock_lock ((NAME).mutex) + +/* Try to lock the named lock variable. */ +#define __libc_lock_trylock(NAME) \ + (__libc_maybe_call2 (pthread_mutex_trylock, (&(NAME)), 0)) +#define __libc_rwlock_tryrdlock(NAME) \ + (__libc_maybe_call (__pthread_rwlock_tryrdlock, (&(NAME)), 0)) +#define __libc_rwlock_trywrlock(NAME) \ + (__libc_maybe_call (__pthread_rwlock_trywrlock, (&(NAME)), 0)) + +/* Try to lock the recursive named lock variable. */ +#define __libc_lock_trylock_recursive(NAME) __libc_lock_trylock ((NAME).mutex) +#define __rtld_lock_trylock_recursive(NAME) \ + __libc_lock_trylock_recursive (NAME) + +/* Unlock the named lock variable. */ +#define __libc_lock_unlock(NAME) \ + (__libc_maybe_call2 (pthread_mutex_unlock, (&(NAME)), 0)); +#define __libc_rwlock_unlock(NAME) \ + (__libc_maybe_call (__pthread_rwlock_unlock, (&(NAME)), 0)); + +/* Unlock the recursive named lock variable. */ +#define __libc_lock_unlock_recursive(NAME) __libc_lock_unlock ((NAME).mutex) + +#define __rtld_lock_lock_recursive(NAME) __libc_lock_lock_recursive (NAME) +#define __rtld_lock_unlock_recursive(NAME) __libc_lock_unlock_recursive (NAME) + +/* Define once control variable. */ +#if PTHREAD_ONCE_INIT == 0 +/* Special case for static variables where we can avoid the initialization + if it is zero. */ +# define __libc_once_define(CLASS, NAME) \ + CLASS pthread_once_t NAME +#else +# define __libc_once_define(CLASS, NAME) \ + CLASS pthread_once_t NAME = PTHREAD_ONCE_INIT +#endif + +/* Call handler iff the first call. */ +#define __libc_once(ONCE_CONTROL, INIT_FUNCTION) \ + do { \ + if (__pthread_once != NULL) \ + __pthread_once (&(ONCE_CONTROL), (INIT_FUNCTION)); \ + else if ((ONCE_CONTROL) == PTHREAD_ONCE_INIT) { \ + INIT_FUNCTION (); \ + (ONCE_CONTROL) = 2; \ + } \ + } while (0) + + +/* Start critical region with cleanup. */ +#define __libc_cleanup_region_start(DOIT, FCT, ARG) \ + { struct _pthread_cleanup_buffer _buffer; \ + int _avail = (DOIT) && _pthread_cleanup_push_defer != NULL; \ + if (_avail) { \ + _pthread_cleanup_push_defer (&_buffer, (FCT), (ARG)); \ + } + +/* End critical region with cleanup. */ +#define __libc_cleanup_region_end(DOIT) \ + if (_avail) { \ + _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \ + } \ + } + +/* Sometimes we have to exit the block in the middle. */ +#define __libc_cleanup_end(DOIT) \ + if (_avail) { \ + _pthread_cleanup_pop_restore (&_buffer, (DOIT)); \ + } + +#define __libc_cleanup_push(fct, arg) \ + { struct _pthread_cleanup_buffer _buffer; \ + __libc_maybe_call (_pthread_cleanup_push, (&_buffer, (fct), (arg)), 0) + +#define __libc_cleanup_pop(execute) \ + __libc_maybe_call (_pthread_cleanup_pop, (&_buffer, execute), 0); \ + } + +/* Create thread-specific key. */ +#define __libc_key_create(KEY, DESTRUCTOR) \ + (__libc_maybe_call (__pthread_key_create, (KEY, DESTRUCTOR), 1)) + +/* Get thread-specific data. */ +#define __libc_getspecific(KEY) \ + (__libc_maybe_call (__pthread_getspecific, (KEY), NULL)) + +/* Set thread-specific data. */ +#define __libc_setspecific(KEY, VALUE) \ + (__libc_maybe_call (__pthread_setspecific, (KEY, VALUE), 0)) + + +/* Register handlers to execute before and after `fork'. */ +#define __libc_atfork(PREPARE, PARENT, CHILD) \ + (__libc_maybe_call (__pthread_atfork, (PREPARE, PARENT, CHILD), 0)) + +__BEGIN_DECLS + +extern void _pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *__buffer, + void (*__routine) (void *), + void *__arg) __THROW; + +extern void _pthread_cleanup_pop_restore (struct _pthread_cleanup_buffer *__buffer, + int __execute) __THROW; + + +/* Functions that are used by this file and are internal to the GNU C + library. */ + +extern int __pthread_mutex_init (pthread_mutex_t *__mutex, + __const pthread_mutexattr_t *__mutex_attr); + +extern int __pthread_mutex_destroy (pthread_mutex_t *__mutex); + +extern int __pthread_mutex_trylock (pthread_mutex_t *__mutex); + +extern int __pthread_mutex_lock (pthread_mutex_t *__mutex); + +extern int __pthread_mutex_unlock (pthread_mutex_t *__mutex); + +extern int __pthread_mutexattr_init (pthread_mutexattr_t *__attr); + +extern int __pthread_mutexattr_destroy (pthread_mutexattr_t *__attr); + +extern int __pthread_mutexattr_settype (pthread_mutexattr_t *__attr, + int __kind); + +#ifdef __USE_UNIX98 +extern int __pthread_rwlock_init (pthread_rwlock_t *__rwlock, + __const pthread_rwlockattr_t *__attr); + +extern int __pthread_rwlock_destroy (pthread_rwlock_t *__rwlock); + +extern int __pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock); + +extern int __pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock); + +extern int __pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock); + +extern int __pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock); + +extern int __pthread_rwlock_unlock (pthread_rwlock_t *__rwlock); +#endif + +extern int __pthread_key_create (pthread_key_t *__key, + void (*__destr_function) (void *)); + +extern int __pthread_setspecific (pthread_key_t __key, + __const void *__pointer); + +extern void *__pthread_getspecific (pthread_key_t __key); + +extern int __pthread_once (pthread_once_t *__once_control, + void (*__init_routine) (void)); + +extern int __pthread_atfork (void (*__prepare) (void), + void (*__parent) (void), + void (*__child) (void)); + +__END_DECLS + +/* Make the pthread functions weak so that we can elide them from + single-threaded processes. */ +#ifndef __NO_WEAK_PTHREAD_ALIASES +# pragma weak __pthread_mutex_init +# pragma weak __pthread_mutex_destroy +# pragma weak __pthread_mutex_lock +# pragma weak __pthread_mutex_trylock +# pragma weak __pthread_mutex_unlock +# pragma weak __pthread_mutexattr_init +# pragma weak __pthread_mutexattr_destroy +# pragma weak __pthread_mutexattr_settype +# pragma weak __pthread_rwlock_destroy +# pragma weak __pthread_rwlock_rdlock +# pragma weak __pthread_rwlock_tryrdlock +# pragma weak __pthread_rwlock_wrlock +# pragma weak __pthread_rwlock_trywrlock +# pragma weak __pthread_rwlock_unlock +# pragma weak __pthread_key_create +# pragma weak __pthread_setspecific +# pragma weak __pthread_getspecific +# pragma weak __pthread_once +# pragma weak __pthread_initialize +# pragma weak __pthread_atfork +# pragma weak _pthread_cleanup_push_defer +# pragma weak _pthread_cleanup_pop_restore +# pragma weak _pthread_cleanup_push +# pragma weak _pthread_cleanup_pop +#endif + +/* We need portable names for some functions. E.g., when they are + used as argument to __libc_cleanup_region_start. */ +#define __libc_mutex_unlock __pthread_mutex_unlock + +#endif /* bits/libc-lock.h */ diff --git a/fedora/makepatch.awk b/fedora/makepatch.awk new file mode 100644 index 0000000000..fadf1c7e56 --- /dev/null +++ b/fedora/makepatch.awk @@ -0,0 +1,58 @@ +#!/bin/awk -f +/^cvs (diff|server): tag.*is not in file/ { + print + next +} +/^cvs (diff|server): Diffing/ { + next +} +/^\? / { + next +} +/^Index:/ { + file=$2 + next +} +/^===============/ { + next +} +/^RCS/ { + next +} +/^retrieving/ { + next +} +/^diff/ { + next +} +/^---/ { + if ($2 ~ /^\/dev\/null/ || + $2 ~ /^\/tmp\//) + $2=file + if ($2 ~ /.cvsignore$/ || + $2 ~ /^c_stubs/ || + $2 ~ /^rtkaio/ || + $2 ~ /^powerpc-cpu/ || + $2 ~ /^fedora/ || + $2 ~ /^localedata\/charmaps\/GB18030/ || + $2 ~ /^iconvdata\/gb18030\.c/) { + hide = 1 + next + } else { + hide = 0 + } + sub(/^---[ ]*/,"--- " OLDVER "/") +} +/^\+\+\+/ { + if (hide) + next + if ($2 ~ /^\/dev\/null/ || + $2 ~ /^\/tmp\//) + $2=file + sub(/^\+\+\+[ ]*/,"+++ " NEWVER "/") +} +{ + if (hide) + next + print +} diff --git a/fedora/nsswitch.conf b/fedora/nsswitch.conf new file mode 100644 index 0000000000..a787750d31 --- /dev/null +++ b/fedora/nsswitch.conf @@ -0,0 +1,63 @@ +# +# /etc/nsswitch.conf +# +# An example Name Service Switch config file. This file should be +# sorted with the most-used services at the beginning. +# +# The entry '[NOTFOUND=return]' means that the search for an +# entry should stop if the search in the previous entry turned +# up nothing. Note that if the search failed due to some other reason +# (like no NIS server responding) then the search continues with the +# next entry. +# +# Legal entries are: +# +# nisplus or nis+ Use NIS+ (NIS version 3) +# nis or yp Use NIS (NIS version 2), also called YP +# dns Use DNS (Domain Name Service) +# files Use the local files +# db Use the local database (.db) files +# compat Use NIS on compat mode +# hesiod Use Hesiod for user lookups +# [NOTFOUND=return] Stop searching if not found so far +# + +# To use db, put the "db" in front of "files" for entries you want to be +# looked up first in the databases +# +# Example: +#passwd: db files nisplus nis +#shadow: db files nisplus nis +#group: db files nisplus nis + +passwd: files +shadow: files +group: files + +#hosts: db files nisplus nis dns +hosts: files dns + +# Example - obey only what nisplus tells us... +#services: nisplus [NOTFOUND=return] files +#networks: nisplus [NOTFOUND=return] files +#protocols: nisplus [NOTFOUND=return] files +#rpc: nisplus [NOTFOUND=return] files +#ethers: nisplus [NOTFOUND=return] files +#netmasks: nisplus [NOTFOUND=return] files + +bootparams: nisplus [NOTFOUND=return] files + +ethers: files +netmasks: files +networks: files +protocols: files +rpc: files +services: files + +netgroup: nisplus + +publickey: nisplus + +automount: files nisplus +aliases: files nisplus + diff --git a/fedora/power6emul.c b/fedora/power6emul.c new file mode 100644 index 0000000000..f1d0d20e0f --- /dev/null +++ b/fedora/power6emul.c @@ -0,0 +1,242 @@ +/* Emulate power6 mf[tf]gpr and fri[zpmn] instructions. + Copyright (C) 2006 Red Hat, Inc. + Contributed by Jakub Jelinek <jakub@redhat.com>, 2006. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + It is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +#include <signal.h> +#include <stdio.h> + +extern double frip (double), friz (double), frin (double), frim (double); +asm (".globl frip, friz, frin, frim\n.hidden frip, friz, frin, frim\n\t" +#ifdef __powerpc64__ + ".section \".toc\",\"aw\"\n" +"8:" ".tc FD_43300000_0[TC],0x4330000000000000\n" +"9:" ".tc FD_3fe00000_0[TC],0x3fe0000000000000\n\t" + ".previous\n\t" +#else + ".rodata\n\t" + ".align 2\n" +"8:" ".long 0x59800000\n" +"9:" ".long 0x3f000000\n\t" + ".previous\n\t" +#endif + "# frip == ceil\n" +"frip:" "mffs 11\n\t" +#ifdef __powerpc64__ + "lfd 13,8b@toc(2)\n\t" +#else + "mflr 11\n\t" + "bcl 20,31,1f\n" +"1:" "mflr 9\n\t" + "addis 9,9,8b-1b@ha\n\t" + "lfs 13,8b-1b@l(9)\n\t" + "mtlr 11\n\t" +#endif + "fabs 0,1\n\t" + "fsub 12,13,13\n\t" + "fcmpu 7,0,13\n\t" + "fcmpu 6,1,12\n\t" + "bnllr- 7\n\t" + "mtfsfi 7,2\n\t" + "ble- 6,2f\n\t" + "fadd 1,1,13\n\t" + "fsub 1,1,13\n\t" + "fabs 1,1\n\t" + "mtfsf 0x01,11\n\t" + "blr\n" +"2:" "bge- 6,3f\n\t" + "fsub 1,1,13\n\t" + "fadd 1,1,13\n\t" + "fnabs 1,1\n" +"3:" "mtfsf 0x01,11\n\t" + "blr\n\t" + "# friz == trunc\n" +"friz:" "mffs 11\n\t" +#ifdef __powerpc64__ + "lfd 13,8b@toc(2)\n\t" +#else + "mflr 11\n\t" + "bcl 20,31,1f\n" +"1:" "mflr 9\n\t" + "addis 9,9,8b-1b@ha\n\t" + "lfs 13,8b-1b@l(9)\n\t" + "mtlr 11\n\t" +#endif + "fabs 0,1\n\t" + "fsub 12,13,13\n\t" + "fcmpu 7,0,13\n\t" + "fcmpu 6,1,12\n\t" + "bnllr- 7\n\t" + "mtfsfi 7,1\n\t" + "ble- 6,2f\n\t" + "fadd 1,1,13\n\t" + "fsub 1,1,13\n\t" + "fabs 1,1\n\t" + "mtfsf 0x01,11\n\t" + "blr\n" +"2:" "bge- 6,3f\n\t" + "fsub 1,1,13\n\t" + "fadd 1,1,13\n\t" + "fnabs 1,1\n" +"3:" "mtfsf 0x01,11\n\t" + "blr\n\t" + "# frin == round\n" +"frin:" "mffs 11\n\t" +#ifdef __powerpc64__ + "lfd 13,8b@toc(2)\n\t" +#else + "mflr 11\n\t" + "bcl 20,31,1f\n" +"1:" "mflr 9\n\t" + "addis 9,9,8b-1b@ha\n\t" + "addi 9,9,8b-1b@l\n\t" + "mtlr 11\n\t" + "lfs 13,0(9)\n\t" +#endif + "fabs 0,1\n\t" + "fsub 12,13,13\n\t" + "fcmpu 7,0,13\n\t" + "fcmpu 6,1,12\n\t" + "bnllr- 7\n\t" + "mtfsfi 7,1\n\t" +#ifdef __powerpc64__ + "lfd 10,9b@toc(2)\n\t" +#else + "lfs 10,9b-8b(9)\n\t" +#endif + "ble- 6,2f\n\t" + "fadd 1,1,10\n\t" + "fadd 1,1,13\n\t" + "fsub 1,1,13\n\t" + "fabs 1,1\n\t" + "mtfsf 0x01,11\n\t" + "blr\n" +"2:" "fsub 9,1,10\n\t" + "bge- 6,3f\n\t" + "fsub 1,9,13\n\t" + "fadd 1,1,13\n\t" + "fnabs 1,1\n" +"3:" "mtfsf 0x01,11\n\t" + "blr\n\t" + "# frim == floor\n" +"frim:" "mffs 11\n\t" +#ifdef __powerpc64__ + "lfd 13,8b@toc(2)\n\t" +#else + "mflr 11\n\t" + "bcl 20,31,1f\n" +"1:" "mflr 9\n\t" + "addis 9,9,8b-1b@ha\n\t" + "lfs 13,8b-1b@l(9)\n\t" + "mtlr 11\n\t" +#endif + "fabs 0,1\n\t" + "fsub 12,13,13\n\t" + "fcmpu 7,0,13\n\t" + "fcmpu 6,1,12\n\t" + "bnllr- 7\n\t" + "mtfsfi 7,3\n\t" + "ble- 6,2f\n\t" + "fadd 1,1,13\n\t" + "fsub 1,1,13\n\t" + "fabs 1,1\n\t" + "mtfsf 0x01,11\n\t" + "blr\n" +"2:" "bge- 6,3f\n\t" + "fsub 1,1,13\n\t" + "fadd 1,1,13\n\t" + "fnabs 1,1\n" +"3:" "mtfsf 0x01,11\n\t" + "blr\n"); + +static void +catch_sigill (int signal, struct sigcontext *ctx) +{ + unsigned int insn = *(unsigned int *) (ctx->regs->nip); +#ifdef __powerpc64__ + if ((insn & 0xfc1f07ff) == 0x7c0005be) /* mftgpr */ + { + unsigned long *regs = (unsigned long *) ctx->regs; + unsigned fpr = (insn >> 11) & 0x1f; + unsigned gpr = (insn >> 21) & 0x1f; + regs[gpr] = regs[fpr + 0x30]; + ctx->regs->nip += 4; + return; + } + if ((insn & 0xfc1f07ff) == 0x7c0004be) /*mffgpr */ + { + unsigned long *regs = (unsigned long *) ctx->regs; + unsigned fpr = (insn >> 21) & 0x1f; + unsigned gpr = (insn >> 11) & 0x1f; + regs[fpr + 0x30] = regs[gpr]; + ctx->regs->nip += 4; + return; + } +#endif + if ((insn & 0xfc1f073f) == 0xfc000310) /* fri[pznm] */ + { +#ifdef __powerpc64__ + double *regs = (double *) (((char *) ctx->regs) + 0x30 * 8); + unsigned int *fpscr = (unsigned int *) (((char *) ctx->regs) + 0x50 * 8 + 4); +#else + double *regs = (double *) (((char *) ctx->regs) + 0x30 * 4); + unsigned int *fpscr = (unsigned int *) (((char *) ctx->regs) + 0x30 * 4 + 0x20 * 8 + 4); +#endif + unsigned dest = (insn >> 21) & 0x1f; + unsigned src = (insn >> 11) & 0x1f; + switch (insn & 0xc0) + { + case 0: + regs[dest] = frin (regs[src]); + break; + case 0x40: + regs[dest] = friz (regs[src]); + break; + case 0x80: + regs[dest] = frip (regs[src]); + break; + case 0xc0: + regs[dest] = frim (regs[src]); + break; + } + /* Update raised exceptions. */ + union { unsigned int i[2]; double d; } u; + asm volatile ("mffs %0" : "=f" (u.d)); + u.i[1] &= 0xfffe0000; /* Is this correct? */ + *fpscr |= u.i[1]; + ctx->regs->nip += 4; + return; + } + + struct sigaction sa; + sa.sa_handler = SIG_DFL; + sigemptyset (&sa.sa_mask); + sa.sa_flags = 0; + sigaction (signal, &sa, NULL); + raise (signal); +} + +static void +__attribute__ ((constructor)) +install_handler (void) +{ + struct sigaction sa; + sa.sa_handler = (void *) catch_sigill; + sigemptyset (&sa.sa_mask); + sa.sa_flags = SA_RESTART; + sigaction (SIGILL, &sa, NULL); +} diff --git a/fedora/tzdata-update.c b/fedora/tzdata-update.c new file mode 100644 index 0000000000..f94f9a2609 --- /dev/null +++ b/fedora/tzdata-update.c @@ -0,0 +1,589 @@ +#ifdef __sparc__ +register void *__thread_self __asm ("g7"); +#endif +#define _GNU_SOURCE 1 +#include <errno.h> +#include <fcntl.h> +#include <stdlib.h> +#include <string.h> +#include <syscall.h> +#include <unistd.h> + +#if defined __i386__ +# define INTERNAL_SYSCALL_DECL(err) do { } while (0) +# define INTERNAL_SYSCALL(name, err, nr, args...) \ + ({ \ + register unsigned int resultvar; \ + asm volatile ( \ + "movl %1, %%eax\n\t" \ + "int $0x80\n\t" \ + : "=a" (resultvar) \ + : "i" (__NR_##name) ASMFMT_##nr(args) : "memory", "cc"); \ + (int) resultvar; }) +# define INTERNAL_SYSCALL_ERROR_P(val, err) \ + ((unsigned int) (val) >= 0xfffff001u) +# define ASMFMT_0() +# define ASMFMT_1(arg1) \ + , "b" (arg1) +# define ASMFMT_2(arg1, arg2) \ + , "b" (arg1), "c" (arg2) +# define ASMFMT_3(arg1, arg2, arg3) \ + , "b" (arg1), "c" (arg2), "d" (arg3) +#elif defined __x86_64__ +# define INTERNAL_SYSCALL_DECL(err) do { } while (0) +# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ + ({ \ + unsigned long resultvar; \ + LOAD_ARGS_##nr (args) \ + LOAD_REGS_##nr \ + asm volatile ( \ + "syscall\n\t" \ + : "=a" (resultvar) \ + : "0" (name) ASM_ARGS_##nr : "memory", "cc", "r11", "cx"); \ + (long) resultvar; }) +# define INTERNAL_SYSCALL(name, err, nr, args...) \ + INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args) +# define INTERNAL_SYSCALL_ERROR_P(val, err) \ + ((unsigned long) (val) >= -4095L) +# define LOAD_ARGS_0() +# define LOAD_REGS_0 +# define ASM_ARGS_0 +# define LOAD_ARGS_1(a1) \ + long int __arg1 = (long) (a1); \ + LOAD_ARGS_0 () +# define LOAD_REGS_1 \ + register long int _a1 asm ("rdi") = __arg1; \ + LOAD_REGS_0 +# define ASM_ARGS_1 ASM_ARGS_0, "r" (_a1) +# define LOAD_ARGS_2(a1, a2) \ + long int __arg2 = (long) (a2); \ + LOAD_ARGS_1 (a1) +# define LOAD_REGS_2 \ + register long int _a2 asm ("rsi") = __arg2; \ + LOAD_REGS_1 +# define ASM_ARGS_2 ASM_ARGS_1, "r" (_a2) +# define LOAD_ARGS_3(a1, a2, a3) \ + long int __arg3 = (long) (a3); \ + LOAD_ARGS_2 (a1, a2) +# define LOAD_REGS_3 \ + register long int _a3 asm ("rdx") = __arg3; \ + LOAD_REGS_2 +# define ASM_ARGS_3 ASM_ARGS_2, "r" (_a3) +#elif defined __powerpc__ +# define INTERNAL_SYSCALL_DECL(err) long int err +# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ + ({ \ + register long int r0 __asm__ ("r0"); \ + register long int r3 __asm__ ("r3"); \ + register long int r4 __asm__ ("r4"); \ + register long int r5 __asm__ ("r5"); \ + register long int r6 __asm__ ("r6"); \ + register long int r7 __asm__ ("r7"); \ + register long int r8 __asm__ ("r8"); \ + LOADARGS_##nr(name, args); \ + __asm__ __volatile__ \ + ("sc\n\t" \ + "mfcr %0\n\t" \ + : "=&r" (r0), \ + "=&r" (r3), "=&r" (r4), "=&r" (r5), \ + "=&r" (r6), "=&r" (r7), "=&r" (r8) \ + : ASM_INPUT_##nr \ + : "r9", "r10", "r11", "r12", \ + "cr0", "ctr", "memory"); \ + err = r0; \ + (int) r3; \ + }) +# define INTERNAL_SYSCALL(name, err, nr, args...) \ + INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args) +# define INTERNAL_SYSCALL_ERROR_P(val, err) \ + ((void) (val), __builtin_expect ((err) & (1 << 28), 0)) +# define LOADARGS_0(name, dummy) \ + r0 = name +# define LOADARGS_1(name, __arg1) \ + long int arg1 = (long int) (__arg1); \ + LOADARGS_0(name, 0); \ + r3 = arg1 +# define LOADARGS_2(name, __arg1, __arg2) \ + long int arg2 = (long int) (__arg2); \ + LOADARGS_1(name, __arg1); \ + r4 = arg2 +# define LOADARGS_3(name, __arg1, __arg2, __arg3) \ + long int arg3 = (long int) (__arg3); \ + LOADARGS_2(name, __arg1, __arg2); \ + r5 = arg3 +# define ASM_INPUT_0 "0" (r0) +# define ASM_INPUT_1 ASM_INPUT_0, "1" (r3) +# define ASM_INPUT_2 ASM_INPUT_1, "2" (r4) +# define ASM_INPUT_3 ASM_INPUT_2, "3" (r5) +#elif defined __ia64__ +# define DO_INLINE_SYSCALL_NCS(name, nr, args...) \ + LOAD_ARGS_##nr (args) \ + register long _r8 asm ("r8"); \ + register long _r10 asm ("r10"); \ + register long _r15 asm ("r15") = name; \ + long _retval; \ + LOAD_REGS_##nr \ + __asm __volatile ("break 0x100000;;" \ + : "=r" (_r8), "=r" (_r10), "=r" (_r15) \ + ASM_OUTARGS_##nr \ + : "2" (_r15) ASM_ARGS_##nr \ + : "memory" ASM_CLOBBERS_##nr); \ + _retval = _r8; +# define INTERNAL_SYSCALL_DECL(err) long int err +# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \ + ({ \ + DO_INLINE_SYSCALL_NCS (name, nr, args) \ + err = _r10; \ + _retval; }) +# define INTERNAL_SYSCALL(name, err, nr, args...) \ + INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args) +# define INTERNAL_SYSCALL_ERROR_P(val, err) (err == -1) +# define LOAD_ARGS_0() +# define LOAD_REGS_0 +# define LOAD_ARGS_1(a1) \ + long _arg1 = (long) (a1); \ + LOAD_ARGS_0 () +# define LOAD_REGS_1 \ + register long _out0 asm ("out0") = _arg1; \ + LOAD_REGS_0 +# define LOAD_ARGS_2(a1, a2) \ + long _arg2 = (long) (a2); \ + LOAD_ARGS_1 (a1) +# define LOAD_REGS_2 \ + register long _out1 asm ("out1") = _arg2; \ + LOAD_REGS_1 +# define LOAD_ARGS_3(a1, a2, a3) \ + long _arg3 = (long) (a3); \ + LOAD_ARGS_2 (a1, a2) +# define LOAD_REGS_3 \ + register long _out2 asm ("out2") = _arg3; \ + LOAD_REGS_2 +# define ASM_OUTARGS_0 +# define ASM_OUTARGS_1 ASM_OUTARGS_0, "=r" (_out0) +# define ASM_OUTARGS_2 ASM_OUTARGS_1, "=r" (_out1) +# define ASM_OUTARGS_3 ASM_OUTARGS_2, "=r" (_out2) +# define ASM_ARGS_0 +# define ASM_ARGS_1 ASM_ARGS_0, "3" (_out0) +# define ASM_ARGS_2 ASM_ARGS_1, "4" (_out1) +# define ASM_ARGS_3 ASM_ARGS_2, "5" (_out2) +# define ASM_CLOBBERS_0 ASM_CLOBBERS_1, "out0" +# define ASM_CLOBBERS_1 ASM_CLOBBERS_2, "out1" +# define ASM_CLOBBERS_2 ASM_CLOBBERS_3, "out2" +# define ASM_CLOBBERS_3 ASM_CLOBBERS_4, "out3" +# define ASM_CLOBBERS_4 ASM_CLOBBERS_5, "out4" +# define ASM_CLOBBERS_5 ASM_CLOBBERS_6, "out5" +# define ASM_CLOBBERS_6_COMMON , "out6", "out7", \ + /* Non-stacked integer registers, minus r8, r10, r15. */ \ + "r2", "r3", "r9", "r11", "r12", "r13", "r14", "r16", "r17", "r18", \ + "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27", \ + "r28", "r29", "r30", "r31", \ + /* Predicate registers. */ \ + "p6", "p7", "p8", "p9", "p10", "p11", "p12", "p13", "p14", "p15", \ + /* Non-rotating fp registers. */ \ + "f6", "f7", "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \ + /* Branch registers. */ \ + "b6" +# define ASM_CLOBBERS_6 ASM_CLOBBERS_6_COMMON , "b7" +#elif defined __s390__ +# define INTERNAL_SYSCALL_DECL(err) do { } while (0) +# define INTERNAL_SYSCALL_DIRECT(name, err, nr, args...) \ + ({ \ + DECLARGS_##nr(args) \ + register long _ret asm("2"); \ + asm volatile ( \ + "svc %b1\n\t" \ + : "=d" (_ret) \ + : "i" (__NR_##name) ASMFMT_##nr \ + : "memory" ); \ + _ret; }) +# define INTERNAL_SYSCALL_SVC0(name, err, nr, args...) \ + ({ \ + DECLARGS_##nr(args) \ + register unsigned long _nr asm("1") = (unsigned long)(__NR_##name); \ + register long _ret asm("2"); \ + asm volatile ( \ + "svc 0\n\t" \ + : "=d" (_ret) \ + : "d" (_nr) ASMFMT_##nr \ + : "memory" ); \ + _ret; }) +# define INTERNAL_SYSCALL(name, err, nr, args...) \ + (((__NR_##name) < 256) ? \ + INTERNAL_SYSCALL_DIRECT(name, err, nr, args) : \ + INTERNAL_SYSCALL_SVC0(name, err,nr, args)) +# define INTERNAL_SYSCALL_ERROR_P(val, err) \ + ((unsigned long) (val) >= -4095UL) +# define DECLARGS_0() +# define DECLARGS_1(arg1) \ + register unsigned long gpr2 asm ("2") = (unsigned long)(arg1); +# define DECLARGS_2(arg1, arg2) \ + DECLARGS_1(arg1) \ + register unsigned long gpr3 asm ("3") = (unsigned long)(arg2); +# define DECLARGS_3(arg1, arg2, arg3) \ + DECLARGS_2(arg1, arg2) \ + register unsigned long gpr4 asm ("4") = (unsigned long)(arg3); +# define ASMFMT_0 +# define ASMFMT_1 , "0" (gpr2) +# define ASMFMT_2 , "0" (gpr2), "d" (gpr3) +# define ASMFMT_3 , "0" (gpr2), "d" (gpr3), "d" (gpr4) +#elif defined __sparc__ +# ifndef __arch64__ +# define __INTERNAL_SYSCALL_STRING \ + "ta 0x10;" \ + "bcs,a 1f;" \ + " sub %%g0, %%o0, %%o0;" \ + "1:" +# define __SYSCALL_CLOBBERS "g2", "g3", "g4", "g5", "g6", \ + "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \ + "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \ + "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", \ + "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", \ + "cc", "memory" +# else +# define __INTERNAL_SYSCALL_STRING \ + "ta 0x6d;" \ + "bcs,a,pt %%xcc, 1f;" \ + " sub %%g0, %%o0, %%o0;" \ + "1:" +# define __SYSCALL_CLOBBERS "g2", "g3", "g4", "g5", "g6", \ + "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7", \ + "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15", \ + "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23", \ + "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31", \ + "f32", "f34", "f36", "f38", "f40", "f42", "f44", "f46", \ + "f48", "f50", "f52", "f54", "f56", "f58", "f60", "f62", \ + "cc", "memory" +# endif +#define INTERNAL_SYSCALL_DECL(err) do { } while (0) +#define INTERNAL_SYSCALL(name, err, nr, args...) \ + inline_syscall##nr(__INTERNAL_SYSCALL_STRING, __NR_##name, args) +#define INTERNAL_SYSCALL_ERROR_P(val, err) \ + ((unsigned long) (val) >= -515L) +# define inline_syscall0(string,name,dummy...) \ +({ \ + register long __o0 __asm__ ("o0"); \ + register long __g1 __asm__ ("g1") = name; \ + __asm __volatile (string : "=r" (__g1), "=r" (__o0) : \ + "0" (__g1) : \ + __SYSCALL_CLOBBERS); \ + __o0; \ +}) +# define inline_syscall1(string,name,arg1) \ +({ \ + register long __o0 __asm__ ("o0") = (long)(arg1); \ + register long __g1 __asm__ ("g1") = name; \ + __asm __volatile (string : "=r" (__g1), "=r" (__o0) : \ + "0" (__g1), "1" (__o0) : \ + __SYSCALL_CLOBBERS); \ + __o0; \ +}) +# define inline_syscall2(string,name,arg1,arg2) \ +({ \ + register long __o0 __asm__ ("o0") = (long)(arg1); \ + register long __o1 __asm__ ("o1") = (long)(arg2); \ + register long __g1 __asm__ ("g1") = name; \ + __asm __volatile (string : "=r" (__g1), "=r" (__o0) : \ + "0" (__g1), "1" (__o0), "r" (__o1) : \ + __SYSCALL_CLOBBERS); \ + __o0; \ +}) +# define inline_syscall3(string,name,arg1,arg2,arg3) \ +({ \ + register long __o0 __asm__ ("o0") = (long)(arg1); \ + register long __o1 __asm__ ("o1") = (long)(arg2); \ + register long __o2 __asm__ ("o2") = (long)(arg3); \ + register long __g1 __asm__ ("g1") = name; \ + __asm __volatile (string : "=r" (__g1), "=r" (__o0) : \ + "0" (__g1), "1" (__o0), "r" (__o1), \ + "r" (__o2) : \ + __SYSCALL_CLOBBERS); \ + __o0; \ +}) +#elif defined __alpha__ +# define INTERNAL_SYSCALL(name, err_out, nr, args...) \ + INTERNAL_SYSCALL1(name, err_out, nr, args) +# define INTERNAL_SYSCALL1(name, err_out, nr, args...) \ + INTERNAL_SYSCALL_NCS(__NR_##name, err_out, nr, args) +# define INTERNAL_SYSCALL_NCS(name, err_out, nr, args...) \ +({ \ + long _sc_ret, _sc_err; \ + inline_syscall##nr(name, args); \ + err_out = _sc_err; \ + _sc_ret; \ +}) +# define INTERNAL_SYSCALL_DECL(err) long int err +# define INTERNAL_SYSCALL_ERROR_P(val, err) err +# define inline_syscall_clobbers \ + "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \ + "$22", "$23", "$24", "$25", "$27", "$28", "memory" +# define inline_syscall_r0_asm +# define inline_syscall_r0_out_constraint "=v" +# define inline_syscall0(name, args...) \ +{ \ + register long _sc_0 inline_syscall_r0_asm; \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = name; \ + __asm__ __volatile__ \ + ("callsys # %0 %1 <= %2" \ + : inline_syscall_r0_out_constraint (_sc_0), \ + "=r"(_sc_19) \ + : "0"(_sc_0) \ + : inline_syscall_clobbers, \ + "$16", "$17", "$18", "$20", "$21"); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} +# define inline_syscall1(name,arg1) \ +{ \ + register long _sc_0 inline_syscall_r0_asm; \ + register long _sc_16 __asm__("$16"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = name; \ + _sc_16 = (long) (arg1); \ + __asm__ __volatile__ \ + ("callsys # %0 %1 <= %2 %3" \ + : inline_syscall_r0_out_constraint (_sc_0), \ + "=r"(_sc_19), "=r"(_sc_16) \ + : "0"(_sc_0), "2"(_sc_16) \ + : inline_syscall_clobbers, \ + "$17", "$18", "$20", "$21"); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} +# define inline_syscall2(name,arg1,arg2) \ +{ \ + register long _sc_0 inline_syscall_r0_asm; \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = name; \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + __asm__ __volatile__ \ + ("callsys # %0 %1 <= %2 %3 %4" \ + : inline_syscall_r0_out_constraint (_sc_0), \ + "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17) \ + : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17) \ + : inline_syscall_clobbers, \ + "$18", "$20", "$21"); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} +# define inline_syscall3(name,arg1,arg2,arg3) \ +{ \ + register long _sc_0 inline_syscall_r0_asm; \ + register long _sc_16 __asm__("$16"); \ + register long _sc_17 __asm__("$17"); \ + register long _sc_18 __asm__("$18"); \ + register long _sc_19 __asm__("$19"); \ + \ + _sc_0 = name; \ + _sc_16 = (long) (arg1); \ + _sc_17 = (long) (arg2); \ + _sc_18 = (long) (arg3); \ + __asm__ __volatile__ \ + ("callsys # %0 %1 <= %2 %3 %4 %5" \ + : inline_syscall_r0_out_constraint (_sc_0), \ + "=r"(_sc_19), "=r"(_sc_16), "=r"(_sc_17), \ + "=r"(_sc_18) \ + : "0"(_sc_0), "2"(_sc_16), "3"(_sc_17), \ + "4"(_sc_18) \ + : inline_syscall_clobbers, "$20", "$21"); \ + _sc_ret = _sc_0, _sc_err = _sc_19; \ +} +#endif + +char buffer[32768], data[32768]; +size_t datasize; +char zonename[1024]; + +ssize_t +readall (int fd, void *buf, size_t len) +{ + INTERNAL_SYSCALL_DECL (err); + size_t n = len; + ssize_t ret; + do + { + ret = INTERNAL_SYSCALL (read, err, 3, fd, buf, n); + if (INTERNAL_SYSCALL_ERROR_P (ret, err)) + { + ret = -1; + break; + } + else if (ret == 0) + break; + buf = (char *) buf + ret; + n -= ret; + } + while (n > 0); + return ret < 0 ? ret : (ssize_t) (len - n); +} + +ssize_t +writeall (int fd, const void *buf, size_t len) +{ + INTERNAL_SYSCALL_DECL (err); + size_t n = len; + ssize_t ret; + do + { + ret = INTERNAL_SYSCALL (write, err, 3, fd, buf, n); + if (INTERNAL_SYSCALL_ERROR_P (ret, err)) + { + ret = -1; + break; + } + else if (ret == 0) + break; + buf = (const char *) buf + ret; + n -= ret; + } + while (n > 0); + return ret < 0 ? ret : (ssize_t) (len - n); +} + +void +update (const char *filename) +{ + INTERNAL_SYSCALL_DECL (err); + long int fd = INTERNAL_SYSCALL (open, err, 2, filename, O_RDONLY); + if (INTERNAL_SYSCALL_ERROR_P (fd, err)) + return; + ssize_t ret = readall (fd, buffer, sizeof (buffer)); + INTERNAL_SYSCALL (close, err, 1, fd); + if (ret <= 0 || (size_t) ret == sizeof (buffer)) + return; + /* Don't update the file unnecessarily. */ + if ((size_t) ret == datasize && memcmp (buffer, data, datasize) == 0) + return; + size_t len = strlen (filename); + char tempfilename[len + sizeof (".tzupdate")]; + memcpy (tempfilename, filename, len); + memcpy (tempfilename + len, ".tzupdate", sizeof (".tzupdate")); + + fd = INTERNAL_SYSCALL (open, err, 3, tempfilename, O_WRONLY | O_CREAT | O_EXCL, 0600); + if (INTERNAL_SYSCALL_ERROR_P (fd, err)) + return; + if (writeall (fd, data, datasize) != datasize) + { +clean_up: + INTERNAL_SYSCALL (unlink, err, 1, tempfilename); + INTERNAL_SYSCALL (close, err, 1, fd); + return; + } + long int sret; + sret = INTERNAL_SYSCALL (fchmod, err, 2, fd, 0644); + if (INTERNAL_SYSCALL_ERROR_P (sret, err)) + goto clean_up; + INTERNAL_SYSCALL (close, err, 1, fd); + + sret = INTERNAL_SYSCALL (rename, err, 2, tempfilename, filename); + if (INTERNAL_SYSCALL_ERROR_P (sret, err)) + INTERNAL_SYSCALL (unlink, err, 1, tempfilename); +} + +int +main (int argc, char **argv) +{ + INTERNAL_SYSCALL_DECL (err); + long int fd = INTERNAL_SYSCALL (open, err, 2, "/etc/sysconfig/clock", O_RDONLY); + if (INTERNAL_SYSCALL_ERROR_P (fd, err)) + return 0; + ssize_t ret = readall (fd, buffer, sizeof (buffer) - 1); + INTERNAL_SYSCALL (close, err, 1, fd); + if (ret <= 0 || (size_t) ret == sizeof (buffer) - 1) + return 0; + char *p = buffer; + while (p != NULL) + { + while (*p == ' ' || *p == '\t') p++; + if (memcmp (p, "ZONE", 4) == 0) + { + p += 4; + while (*p == ' ' || *p == '\t') p++; + if (*p == '=') + { + p++; + while (*p == ' ' || *p == '\t') p++; + if (*p == '"') p++; + char *q = p; + while (strchr (" \t\n\"", *p) == NULL) p++; + const char path[] = "/usr/share/zoneinfo/"; + if (p - q >= sizeof (zonename) - sizeof (path)) + return 0; + memcpy (zonename, path, sizeof (path) - 1); + memcpy (zonename + sizeof (path) - 1, q, p - q); + break; + } + } + p = strchr (p, '\n'); + if (p) p++; + } + if (*zonename == '\0') + return 0; + fd = INTERNAL_SYSCALL (open, err, 2, zonename, O_RDONLY); + if (INTERNAL_SYSCALL_ERROR_P (fd, err)) + return 0; + ret = readall (fd, data, sizeof (data)); + INTERNAL_SYSCALL (close, err, 1, fd); + if (ret <= 0 || (size_t) ret == sizeof (data)) + return 0; + datasize = (size_t) ret; + update ("/etc/localtime"); + update ("/var/spool/postfix/etc/localtime"); + return 0; +} + +int __libc_multiple_threads __attribute__((nocommon)); +int __libc_enable_asynccancel (void) { return 0; } +void __libc_disable_asynccancel (int x) { } +void __libc_csu_init (void) { } +void __libc_csu_fini (void) { } +pid_t __fork (void) { return -1; } +char thr_buf[65536]; + +#ifndef __powerpc__ +int __libc_start_main (int (*main) (int argc, char **argv), + int argc, char **argv, + void (*init) (void), void (*fini) (void), + void (*rtld_fini) (void), void * stack_end) +#else +struct startup_info +{ + void *sda_base; + int (*main) (int, char **, char **, void *); + int (*init) (int, char **, char **, void *); + void (*fini) (void); +}; + +int __libc_start_main (int argc, char **argv, char **ev, + void *auxvec, void (*rtld_fini) (void), + struct startup_info *stinfo, + char **stack_on_entry) +#endif +{ +#if defined __ia64__ || defined __powerpc64__ + register void *r13 __asm ("r13") = thr_buf + 32768; + __asm ("" : : "r" (r13)); +#elif defined __sparc__ + register void *g6 __asm ("g6") = thr_buf + 32768; + __thread_self = thr_buf + 32768; + __asm ("" : : "r" (g6), "r" (__thread_self)); +#elif defined __s390__ && !defined __s390x__ + __asm ("sar %%a0,%0" : : "d" (thr_buf + 32768)); +#elif defined __s390x__ + __asm ("sar %%a1,%0; srlg 0,%0,32; sar %%a0,0" : : "d" (thr_buf + 32768) : "0"); +#elif defined __powerpc__ && !defined __powerpc64__ + register void *r2 __asm ("r2") = thr_buf + 32768; + __asm ("" : : "r" (r2)); +#endif +#ifdef __powerpc__ + argc = (long)*stack_on_entry; + argv = stack_on_entry + 1; +#endif + long ret = main (argc, argv); + INTERNAL_SYSCALL_DECL (err); + INTERNAL_SYSCALL (exit, err, 1, ret); + return 110; +} |