Compare commits

..

14 Commits
master ... f9

Author SHA1 Message Date
Fedora Release Engineering
f03af64931 dist-git conversion 2010-07-28 15:51:12 +00:00
Bill Nottingham
690b76f49a Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:57:36 +00:00
Dennis Gilmore
63801099f4 update sparcv9v memset patch 2008-10-10 22:15:06 +00:00
Dennis Gilmore
989b0e1237 check in the patch 2008-10-08 22:17:35 +00:00
Dennis Gilmore
1c2d86471d apply sparcv9v memset patch 2008-10-08 22:15:54 +00:00
Jakub Jelinek
005e850828 2.8-8 2008-07-16 14:58:16 +00:00
Jakub Jelinek
456c7dc140 2.8-7 2008-07-08 16:46:35 +00:00
Jakub Jelinek
98034c49e9 2.8-7 2008-07-08 16:07:56 +00:00
Tom Callaway
37f89d6bda re-enable async-unwind-tables 2008-05-27 01:46:16 +00:00
Tom Callaway
d8f6a3c530 fasynchronous-unwind-tables causes failures on sparc arches, dont use it 2008-05-18 04:22:33 +00:00
Tom Callaway
a5e3dfc4f0 fix compilation flags for sparc64, sparc64v 2008-05-16 21:52:03 +00:00
Jakub Jelinek
3c36f8f7e6 2.8-3 2008-05-05 12:02:18 +00:00
Jakub Jelinek
89117e90e2 2.8-2 2008-04-30 12:49:32 +00:00
Jesse Keating
9a93e02318 Initialize branch F-9 for glibc 2008-04-20 19:44:39 +00:00
57 changed files with 17995 additions and 11562 deletions

8
.gitignore vendored
View File

@ -1,6 +1,2 @@
# Release tarballs.
/glibc-*.tar.[gx]z
# Generated (source) RPMs.
/*.rpm
# Expanded source trees.
/glibc-*/
glibc-20080412T0741.tar.bz2
glibc-fedora-20080412T0741.tar.bz2

File diff suppressed because it is too large Load Diff

View File

@ -1,34 +0,0 @@
This package supports working with patch files using quilt.
To regenerate the quilt series file run:
./gen-quilt-series.sh
Setup environment:
export QUILT_PATCHES=$PWD
Setup the source:
./quilt-patch.sh [-f]
Use `-f` if you want to have quilt-patch always remove the existing
source directory before starting. Otherwise you'll be patching on top of
an already patched tree generated perhaps by `*pkg prep`.
Create a new patch:
cd glibc-2.17-c758a686/
quilt new glibc-rh1234622.patch
quilt add ports/sysdeps/unix/sysv/linux/aarch64/nptl/libpthread.abilist
vi ports/sysdeps/unix/sysv/linux/aarch64/nptl/libpthread.abilist
quilt refresh
cd ..
git add glibc-rh1234622.patch
<Then edit the glibc.spec file to build with the new patch>
e.g.
...
PatchXXXX: glibc-rh1234622.patch
...
%patchXXXX -p1
...
git add glibc.spec
git commit
You're done!

View File

@ -1,2 +0,0 @@
All of the useful glibc maintainer scripts are located at:
https://pagure.io/glibc-maintainer-scripts

View File

@ -1,97 +0,0 @@
srpm glibc
# setup glibc
# This path MUST be relative, not absolute
GV=$(cd $SRC; echo glibc-2*)
if [ "$TARGET_ARCH" == "armv7hl" ]; then
# rtkaio not supported on ARM
rm -rf $SRC/$GV/rtkaio
fi
GLIBCARGS="--prefix=/usr
--with-headers=$ROOTFS/usr/include
--enable-kernel=2.6.32
--enable-bind-now
--build $BUILD
--host $TARGET
--disable-profile
--cache-file=config.cache
--without-cvs
--with-elf
--without-gd
--disable-sanity-checks
--with-tls
--with-__thread
--enable-obsolete-rpc
"
mcd $BUILDDIR/glibc
# prefill glibc cache
echo libc_cv_forced_unwind=yes > config.cache
echo libc_cv_c_cleanup=yes >> config.cache
#echo libc_cv_ctors_header=yes >> config.cache
echo ac_cv_header_cpuid_h=yes >> config.cache
echo libc_cv_gcc_builtin_expect=yes >> config.cache
$SRC/$GV/configure $GLIBCARGS
notparallel
make $J ARCH=${KARCH} BUILD_CC=gcc cross-compiling=yes
make DESTDIR=$ROOTFS $J ARCH=${KARCH} BUILD_CC=gcc cross-compiling=yes install
( cd $ROOTFS/usr/include/bits
sed '/ifndef.*NO_LONG_DOUBLE/,/#endif/d' < mathdef.h > mathdef.h.new
mv mathdef.h.new mathdef.h
)
# 32-bit multilib libgcc needs 32-bit headers
if [ ! "$TARGET32" = "" ]; then
old_CC=$CC
old_CXX=$CC
export CC="$TARGET-gcc -m32"
export CXX="$TARGET-g++ -m32"
GLIBCARGS="--prefix=/usr
--with-headers=$ROOTFS/usr/include
--enable-kernel=2.6.32
--enable-bind-now
--build $BUILD
--host $TARGET32
--disable-profile
--cache-file=config.cache
--without-cvs
--with-elf
--without-gd
--disable-sanity-checks
--with-tls
--with-__thread
--enable-obsolete-rpc
"
mcd $BUILDDIR/glibc32
# prefill glibc cache
echo libc_cv_forced_unwind=yes > config.cache
echo libc_cv_c_cleanup=yes >> config.cache
echo libc_cv_ctors_header=yes >> config.cache
echo ac_cv_header_cpuid_h=yes >> config.cache
echo libc_cv_gcc_builtin_expect=yes >> config.cache
$SRC/$GV/configure $GLIBCARGS
notparallel
make $J ARCH=${KARCH} BUILD_CC=gcc cross-compiling=yes
make DESTDIR=$ROOTFS $J ARCH=${KARCH} BUILD_CC=gcc cross-compiling=yes install
( cd $ROOTFS/usr/include/bits
sed '/ifndef.*NO_LONG_DOUBLE/,/#endif/d' < mathdef.h > mathdef.h.new
mv mathdef.h.new mathdef.h
)
CC=$old_CC
CXX=$old_CXX
export $CC
export $CXX
fi

View File

@ -1,117 +0,0 @@
set -vx
srpm glibc
# setup glibc
# This path MUST be relative, not absolute
GV=$(cd $SRC; echo glibc-2*)
GLIBCARGS="--prefix=/usr
--with-headers=$ROOTFS/usr/include
--enable-kernel=2.6.32
--enable-bind-now
--build $BUILD
--host $TARGET
--disable-profile
--cache-file=config.cache
--without-cvs
--with-elf
--without-gd
--disable-sanity-checks
--with-tls
--with-__thread
--enable-obsolete-rpc
"
mcd $BUILDDIR/glibc-stage1
# prefill glibc cache
echo libc_cv_forced_unwind=yes > config.cache
echo libc_cv_c_cleanup=yes >> config.cache
#echo libc_cv_ctors_header=yes >> config.cache
echo ac_cv_header_cpuid_h=yes >> config.cache
echo libc_cv_gcc_builtin_expect=yes >> config.cache
$SRC/$GV/configure $GLIBCARGS
notparallel
make DESTDIR=$ROOTFS $J ARCH=${KARCH} BUILD_CC=gcc cross-compiling=yes install-headers
touch $ROOTFS/usr/include/gnu/stubs.h
touch $ROOTFS/usr/include/bits/stdio_lim.h
( cd $ROOTFS/usr/include/bits
sed '/ifndef.*NO_LONG_DOUBLE/,/#endif/d' < mathdef.h > mathdef.h.new
mv mathdef.h.new mathdef.h
)
# We also build just enough files to link libgcc.so. The fake
# libc.so will never actually get used, but simplifies the boostrap.
make $J ARCH=${KARCH} BUILD_CC=gcc cross-compiling=yes csu/subdir_lib
mkdirp $ROOTFS/usr/lib${SUFFIX}
for file in `cd csu; echo crt*.o`; do
echo "" | $TARGET-as -o $ROOTFS/usr/lib${SUFFIX}/$file
done
$TARGET-gcc -nostdlib -nostartfiles -shared -x c /dev/null\
-o $ROOTFS/usr/lib${SUFFIX}/libc.so
# 32-bit multilib libgcc needs stub 32-bit libraries
if [ ! "$TARGET32" = "" ]; then
old_CC=$CC
old_CXX=$CC
export CC="$TARGET-gcc -m32"
export CXX="$TARGET-g++ -m32"
# setup 32-bit glibc headers
GLIBCARGS="--prefix=/usr
--with-headers=$ROOTFS/usr/include
--enable-kernel=2.6.32
--enable-bind-now
--build $BUILD
--host $TARGET32
--disable-profile
--cache-file=config.cache
--without-cvs
--with-elf
--without-gd
--disable-sanity-checks
--with-tls
--with-__thread
--enable-obsolete-rpc
"
mcd $BUILDDIR/glibc32-stage1
# prefill glibc cache
echo libc_cv_forced_unwind=yes > config.cache
echo libc_cv_c_cleanup=yes >> config.cache
#echo libc_cv_ctors_header=yes >> config.cache
echo ac_cv_header_cpuid_h=yes >> config.cache
echo libc_cv_gcc_builtin_expect=yes >> config.cache
$SRC/$GV/configure $GLIBCARGS
notparallel
make DESTDIR=$ROOTFS $J ARCH=${KARCH} BUILD_CC=gcc cross-compiling=yes install-headers
touch $ROOTFS/usr/include/gnu/stubs.h
touch $ROOTFS/usr/include/bits/stdio_lim.h
( cd $ROOTFS/usr/include/bits
sed '/ifndef.*NO_LONG_DOUBLE/,/#endif/d' < mathdef.h > mathdef.h.new
mv mathdef.h.new mathdef.h
)
# We also build just enough files to link libgcc.so. The fake
# libc.so will never actually get used, but simplifies the boostrap.
make $J ARCH=${KARCH} BUILD_CC=gcc cross-compiling=yes csu/subdir_lib
mkdirp $ROOTFS/usr/lib
for file in `cd csu; echo crt*.o`; do
echo "" | $TARGET-as --32 -o $ROOTFS/usr/lib/$file
done
$CC -m32 -nostdlib -nostartfiles -shared -x c /dev/null\
-o $ROOTFS/usr/lib/libc.so
CC=$old_CC
CXX=$old_CXX
export $CC
export $CXX
fi

494
SUPPORTED
View File

@ -1,494 +0,0 @@
# This file names the currently supported and somewhat tested locales.
# If you have any additions please file a glibc bug report.
SUPPORTED-LOCALES=\
C.UTF-8/UTF-8 \
aa_DJ.UTF-8/UTF-8 \
aa_DJ/ISO-8859-1 \
aa_ER/UTF-8 \
aa_ER@saaho/UTF-8 \
aa_ET/UTF-8 \
af_ZA.UTF-8/UTF-8 \
af_ZA/ISO-8859-1 \
agr_PE/UTF-8 \
ak_GH/UTF-8 \
am_ET/UTF-8 \
an_ES.UTF-8/UTF-8 \
an_ES/ISO-8859-15 \
anp_IN/UTF-8 \
ar_AE.UTF-8/UTF-8 \
ar_AE/ISO-8859-6 \
ar_BH.UTF-8/UTF-8 \
ar_BH/ISO-8859-6 \
ar_DZ.UTF-8/UTF-8 \
ar_DZ/ISO-8859-6 \
ar_EG.UTF-8/UTF-8 \
ar_EG/ISO-8859-6 \
ar_IN/UTF-8 \
ar_IQ.UTF-8/UTF-8 \
ar_IQ/ISO-8859-6 \
ar_JO.UTF-8/UTF-8 \
ar_JO/ISO-8859-6 \
ar_KW.UTF-8/UTF-8 \
ar_KW/ISO-8859-6 \
ar_LB.UTF-8/UTF-8 \
ar_LB/ISO-8859-6 \
ar_LY.UTF-8/UTF-8 \
ar_LY/ISO-8859-6 \
ar_MA.UTF-8/UTF-8 \
ar_MA/ISO-8859-6 \
ar_OM.UTF-8/UTF-8 \
ar_OM/ISO-8859-6 \
ar_QA.UTF-8/UTF-8 \
ar_QA/ISO-8859-6 \
ar_SA.UTF-8/UTF-8 \
ar_SA/ISO-8859-6 \
ar_SD.UTF-8/UTF-8 \
ar_SD/ISO-8859-6 \
ar_SS/UTF-8 \
ar_SY.UTF-8/UTF-8 \
ar_SY/ISO-8859-6 \
ar_TN.UTF-8/UTF-8 \
ar_TN/ISO-8859-6 \
ar_YE.UTF-8/UTF-8 \
ar_YE/ISO-8859-6 \
ayc_PE/UTF-8 \
az_AZ/UTF-8 \
az_IR/UTF-8 \
as_IN/UTF-8 \
ast_ES.UTF-8/UTF-8 \
ast_ES/ISO-8859-15 \
be_BY.UTF-8/UTF-8 \
be_BY/CP1251 \
be_BY@latin/UTF-8 \
bem_ZM/UTF-8 \
ber_DZ/UTF-8 \
ber_MA/UTF-8 \
bg_BG.UTF-8/UTF-8 \
bg_BG/CP1251 \
bhb_IN.UTF-8/UTF-8 \
bho_IN/UTF-8 \
bho_NP/UTF-8 \
bi_VU/UTF-8 \
bn_BD/UTF-8 \
bn_IN/UTF-8 \
bo_CN/UTF-8 \
bo_IN/UTF-8 \
br_FR.UTF-8/UTF-8 \
br_FR/ISO-8859-1 \
br_FR@euro/ISO-8859-15 \
brx_IN/UTF-8 \
bs_BA.UTF-8/UTF-8 \
bs_BA/ISO-8859-2 \
byn_ER/UTF-8 \
ca_AD.UTF-8/UTF-8 \
ca_AD/ISO-8859-15 \
ca_ES.UTF-8/UTF-8 \
ca_ES/ISO-8859-1 \
ca_ES@euro/ISO-8859-15 \
ca_ES@valencia/UTF-8 \
ca_FR.UTF-8/UTF-8 \
ca_FR/ISO-8859-15 \
ca_IT.UTF-8/UTF-8 \
ca_IT/ISO-8859-15 \
ce_RU/UTF-8 \
chr_US/UTF-8 \
cmn_TW/UTF-8 \
crh_UA/UTF-8 \
cs_CZ.UTF-8/UTF-8 \
cs_CZ/ISO-8859-2 \
csb_PL/UTF-8 \
cv_RU/UTF-8 \
cy_GB.UTF-8/UTF-8 \
cy_GB/ISO-8859-14 \
da_DK.UTF-8/UTF-8 \
da_DK/ISO-8859-1 \
da_DK.ISO-8859-15/ISO-8859-15 \
de_AT.UTF-8/UTF-8 \
de_AT/ISO-8859-1 \
de_AT@euro/ISO-8859-15 \
de_BE.UTF-8/UTF-8 \
de_BE/ISO-8859-1 \
de_BE@euro/ISO-8859-15 \
de_CH.UTF-8/UTF-8 \
de_CH/ISO-8859-1 \
de_DE.UTF-8/UTF-8 \
de_DE/ISO-8859-1 \
de_DE@euro/ISO-8859-15 \
de_IT.UTF-8/UTF-8 \
de_IT/ISO-8859-1 \
de_LI.UTF-8/UTF-8 \
de_LU.UTF-8/UTF-8 \
de_LU/ISO-8859-1 \
de_LU@euro/ISO-8859-15 \
doi_IN/UTF-8 \
dsb_DE/UTF-8 \
dv_MV/UTF-8 \
dz_BT/UTF-8 \
el_GR.UTF-8/UTF-8 \
el_GR/ISO-8859-7 \
el_GR@euro/ISO-8859-7 \
el_CY.UTF-8/UTF-8 \
el_CY/ISO-8859-7 \
en_AG/UTF-8 \
en_AU.UTF-8/UTF-8 \
en_AU/ISO-8859-1 \
en_BW.UTF-8/UTF-8 \
en_BW/ISO-8859-1 \
en_CA.UTF-8/UTF-8 \
en_CA/ISO-8859-1 \
en_DK.UTF-8/UTF-8 \
en_DK/ISO-8859-1 \
en_GB.UTF-8/UTF-8 \
en_GB/ISO-8859-1 \
en_GB.ISO-8859-15/ISO-8859-15 \
en_HK.UTF-8/UTF-8 \
en_HK/ISO-8859-1 \
en_IE.UTF-8/UTF-8 \
en_IE/ISO-8859-1 \
en_IE@euro/ISO-8859-15 \
en_IL/UTF-8 \
en_IN/UTF-8 \
en_NG/UTF-8 \
en_NZ.UTF-8/UTF-8 \
en_NZ/ISO-8859-1 \
en_PH.UTF-8/UTF-8 \
en_PH/ISO-8859-1 \
en_SC.UTF-8/UTF-8 \
en_SG.UTF-8/UTF-8 \
en_SG/ISO-8859-1 \
en_US.UTF-8/UTF-8 \
en_US/ISO-8859-1 \
en_US.ISO-8859-15/ISO-8859-15 \
en_ZA.UTF-8/UTF-8 \
en_ZA/ISO-8859-1 \
en_ZM/UTF-8 \
en_ZW.UTF-8/UTF-8 \
en_ZW/ISO-8859-1 \
eo/UTF-8 \
es_AR.UTF-8/UTF-8 \
es_AR/ISO-8859-1 \
es_BO.UTF-8/UTF-8 \
es_BO/ISO-8859-1 \
es_CL.UTF-8/UTF-8 \
es_CL/ISO-8859-1 \
es_CO.UTF-8/UTF-8 \
es_CO/ISO-8859-1 \
es_CR.UTF-8/UTF-8 \
es_CR/ISO-8859-1 \
es_CU/UTF-8 \
es_DO.UTF-8/UTF-8 \
es_DO/ISO-8859-1 \
es_EC.UTF-8/UTF-8 \
es_EC/ISO-8859-1 \
es_ES.UTF-8/UTF-8 \
es_ES/ISO-8859-1 \
es_ES@euro/ISO-8859-15 \
es_GT.UTF-8/UTF-8 \
es_GT/ISO-8859-1 \
es_HN.UTF-8/UTF-8 \
es_HN/ISO-8859-1 \
es_MX.UTF-8/UTF-8 \
es_MX/ISO-8859-1 \
es_NI.UTF-8/UTF-8 \
es_NI/ISO-8859-1 \
es_PA.UTF-8/UTF-8 \
es_PA/ISO-8859-1 \
es_PE.UTF-8/UTF-8 \
es_PE/ISO-8859-1 \
es_PR.UTF-8/UTF-8 \
es_PR/ISO-8859-1 \
es_PY.UTF-8/UTF-8 \
es_PY/ISO-8859-1 \
es_SV.UTF-8/UTF-8 \
es_SV/ISO-8859-1 \
es_US.UTF-8/UTF-8 \
es_US/ISO-8859-1 \
es_UY.UTF-8/UTF-8 \
es_UY/ISO-8859-1 \
es_VE.UTF-8/UTF-8 \
es_VE/ISO-8859-1 \
et_EE.UTF-8/UTF-8 \
et_EE/ISO-8859-1 \
et_EE.ISO-8859-15/ISO-8859-15 \
eu_ES.UTF-8/UTF-8 \
eu_ES/ISO-8859-1 \
eu_ES@euro/ISO-8859-15 \
fa_IR/UTF-8 \
ff_SN/UTF-8 \
fi_FI.UTF-8/UTF-8 \
fi_FI/ISO-8859-1 \
fi_FI@euro/ISO-8859-15 \
fil_PH/UTF-8 \
fo_FO.UTF-8/UTF-8 \
fo_FO/ISO-8859-1 \
fr_BE.UTF-8/UTF-8 \
fr_BE/ISO-8859-1 \
fr_BE@euro/ISO-8859-15 \
fr_CA.UTF-8/UTF-8 \
fr_CA/ISO-8859-1 \
fr_CH.UTF-8/UTF-8 \
fr_CH/ISO-8859-1 \
fr_FR.UTF-8/UTF-8 \
fr_FR/ISO-8859-1 \
fr_FR@euro/ISO-8859-15 \
fr_LU.UTF-8/UTF-8 \
fr_LU/ISO-8859-1 \
fr_LU@euro/ISO-8859-15 \
fur_IT/UTF-8 \
fy_NL/UTF-8 \
fy_DE/UTF-8 \
ga_IE.UTF-8/UTF-8 \
ga_IE/ISO-8859-1 \
ga_IE@euro/ISO-8859-15 \
gd_GB.UTF-8/UTF-8 \
gd_GB/ISO-8859-15 \
gez_ER/UTF-8 \
gez_ER@abegede/UTF-8 \
gez_ET/UTF-8 \
gez_ET@abegede/UTF-8 \
gl_ES.UTF-8/UTF-8 \
gl_ES/ISO-8859-1 \
gl_ES@euro/ISO-8859-15 \
gu_IN/UTF-8 \
gv_GB.UTF-8/UTF-8 \
gv_GB/ISO-8859-1 \
ha_NG/UTF-8 \
hak_TW/UTF-8 \
he_IL.UTF-8/UTF-8 \
he_IL/ISO-8859-8 \
hi_IN/UTF-8 \
hif_FJ/UTF-8 \
hne_IN/UTF-8 \
hr_HR.UTF-8/UTF-8 \
hr_HR/ISO-8859-2 \
hsb_DE/ISO-8859-2 \
hsb_DE.UTF-8/UTF-8 \
ht_HT/UTF-8 \
hu_HU.UTF-8/UTF-8 \
hu_HU/ISO-8859-2 \
hy_AM/UTF-8 \
hy_AM.ARMSCII-8/ARMSCII-8 \
ia_FR/UTF-8 \
id_ID.UTF-8/UTF-8 \
id_ID/ISO-8859-1 \
ig_NG/UTF-8 \
ik_CA/UTF-8 \
is_IS.UTF-8/UTF-8 \
is_IS/ISO-8859-1 \
it_CH.UTF-8/UTF-8 \
it_CH/ISO-8859-1 \
it_IT.UTF-8/UTF-8 \
it_IT/ISO-8859-1 \
it_IT@euro/ISO-8859-15 \
iu_CA/UTF-8 \
ja_JP.EUC-JP/EUC-JP \
ja_JP.UTF-8/UTF-8 \
ka_GE.UTF-8/UTF-8 \
ka_GE/GEORGIAN-PS \
kab_DZ/UTF-8 \
kk_KZ.UTF-8/UTF-8 \
kk_KZ/PT154 \
kl_GL.UTF-8/UTF-8 \
kl_GL/ISO-8859-1 \
km_KH/UTF-8 \
kn_IN/UTF-8 \
ko_KR.EUC-KR/EUC-KR \
ko_KR.UTF-8/UTF-8 \
kok_IN/UTF-8 \
ks_IN/UTF-8 \
ks_IN@devanagari/UTF-8 \
ku_TR.UTF-8/UTF-8 \
ku_TR/ISO-8859-9 \
kw_GB.UTF-8/UTF-8 \
kw_GB/ISO-8859-1 \
ky_KG/UTF-8 \
lb_LU/UTF-8 \
lg_UG.UTF-8/UTF-8 \
lg_UG/ISO-8859-10 \
li_BE/UTF-8 \
li_NL/UTF-8 \
lij_IT/UTF-8 \
ln_CD/UTF-8 \
lo_LA/UTF-8 \
lt_LT.UTF-8/UTF-8 \
lt_LT/ISO-8859-13 \
lv_LV.UTF-8/UTF-8 \
lv_LV/ISO-8859-13 \
lzh_TW/UTF-8 \
mag_IN/UTF-8 \
mai_IN/UTF-8 \
mai_NP/UTF-8 \
mfe_MU/UTF-8 \
mg_MG.UTF-8/UTF-8 \
mg_MG/ISO-8859-15 \
mhr_RU/UTF-8 \
mi_NZ.UTF-8/UTF-8 \
mi_NZ/ISO-8859-13 \
miq_NI/UTF-8 \
mjw_IN/UTF-8 \
mk_MK.UTF-8/UTF-8 \
mk_MK/ISO-8859-5 \
ml_IN/UTF-8 \
mn_MN/UTF-8 \
mni_IN/UTF-8 \
mr_IN/UTF-8 \
ms_MY.UTF-8/UTF-8 \
ms_MY/ISO-8859-1 \
mt_MT.UTF-8/UTF-8 \
mt_MT/ISO-8859-3 \
my_MM/UTF-8 \
nan_TW/UTF-8 \
nan_TW@latin/UTF-8 \
nb_NO.UTF-8/UTF-8 \
nb_NO/ISO-8859-1 \
nds_DE/UTF-8 \
nds_NL/UTF-8 \
ne_NP/UTF-8 \
nhn_MX/UTF-8 \
niu_NU/UTF-8 \
niu_NZ/UTF-8 \
nl_AW/UTF-8 \
nl_BE.UTF-8/UTF-8 \
nl_BE/ISO-8859-1 \
nl_BE@euro/ISO-8859-15 \
nl_NL.UTF-8/UTF-8 \
nl_NL/ISO-8859-1 \
nl_NL@euro/ISO-8859-15 \
nn_NO.UTF-8/UTF-8 \
nn_NO/ISO-8859-1 \
nr_ZA/UTF-8 \
nso_ZA/UTF-8 \
oc_FR.UTF-8/UTF-8 \
oc_FR/ISO-8859-1 \
om_ET/UTF-8 \
om_KE.UTF-8/UTF-8 \
om_KE/ISO-8859-1 \
or_IN/UTF-8 \
os_RU/UTF-8 \
pa_IN/UTF-8 \
pa_PK/UTF-8 \
pap_AW/UTF-8 \
pap_CW/UTF-8 \
pl_PL.UTF-8/UTF-8 \
pl_PL/ISO-8859-2 \
ps_AF/UTF-8 \
pt_BR.UTF-8/UTF-8 \
pt_BR/ISO-8859-1 \
pt_PT.UTF-8/UTF-8 \
pt_PT/ISO-8859-1 \
pt_PT@euro/ISO-8859-15 \
quz_PE/UTF-8 \
raj_IN/UTF-8 \
ro_RO.UTF-8/UTF-8 \
ro_RO/ISO-8859-2 \
ru_RU.KOI8-R/KOI8-R \
ru_RU.UTF-8/UTF-8 \
ru_RU/ISO-8859-5 \
ru_UA.UTF-8/UTF-8 \
ru_UA/KOI8-U \
rw_RW/UTF-8 \
sa_IN/UTF-8 \
sah_RU/UTF-8 \
sat_IN/UTF-8 \
sc_IT/UTF-8 \
sd_IN/UTF-8 \
sd_IN@devanagari/UTF-8 \
se_NO/UTF-8 \
sgs_LT/UTF-8 \
shn_MM/UTF-8 \
shs_CA/UTF-8 \
si_LK/UTF-8 \
sid_ET/UTF-8 \
sk_SK.UTF-8/UTF-8 \
sk_SK/ISO-8859-2 \
sl_SI.UTF-8/UTF-8 \
sl_SI/ISO-8859-2 \
sm_WS/UTF-8 \
so_DJ.UTF-8/UTF-8 \
so_DJ/ISO-8859-1 \
so_ET/UTF-8 \
so_KE.UTF-8/UTF-8 \
so_KE/ISO-8859-1 \
so_SO.UTF-8/UTF-8 \
so_SO/ISO-8859-1 \
sq_AL.UTF-8/UTF-8 \
sq_AL/ISO-8859-1 \
sq_MK/UTF-8 \
sr_ME/UTF-8 \
sr_RS/UTF-8 \
sr_RS@latin/UTF-8 \
ss_ZA/UTF-8 \
st_ZA.UTF-8/UTF-8 \
st_ZA/ISO-8859-1 \
sv_FI.UTF-8/UTF-8 \
sv_FI/ISO-8859-1 \
sv_FI@euro/ISO-8859-15 \
sv_SE.UTF-8/UTF-8 \
sv_SE/ISO-8859-1 \
sv_SE.ISO-8859-15/ISO-8859-15 \
sw_KE/UTF-8 \
sw_TZ/UTF-8 \
szl_PL/UTF-8 \
ta_IN/UTF-8 \
ta_LK/UTF-8 \
tcy_IN.UTF-8/UTF-8 \
te_IN/UTF-8 \
tg_TJ.UTF-8/UTF-8 \
tg_TJ/KOI8-T \
th_TH.UTF-8/UTF-8 \
th_TH/TIS-620 \
the_NP/UTF-8 \
ti_ER/UTF-8 \
ti_ET/UTF-8 \
tig_ER/UTF-8 \
tk_TM/UTF-8 \
tl_PH.UTF-8/UTF-8 \
tl_PH/ISO-8859-1 \
tn_ZA/UTF-8 \
to_TO/UTF-8 \
tpi_PG/UTF-8 \
tr_CY.UTF-8/UTF-8 \
tr_CY/ISO-8859-9 \
tr_TR.UTF-8/UTF-8 \
tr_TR/ISO-8859-9 \
ts_ZA/UTF-8 \
tt_RU/UTF-8 \
tt_RU@iqtelif/UTF-8 \
ug_CN/UTF-8 \
uk_UA.UTF-8/UTF-8 \
uk_UA/KOI8-U \
unm_US/UTF-8 \
ur_IN/UTF-8 \
ur_PK/UTF-8 \
uz_UZ.UTF-8/UTF-8 \
uz_UZ/ISO-8859-1 \
uz_UZ@cyrillic/UTF-8 \
ve_ZA/UTF-8 \
vi_VN/UTF-8 \
wa_BE/ISO-8859-1 \
wa_BE@euro/ISO-8859-15 \
wa_BE.UTF-8/UTF-8 \
wae_CH/UTF-8 \
wal_ET/UTF-8 \
wo_SN/UTF-8 \
xh_ZA.UTF-8/UTF-8 \
xh_ZA/ISO-8859-1 \
yi_US.UTF-8/UTF-8 \
yi_US/CP1255 \
yo_NG/UTF-8 \
yue_HK/UTF-8 \
yuw_PG/UTF-8 \
zh_CN.GB18030/GB18030 \
zh_CN.GBK/GBK \
zh_CN.UTF-8/UTF-8 \
zh_CN/GB2312 \
zh_HK.UTF-8/UTF-8 \
zh_HK/BIG5-HKSCS \
zh_SG.UTF-8/UTF-8 \
zh_SG.GBK/GBK \
zh_SG/GB2312 \
zh_TW.EUC-TW/EUC-TW \
zh_TW.UTF-8/UTF-8 \
zh_TW/BIG5 \
zu_ZA.UTF-8/UTF-8 \
zu_ZA/ISO-8859-1 \

View File

@ -1,77 +0,0 @@
objpfx = $(prefix)/$(ver)/usr/libexec/glibc-benchtests/
bench-math := acos acosh asin asinh atan atanh cos cosh exp exp2 ffs ffsll \
log log2 modf pow rint sin sincos sinh sqrt tan tanh
bench-pthread := pthread_once
bench := $(bench-math) $(bench-pthread)
run-bench := $(prefix)/$(ver)/lib64/ld-linux-x86-64.so.2 --library-path $(prefix)/$(ver)/lib64 $${run}
# String function benchmarks.
string-bench := bcopy bzero memccpy memchr memcmp memcpy memmem memmove \
mempcpy memset rawmemchr stpcpy stpncpy strcasecmp strcasestr \
strcat strchr strchrnul strcmp strcpy strcspn strlen \
strncasecmp strncat strncmp strncpy strnlen strpbrk strrchr \
strspn strstr strcpy_chk stpcpy_chk memrchr strsep strtok
string-bench-all := $(string-bench)
stdlib-bench := strtod
benchset := $(string-bench-all) $(stdlib-bench)
bench-malloc := malloc-thread
binaries-bench := $(addprefix $(objpfx)bench-,$(bench))
binaries-benchset := $(addprefix $(objpfx)bench-,$(benchset))
binaries-bench-malloc := $(addprefix $(objpfx)bench-,$(bench-malloc))
DETAILED_OPT :=
ifdef DETAILED
DETAILED_OPT := -d
endif
bench: bench-set bench-func bench-malloc
bench-set: $(binaries-benchset)
for run in $^; do \
outfile=$(prefix)/$$(basename $${run}.$(ver).out); \
echo "Running $${run}"; \
$(run-bench) > $${outfile}.tmp; \
mv $${outfile}{.tmp,}; \
done
bench-malloc: $(binaries-bench-malloc)
run=$(objpfx)bench-malloc-thread; \
outfile=$(prefix)/$$(basename $${run}.$(ver).out); \
for thr in 1 8 16 32; do \
echo "Running $${run} $${thr}"; \
$(run-bench) $${thr} > $${outfile}.tmp; \
mv $${outfile}{.tmp,}; \
done
# Build and execute the benchmark functions. This target generates JSON
# formatted bench.out. Each of the programs produce independent JSON output,
# so one could even execute them individually and process it using any JSON
# capable language or tool.
bench-func: $(binaries-bench)
{ echo "{\"timing_type\": \"hp-timing\","; \
echo " \"functions\": {"; \
for run in $^; do \
if ! [ "x$${run}" = "x$<" ]; then \
echo ","; \
fi; \
echo "Running $${run}" >&2; \
$(run-bench) $(DETAILED_OPT); \
done; \
echo; \
echo " }"; \
echo "}"; } > $(prefix)/bench.$(ver).out-tmp; \
if [ -f $(prefix)/bench.$(ver).out ]; then \
mv -f $(prefix)/bench.$(ver).out{,.old}; \
fi; \
mv -f $(prefix)/bench.$(ver).out{-tmp,}
# scripts/validate_benchout.py bench.out \
# scripts/benchout.schema.json

View File

@ -1,14 +0,0 @@
#!/bin/bash
# Autogeneries the quilt `series` from the patch order in the spec file.
# We don't use `quilt setup` because it makes a huge mess and doesn't work.
component="glibc"
rm -f series.new
extra_args="--fuzz=0"
count=0
# Transform patches into series file.
grep '^Patch.*:' glibc.spec | sed -e 's,Patch.*: ,,g' > series.new
count=`wc -l series.new | sed -e 's, .*$,,g'`
echo "Processed $count patches."
mv series.new series
echo "Generated quilt ./series file. Please do not commit."
exit 0

View File

@ -1,153 +0,0 @@
#!/usr/bin/bash
# This script can be invoked as follows:
#
# glibc-bench-compare [options] <BUILD> [BUILD]
#
# Options may be one of the following:
#
# -t The BUILD arguments are task ids and not a version-release string
# -a ARCH Do comparison for ARCH architecture
#
# If any of the above options are given, both BUILD arguments must be given.
# Otherwise, if only one BUILD is specified, then it is compared against the
# installed glibc.
# Silence the pushd/popd messages
pushd() {
command pushd "$@" > /dev/null 2>&1
}
popd() {
command popd "$@" > /dev/null 2>&1
}
# Clean up any downloaded files before we exit
trap "rm -rf /tmp/glibc-bench-compare.$BASHPID.*" EXIT
task=0
arch=$(uname -i)
options=0
path=0
installed=
# Look for any commandline options
while getopts ":tpa:" opt; do
case $opt in
p)
path=1
;;
t)
task=1
options=1
echo "Not implemented."
exit 1
;;
a)
arch=$OPTARG
options=1
;;
*)
;;
esac
done
# Done, now shift all option arguments out.
shift $((OPTIND-1))
if [ $# -gt 2 ] || [ $# -eq 0 ] || [ $# -lt 2 -a $options -eq 1 ]; then
echo "Usage: $0 [OPTIONS] <old> [new]"
echo
echo "OPTIONS:"
echo -e "\t-t\tCompare two brew tasks"
echo -e "\t-a ARCH\tGet rpms for the ARCH architecture"
echo -e "\t-p\tCompare built rpms in two paths."
echo -e "\t\tThis minimally needs glibc, glibc-common and glibc-benchtests"
exit 1
fi
if [ -z $2 ]; then
new="$1"
old=$(rpm --queryformat "%{VERSION}-%{RELEASE}\n" -q glibc | head -1)
installed=$old
else
new="$2"
old="$1"
fi
decompress_rpms() {
# We were given a path to the rpms. Figure out the version-release and
# decompress the rpms.
if [ -n $1 ]; then
vr=$(rpm --queryformat="%{VERSION}-%{RELEASE}" -qp $1/glibc-2*.rpm | head -1)
mkdir $vr && pushd $vr
fi
for r in $1*.rpm; do
( rpm2cpio $r | cpio -di ) > /dev/null
done
if [ -n $1 ]; then
popd
echo $vr
fi
}
# Get rpms for a build and decompress them
get_build() {
echo "Processing build $1"
mkdir $1 && pushd $1
brew buildinfo "glibc-$1" |
sed -n -e "s|/mnt/koji\(.\+$arch.\+\)|http://kojipkgs.fedoraproject.org\1|p" |
while read url; do
echo "Downloading $url"
wget -q $url
done
decompress_rpms
echo "Removing rpms"
rm -f $1/*.rpm
popd
}
# Run benchmarks for a build
run_bench() {
if [ -z $1 ]; then
make DETAILED=1 ver=$installed prefix= -f /usr/libexec/glibc-benchtests/bench.mk bench
else
make DETAILED=1 ver=$1 prefix=$PWD -f $1/usr/libexec/glibc-benchtests/bench.mk bench
fi
}
# Get absolute paths if needed, since we will change into the working directory
# next.
if [ $path -eq 1 ]; then
old_path=$(realpath $old)/
new_path=$(realpath $new)/
fi
tmpdir=$(mktemp -p /tmp -d glibc-bench-compare.$$.XXXX)
pushd $tmpdir
# Get both builds.
if [ $path -eq 0 ]; then
if [ -z $installed ]; then
get_build $old
fi
get_build $new
else
old=$(decompress_rpms $old_path)
new=$(decompress_rpms $new_path)
fi
# make bench for each of those.
if [ -z $installed ]; then
run_bench $old
else
run_bench
fi
run_bench $new
# Now run the comparison script.
$old/usr/libexec/glibc-benchtests/compare_bench.py $old/usr/libexec/glibc-benchtests/benchout.schema.json \
bench.$old.out bench.$new.out

27
glibc-bz3406.patch Normal file
View File

@ -0,0 +1,27 @@
2008-02-11 Joseph Myers <joseph@codesourcery.com>
[BZ #3406]
* sysdeps/ieee754/flt-32/w_expf.c (o_threshold): Correct value.
* math/libm-test.inc (exp_test): Test 88.72269439697265625.
--- libc/math/libm-test.inc 11 Apr 2008 19:32:30 -0000 1.79
+++ libc/math/libm-test.inc 22 May 2008 19:59:10 -0000 1.81
@@ -2510,6 +2510,7 @@ exp_test (void)
TEST_f_f (exp, 3, M_E3l);
TEST_f_f (exp, 0.75L, 2.11700001661267466854536981983709561L);
TEST_f_f (exp, 50.0L, 5184705528587072464087.45332293348538L);
+ TEST_f_f (exp, 88.72269439697265625L, 3.40233126623160774937554134772290447915e38L);
#ifdef TEST_LDOUBLE
/* The result can only be represented in long double. */
TEST_f_f (exp, 1000.0L, 0.197007111401704699388887935224332313e435L);
--- libc/sysdeps/ieee754/flt-32/w_expf.c 14 Jul 1999 00:03:46 -0000 1.1
+++ libc/sysdeps/ieee754/flt-32/w_expf.c 11 May 2008 17:49:19 -0000 1.2
@@ -29,7 +29,7 @@ static const float
#else
static float
#endif
-o_threshold= 8.8721679688e+01, /* 0x42b17180 */
+o_threshold= 8.8722831726e+01, /* 0x42b17217 */
u_threshold= -1.0397208405e+02; /* 0xc2cff1b5 */
#ifdef __STDC__

39
glibc-bz6461.patch Normal file
View File

@ -0,0 +1,39 @@
2008-05-14 Ulrich Drepper <drepper@redhat.com>
[BZ #6461]
* iconv/gconv_simple.c (BODY for __gconv_transform_ascii_internal):
Add missing braces.
(BODY for __gconv_transform_internal_ascii): Likewise.
--- libc/iconv/gconv_simple.c 12 Oct 2007 04:40:33 -0000 1.67
+++ libc/iconv/gconv_simple.c 14 May 2008 22:52:44 -0000 1.68
@@ -820,9 +820,11 @@ ucs4le_internal_loop_single (struct __gc
STANDARD_FROM_LOOP_ERR_HANDLER (1); \
} \
else \
- /* It's an one byte sequence. */ \
- *((uint32_t *) outptr) = *inptr++; \
- outptr += sizeof (uint32_t); \
+ { \
+ /* It's an one byte sequence. */ \
+ *((uint32_t *) outptr) = *inptr++; \
+ outptr += sizeof (uint32_t); \
+ } \
}
#define LOOP_NEED_FLAGS
#include <iconv/loop.c>
@@ -851,9 +853,11 @@ ucs4le_internal_loop_single (struct __gc
STANDARD_TO_LOOP_ERR_HANDLER (4); \
} \
else \
- /* It's an one byte sequence. */ \
- *outptr++ = *((const uint32_t *) inptr); \
- inptr += sizeof (uint32_t); \
+ { \
+ /* It's an one byte sequence. */ \
+ *outptr++ = *((const uint32_t *) inptr); \
+ inptr += sizeof (uint32_t); \
+ } \
}
#define LOOP_NEED_FLAGS
#include <iconv/loop.c>

48
glibc-bz6472.patch Normal file
View File

@ -0,0 +1,48 @@
2008-05-14 Ulrich Drepper <drepper@redhat.com>
[BZ #6472]
* sysdeps/posix/getaddrinfo.c (get_scope): Loopback addresses have
to be treated like link-local addresses.
(match_prefix): Don't treat IPv4 loopback address special when
converting to v4 mapped addressed.
--- libc/sysdeps/posix/getaddrinfo.c 14 May 2008 21:53:40 -0000 1.129
+++ libc/sysdeps/posix/getaddrinfo.c 14 May 2008 22:46:55 -0000 1.131
@@ -1112,7 +1112,10 @@ get_scope (const struct sockaddr_in6 *in
{
if (! IN6_IS_ADDR_MULTICAST (&in6->sin6_addr))
{
- if (IN6_IS_ADDR_LINKLOCAL (&in6->sin6_addr))
+ if (IN6_IS_ADDR_LINKLOCAL (&in6->sin6_addr)
+ /* RFC 4291 2.5.3 says that the loopback address is to be
+ treated like a link-local address. */
+ || IN6_IS_ADDR_LOOPBACK (&in6->sin6_addr))
scope = 2;
else if (IN6_IS_ADDR_SITELOCAL (&in6->sin6_addr))
scope = 5;
@@ -1245,20 +1248,14 @@ match_prefix (const struct sockaddr_in6
{
const struct sockaddr_in *in = (const struct sockaddr_in *) in6;
- /* Convert to IPv6 address. */
+ /* Construct a V4-to-6 mapped address. */
in6_mem.sin6_family = PF_INET6;
in6_mem.sin6_port = in->sin_port;
in6_mem.sin6_flowinfo = 0;
- if (in->sin_addr.s_addr == htonl (0x7f000001))
- in6_mem.sin6_addr = (struct in6_addr) IN6ADDR_LOOPBACK_INIT;
- else
- {
- /* Construct a V4-to-6 mapped address. */
- memset (&in6_mem.sin6_addr, '\0', sizeof (in6_mem.sin6_addr));
- in6_mem.sin6_addr.s6_addr16[5] = 0xffff;
- in6_mem.sin6_addr.s6_addr32[3] = in->sin_addr.s_addr;
- in6_mem.sin6_scope_id = 0;
- }
+ memset (&in6_mem.sin6_addr, '\0', sizeof (in6_mem.sin6_addr));
+ in6_mem.sin6_addr.s6_addr16[5] = 0xffff;
+ in6_mem.sin6_addr.s6_addr32[3] = in->sin_addr.s_addr;
+ in6_mem.sin6_scope_id = 0;
in6 = &in6_mem;
}

101
glibc-bz6612.patch Normal file
View File

@ -0,0 +1,101 @@
2008-06-12 Ulrich Drepper <drepper@redhat.com>
* time/strftime.c: Pass reference to tzset_called around to handle
recursive calls.
[BZ #6612]
* time/strftime.c (__strftime_internal): Call tzset() only
when printing timezone-dependent values.
Based on a patch by Petr Baudis <pasky@suse.cz>.
--- libc/time/strftime_l.c 16 Oct 2007 22:50:20 -0000 1.4
+++ libc/time/strftime_l.c 13 Jun 2008 06:08:31 -0000 1.5
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2004, 2007 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2004, 2007, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -455,7 +455,8 @@ static CHAR_T const month_name[][10] =
#endif
static size_t __strftime_internal (CHAR_T *, size_t, const CHAR_T *,
- const struct tm *, bool ut_argument_spec_iso
+ const struct tm *, bool *
+ ut_argument_spec_iso
LOCALE_PARAM_PROTO) __THROW;
/* Write information from TP into S according to the format
@@ -481,7 +482,8 @@ my_strftime (s, maxsize, format, tp ut_a
tmcopy = *tp;
tp = &tmcopy;
#endif
- return __strftime_internal (s, maxsize, format, tp, false
+ bool tzset_called = false;
+ return __strftime_internal (s, maxsize, format, tp, &tzset_called
ut_argument LOCALE_ARG);
}
#ifdef _LIBC
@@ -495,7 +497,7 @@ __strftime_internal (s, maxsize, format,
size_t maxsize;
const CHAR_T *format;
const struct tm *tp;
- bool tzset_called;
+ bool *tzset_called;
ut_argument_spec
LOCALE_PARAM_DECL
{
@@ -563,16 +565,6 @@ __strftime_internal (s, maxsize, format,
if (! (zone && *zone))
zone = "GMT";
}
- else
- {
- /* POSIX.1 requires that local time zone information is used as
- though strftime called tzset. */
-# if HAVE_TZSET
- if (!tzset_called)
- tzset ();
- tzset_called = true;
-# endif
- }
#endif
if (hour12 > 12)
@@ -1325,7 +1317,18 @@ __strftime_internal (s, maxsize, format,
#if HAVE_TZNAME
/* The tzset() call might have changed the value. */
if (!(zone && *zone) && tp->tm_isdst >= 0)
- zone = tzname[tp->tm_isdst];
+ {
+ /* POSIX.1 requires that local time zone information is used as
+ though strftime called tzset. */
+# if HAVE_TZSET
+ if (!*tzset_called)
+ {
+ tzset ();
+ *tzset_called = true;
+ }
+# endif
+ zone = tzname[tp->tm_isdst];
+ }
#endif
if (! zone)
zone = "";
@@ -1361,6 +1364,16 @@ __strftime_internal (s, maxsize, format,
struct tm ltm;
time_t lt;
+ /* POSIX.1 requires that local time zone information is used as
+ though strftime called tzset. */
+# if HAVE_TZSET
+ if (!*tzset_called)
+ {
+ tzset ();
+ *tzset_called = true;
+ }
+# endif
+
ltm = *tp;
lt = mktime (&ltm);

85
glibc-bz6657.patch Normal file
View File

@ -0,0 +1,85 @@
2008-06-27 Ulrich Drepper <drepper@redhat.com>
[BZ #6657]
* time/strptime_l.c: Don't clear s.era_cnt after successful match
of %EY.
Patch by Petr Baudis.
localedata/
2008-06-27 Ulrich Drepper <drepper@redhat.com>
* tst-strptime.c (do_test): Add test of %EY.
2008-06-25 Ulrich Drepper <drepper@redhat.com>
* tst-strptime.c (do_test): Add test for parsing era year
representation.
--- libc/time/strptime_l.c 28 Jul 2007 19:10:08 -0000 1.12
+++ libc/time/strptime_l.c 27 Jun 2008 21:36:13 -0000 1.13
@@ -951,7 +942,6 @@ __strptime_internal (rp, fmt, tmp, state
else
{
s.decided = loc;
- s.era_cnt = -1;
break;
}
--- libc/localedata/tst-strptime.c 1 Aug 2007 03:42:25 -0000 1.2
+++ libc/localedata/tst-strptime.c 27 Jun 2008 17:21:24 -0000 1.5
@@ -1,22 +1,53 @@
#include <locale.h>
#include <time.h>
#include <stdio.h>
+#include <string.h>
static int
do_test (void)
{
+ int result = 0;
+
if (setlocale (LC_ALL, "vi_VN.TCVN5712-1") == NULL)
{
puts ("cannot set locale");
return 1;
}
struct tm tm;
+ memset (&tm, '\0', sizeof (tm));
/* This is November in Vietnamese encoded using TCVN5712-1. */
static const char s[] = "\
-\x54\x68\xb8\x6e\x67\x20\x6d\xad\xea\x69\x20\x6d\xe9\x74";
+\x54\x68\xb8\x6e\x67\x20\x6d\xad\xea\x69\x20\x6d\xe9\x74\0";
char *r = strptime (s, "%b", &tm);
printf ("r = %p, r-s = %tu, tm.tm_mon = %d\n", r, r - s, tm.tm_mon);
- return r == NULL || r - s != 14 || tm.tm_mon != 10;
+ result = r == NULL || r - s != 14 || tm.tm_mon != 10;
+
+ if (setlocale (LC_ALL, "ja_JP.UTF-8") == NULL)
+ {
+ puts ("cannot set locale");
+ return 1;
+ }
+ static const char s2[] = "\
+\x32\x35\x20\x30\x36\x20\xe5\xb9\xb3\xe6\x88\x90\x32\x30\0";
+ memset (&tm, '\0', sizeof (tm));
+ r = strptime (s2, "%d %m %EC%Ey", &tm);
+ printf ("\
+r = %p, r-s2 = %tu, tm.tm_mday = %d, tm.tm_mon = %d, tm.tm_year = %d\n",
+ r, r - s2, tm.tm_mday, tm.tm_mon, tm.tm_year);
+ result |= (r == NULL || r - s2 != 14 || tm.tm_mday != 25 || tm.tm_mon != 5
+ || tm.tm_year != 108);
+
+ static const char s3[] = "\
+\x32\x35\x20\x30\x36\x20\xe5\xb9\xb3\xe6\x88\x90\x32\x30\xe5\xb9\xb4\0";
+ memset (&tm, '\0', sizeof (tm));
+ r = strptime (s3, "%d %m %EY", &tm);
+ printf ("\
+r = %p, r-s3 = %tu, tm.tm_mday = %d, tm.tm_mon = %d, tm.tm_year = %d\n",
+ r, r - s3, tm.tm_mday, tm.tm_mon, tm.tm_year);
+ result |= (r == NULL || r - s3 != 17 || tm.tm_mday != 25 || tm.tm_mon != 5
+ || tm.tm_year != 108);
+
+ return result;
}
#define TEST_FUNCTION do_test ()

68
glibc-bz6719.patch Normal file
View File

@ -0,0 +1,68 @@
2008-07-08 Ulrich Drepper <drepper@redhat.com>
* stdio-common/Makefile: Add rules to build and run tst-setvbuf1.
* stdio-common/tst-setvbuf1.c: New file.
* stdio-common/tst-setvbuf1.expect: New file.
[BZ #6719]
* libio/iosetvbuf.c (_IO_setvbuf): Correctly clear buffering flags
when selecting fully-buffered stream.
Patch by Wang Xin <wxinee@gmail.com>.
--- libc/libio/iosetvbuf.c 29 Aug 2003 19:58:27 -0000 1.20
+++ libc/libio/iosetvbuf.c 8 Jul 2008 16:20:32 -0000 1.21
@@ -45,7 +45,7 @@ _IO_setvbuf (fp, buf, mode, size)
switch (mode)
{
case _IOFBF:
- fp->_IO_file_flags &= ~_IO_LINE_BUF|_IO_UNBUFFERED;
+ fp->_IO_file_flags &= ~(_IO_LINE_BUF|_IO_UNBUFFERED);
if (buf == NULL)
{
if (fp->_IO_buf_base == NULL)
--- libc/stdio-common/Makefile 24 May 2008 18:14:36 -0000 1.112
+++ libc/stdio-common/Makefile 8 Jul 2008 16:32:28 -0000 1.113
@@ -58,7 +58,7 @@ tests := tstscanf test_rdwr test-popen t
tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \
tst-fwrite bug16 bug17 tst-swscanf tst-sprintf2 bug18 bug18a \
bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \
- scanf16 scanf17
+ scanf16 scanf17 tst-setvbuf1
test-srcs = tst-unbputc tst-printf
@@ -130,3 +130,7 @@ bug15-ENV = LOCPATH=$(common-objpfx)loca
ifneq (,$(filter %REENTRANT, $(defines)))
CPPFLAGS += -D_IO_MTSAFE_IO
endif
+
+$(objpfx)tst-setvbuf1.out: tst-setvbuf1.expect $(objpfx)tst-setvbuf1
+ $(built-program-cmd) > $@ 2>&1
+ cmp tst-setvbuf1.expect $@
--- libc/stdio-common/tst-setvbuf1.c 1 Jan 1970 00:00:00 -0000
+++ libc/stdio-common/tst-setvbuf1.c 8 Jul 2008 16:32:02 -0000 1.1
@@ -0,0 +1,19 @@
+#include <stdio.h>
+
+static int
+do_test (void)
+{
+ if (setvbuf (stderr, NULL, _IOFBF, BUFSIZ) != 0)
+ {
+ puts ("Set full buffer error.");
+ return 1;
+ }
+
+ fprintf (stderr, "Output #1 <stderr>.\n");
+ printf ("Output #2 <stdout>.\n");
+
+ return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
--- libc/stdio-common/tst-setvbuf1.expect 1 Jan 1970 00:00:00 -0000
+++ libc/stdio-common/tst-setvbuf1.expect 8 Jul 2008 16:32:14 -0000 1.1
@@ -0,0 +1,2 @@
+Output #2 <stdout>.
+Output #1 <stderr>.

18
glibc-bz6723.patch Normal file
View File

@ -0,0 +1,18 @@
2008-07-06 Ulrich Drepper <drepper@redhat.com>
[BZ #6723]
* time/mktime.c (__mktime_internal): Normalize tp->tm_isdst value.
--- libc/time/mktime.c 12 Dec 2007 18:21:29 -0000 1.68
+++ libc/time/mktime.c 6 Jul 2008 21:17:58 -0000 1.69
@@ -293,7 +293,9 @@ __mktime_internal (struct tm *tp,
int mday = tp->tm_mday;
int mon = tp->tm_mon;
int year_requested = tp->tm_year;
- int isdst = tp->tm_isdst;
+ /* Normalize the value. */
+ int isdst = ((tp->tm_isdst >> (8 * sizeof (tp->tm_isdst) - 1))
+ | (tp->tm_isdst != 0));
/* 1 if the previous probe was DST. */
int dst2;

View File

@ -1,286 +0,0 @@
Short description: Add C.UTF-8 support.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Upstream status: not-submitted
This patch needs to upstream as part of Carlos O'Donell
<carlos@redhat.com>'s work on enabling upstream C.UTF-8 support. This
work is currently blocked on cleaning up the test results to prove that
full code-point sorting is working as intended.
Note that this patch does not provide full code-point sorting as
expected.
This patch needs to upstream as soon as possible since it would be nice
to have this in F29 and fixed.
From 2eda7b462b415105f5a05c1323372d4e39d46439 Mon Sep 17 00:00:00 2001
From: Mike FABIAN <mfabian@redhat.com>
Date: Mon, 10 Aug 2015 15:58:12 +0200
Subject: [PATCH] Add a C.UTF-8 locale
---
localedata/SUPPORTED | 1 +
localedata/locales/C | 238 +++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 239 insertions(+)
create mode 100644 localedata/locales/C
diff --git a/localedata/SUPPORTED b/localedata/SUPPORTED
index 8ca023e..2a78391 100644
--- a/localedata/SUPPORTED
+++ b/localedata/SUPPORTED
@@ -1,6 +1,7 @@
# This file names the currently supported and somewhat tested locales.
# If you have any additions please file a glibc bug report.
SUPPORTED-LOCALES=\
+C.UTF-8/UTF-8 \
aa_DJ.UTF-8/UTF-8 \
aa_DJ/ISO-8859-1 \
aa_ER/UTF-8 \
diff --git a/localedata/locales/C b/localedata/locales/C
new file mode 100644
index 0000000..fdf460e
--- /dev/null
+++ b/localedata/locales/C
@@ -0,0 +1,238 @@
+escape_char /
+comment_char %
+% Locale for C locale in UTF-8
+
+LC_IDENTIFICATION
+title "C locale"
+source ""
+address ""
+contact ""
+email "mfabian@redhat.com"
+tel ""
+fax ""
+language "C"
+territory ""
+revision "1.0"
+date "2015-08-10"
+%
+category "i18n:2012";LC_IDENTIFICATION
+category "i18n:2012";LC_CTYPE
+category "i18n:2012";LC_COLLATE
+category "i18n:2012";LC_TIME
+category "i18n:2012";LC_NUMERIC
+category "i18n:2012";LC_MONETARY
+category "i18n:2012";LC_MESSAGES
+category "i18n:2012";LC_PAPER
+category "i18n:2012";LC_NAME
+category "i18n:2012";LC_ADDRESS
+category "i18n:2012";LC_TELEPHONE
+category "i18n:2012";LC_MEASUREMENT
+END LC_IDENTIFICATION
+
+LC_CTYPE
+copy "i18n"
+
+translit_start
+include "translit_combining";""
+translit_end
+
+END LC_CTYPE
+
+LC_COLLATE
+order_start forward
+<U0000>
+..
+<UFFFF>
+<U00010000>
+..
+<U0001FFFF>
+<U00020000>
+..
+<U0002FFFF>
+<U000E0000>
+..
+<U000EFFFF>
+<U000F0000>
+..
+<U000FFFFF>
+<U00100000>
+..
+<U0010FFFF>
+UNDEFINED
+order_end
+END LC_COLLATE
+
+LC_MONETARY
+% This is the 14652 i18n fdcc-set definition for
+% the LC_MONETARY category
+% (except for the int_curr_symbol and currency_symbol, they are empty in
+% the 14652 i18n fdcc-set definition and also empty in
+% glibc/locale/C-monetary.c. But localedef complains in that case).
+%
+% Using "USD" for int_curr_symbol. But maybe "XXX" would be better?
+% XXX is "No currency" (https://en.wikipedia.org/wiki/ISO_4217)
+int_curr_symbol "<U0055><U0053><U0044><U0020>"
+% Using "$" for currency_symbol. But maybe <U00A4> would be better?
+% U+00A4 is the "generic currency symbol"
+% (https://en.wikipedia.org/wiki/Currency_sign_%28typography%29)
+currency_symbol "<U0024>"
+mon_decimal_point "<U002E>"
+mon_thousands_sep ""
+mon_grouping -1
+positive_sign ""
+negative_sign "<U002D>"
+int_frac_digits -1
+frac_digits -1
+p_cs_precedes -1
+int_p_sep_by_space -1
+p_sep_by_space -1
+n_cs_precedes -1
+int_n_sep_by_space -1
+n_sep_by_space -1
+p_sign_posn -1
+n_sign_posn -1
+%
+END LC_MONETARY
+
+LC_NUMERIC
+% This is the POSIX Locale definition for
+% the LC_NUMERIC category.
+%
+decimal_point "<U002E>"
+thousands_sep ""
+grouping -1
+END LC_NUMERIC
+
+LC_TIME
+% This is the POSIX Locale definition for
+% the LC_TIME category.
+%
+% Abbreviated weekday names (%a)
+abday "<U0053><U0075><U006E>";"<U004D><U006F><U006E>";/
+ "<U0054><U0075><U0065>";"<U0057><U0065><U0064>";/
+ "<U0054><U0068><U0075>";"<U0046><U0072><U0069>";/
+ "<U0053><U0061><U0074>"
+
+% Full weekday names (%A)
+day "<U0053><U0075><U006E><U0064><U0061><U0079>";/
+ "<U004D><U006F><U006E><U0064><U0061><U0079>";/
+ "<U0054><U0075><U0065><U0073><U0064><U0061><U0079>";/
+ "<U0057><U0065><U0064><U006E><U0065><U0073><U0064><U0061><U0079>";/
+ "<U0054><U0068><U0075><U0072><U0073><U0064><U0061><U0079>";/
+ "<U0046><U0072><U0069><U0064><U0061><U0079>";/
+ "<U0053><U0061><U0074><U0075><U0072><U0064><U0061><U0079>"
+
+% Abbreviated month names (%b)
+abmon "<U004A><U0061><U006E>";"<U0046><U0065><U0062>";/
+ "<U004D><U0061><U0072>";"<U0041><U0070><U0072>";/
+ "<U004D><U0061><U0079>";"<U004A><U0075><U006E>";/
+ "<U004A><U0075><U006C>";"<U0041><U0075><U0067>";/
+ "<U0053><U0065><U0070>";"<U004F><U0063><U0074>";/
+ "<U004E><U006F><U0076>";"<U0044><U0065><U0063>"
+
+% Full month names (%B)
+mon "<U004A><U0061><U006E><U0075><U0061><U0072><U0079>";/
+ "<U0046><U0065><U0062><U0072><U0075><U0061><U0072><U0079>";/
+ "<U004D><U0061><U0072><U0063><U0068>";/
+ "<U0041><U0070><U0072><U0069><U006C>";/
+ "<U004D><U0061><U0079>";/
+ "<U004A><U0075><U006E><U0065>";/
+ "<U004A><U0075><U006C><U0079>";/
+ "<U0041><U0075><U0067><U0075><U0073><U0074>";/
+ "<U0053><U0065><U0070><U0074><U0065><U006D><U0062><U0065><U0072>";/
+ "<U004F><U0063><U0074><U006F><U0062><U0065><U0072>";/
+ "<U004E><U006F><U0076><U0065><U006D><U0062><U0065><U0072>";/
+ "<U0044><U0065><U0063><U0065><U006D><U0062><U0065><U0072>"
+
+% Week description, consists of three fields:
+% 1. Number of days in a week.
+% 2. Gregorian date that is a first weekday (19971130 for Sunday, 19971201 for Monday).
+% 3. The weekday number to be contained in the first week of the year.
+%
+% ISO 8601 conforming applications should use the values 7, 19971201 (a
+% Monday), and 4 (Thursday), respectively.
+week 7;19971201;4
+first_weekday 1
+first_workday 1
+
+% Appropriate date and time representation (%c)
+% "%a %b %e %H:%M:%S %Y"
+d_t_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065><U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0059>"
+
+% Appropriate date representation (%x)
+% "%m/%d/%y"
+d_fmt "<U0025><U006D><U002F><U0025><U0064><U002F><U0025><U0079>"
+
+% Appropriate time representation (%X)
+% "%H:%M:%S"
+t_fmt "<U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053>"
+
+% Appropriate AM/PM time representation (%r)
+% "%I:%M:%S %p"
+t_fmt_ampm "<U0025><U0049><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U0070>"
+
+% Equivalent of AM/PM (%p) "AM"/"PM"
+%
+am_pm "<U0041><U004D>";"<U0050><U004D>"
+
+% Appropriate date representation (date(1)) "%a %b %e %H:%M:%S %Z %Y"
+date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065><U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020><U0025><U005A><U0020><U0025><U0059>"
+END LC_TIME
+
+LC_MESSAGES
+% This is the POSIX Locale definition for
+% the LC_NUMERIC category.
+%
+yesexpr "<U005E><U005B><U0079><U0059><U005D>"
+noexpr "<U005E><U005B><U006E><U004E><U005D>"
+yesstr "<U0059><U0065><U0073>"
+nostr "<U004E><U006F>"
+END LC_MESSAGES
+
+LC_PAPER
+% This is the ISO/IEC 14652 "i18n" definition for
+% the LC_PAPER category.
+% (A4 paper, this is also used in the built in C/POSIX
+% locale in glibc/locale/C-paper.c)
+height 297
+width 210
+END LC_PAPER
+
+LC_NAME
+% This is the ISO/IEC 14652 "i18n" definition for
+% the LC_NAME category.
+% "%p%t%g%t%m%t%f"
+% (also used in the built in C/POSIX locale in glibc/locale/C-name.c)
+name_fmt "<U0025><U0070><U0025><U0074><U0025><U0067><U0025><U0074>/
+<U0025><U006D><U0025><U0074><U0025><U0066>"
+END LC_NAME
+
+LC_ADDRESS
+% This is the ISO/IEC 14652 "i18n" definition for
+% the LC_ADDRESS category.
+% "%a%N%f%N%d%N%b%N%s %h %e %r%N%C-%z %T%N%c%N"
+% (also used in the built in C/POSIX locale in glibc/locale/C-address.c)
+postal_fmt "<U0025><U0061><U0025><U004E><U0025><U0066><U0025><U004E>/
+<U0025><U0064><U0025><U004E><U0025><U0062><U0025><U004E><U0025><U0073>/
+<U0020><U0025><U0068><U0020><U0025><U0065><U0020><U0025><U0072><U0025>/
+<U004E><U0025><U0043><U002D><U0025><U007A><U0020><U0025><U0054><U0025>/
+<U004E><U0025><U0063><U0025><U004E>"
+END LC_ADDRESS
+
+LC_TELEPHONE
+% This is the ISO/IEC 14652 "i18n" definition for
+% the LC_TELEPHONE category.
+% "+%c %a %l"
+tel_int_fmt "<U002B><U0025><U0063><U0020><U0025><U0061><U0020><U0025>/
+<U006C>"
+% (also used in the built in C/POSIX locale in glibc/locale/C-telephone.c)
+END LC_TELEPHONE
+
+LC_MEASUREMENT
+% This is the ISO/IEC 14652 "i18n" definition for
+% the LC_MEASUREMENT category.
+% (same as in the built in C/POSIX locale in glibc/locale/C-measurement.c)
+%metric
+measurement 1
+END LC_MEASUREMENT
+
--
2.4.3

441
glibc-c99-scanf.patch Normal file
View File

@ -0,0 +1,441 @@
2008-05-24 Jakub Jelinek <jakub@redhat.com>
* libio/stdio.h (vscanf): Fix -std=c99 redirect.
* stdio-common/Makefile (tests): Add scanf16 and scanf17.
(CFLAGS-scanf17.c): New.
* stdio-common/scanf14.c (main): Add fscanf and scanf tests.
* stdio-common/scanf15.c (main): Likewise.
* stdio-common/scanf16.c: New file.
* stdio-common/scanf17.c: New file.
--- libc/libio/stdio.h 8 Jan 2008 01:18:40 -0000 1.92
+++ libc/libio/stdio.h 24 May 2008 18:14:36 -0000 1.93
@@ -475,7 +475,7 @@ extern int __REDIRECT (vfscanf,
__isoc99_vfscanf)
__attribute__ ((__format__ (__scanf__, 2, 0))) __wur;
extern int __REDIRECT (vscanf, (__const char *__restrict __format,
- _G_va_list __arg), __isoc99_vfscanf)
+ _G_va_list __arg), __isoc99_vscanf)
__attribute__ ((__format__ (__scanf__, 1, 0))) __wur;
extern int __REDIRECT (vsscanf,
(__const char *__restrict __s,
--- libc/stdio-common/Makefile 10 Dec 2007 01:43:13 -0000 1.111
+++ libc/stdio-common/Makefile 24 May 2008 18:14:36 -0000 1.112
@@ -57,7 +57,8 @@ tests := tstscanf test_rdwr test-popen t
tst-perror tst-sprintf tst-rndseek tst-fdopen tst-fphex bug14 bug15 \
tst-popen tst-unlockedio tst-fmemopen2 tst-put-error tst-fgets \
tst-fwrite bug16 bug17 tst-swscanf tst-sprintf2 bug18 bug18a \
- bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22
+ bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \
+ scanf16 scanf17
test-srcs = tst-unbputc tst-printf
@@ -109,11 +110,13 @@ CFLAGS-isoc99_scanf.c += $(exceptions)
CFLAGS-errlist.c = $(fno-unit-at-a-time)
CFLAGS-siglist.c = $(fno-unit-at-a-time)
-# The following is a hack since we must compile scanf15.c without any
+# The following is a hack since we must compile scanf1{5,7}.c without any
# GNU extension. The latter are needed, though, when internal headers
# are used. So made sure we see the installed headers first.
CFLAGS-scanf15.c = -I../libio -I../stdlib -I../wcsmbs -I../time -I../string \
-I../wctype
+CFLAGS-scanf17.c = -I../libio -I../stdlib -I../wcsmbs -I../time -I../string \
+ -I../wctype
# We know the test has a format string problem.
CFLAGS-tst-sprintf.c = -Wno-format
--- libc/stdio-common/scanf14.c 18 Sep 2007 17:59:38 -0000 1.1
+++ libc/stdio-common/scanf14.c 24 May 2008 18:14:36 -0000 1.2
@@ -59,5 +59,58 @@ main (void)
else if (d != 5.25 || memcmp (c, " x", 2) != 0)
FAIL ();
+ const char *tmpdir = getenv ("TMPDIR");
+ if (tmpdir == NULL || tmpdir[0] == '\0')
+ tmpdir = "/tmp";
+
+ char fname[strlen (tmpdir) + sizeof "/tst-scanf14.XXXXXX"];
+ sprintf (fname, "%s/tst-scanf14.XXXXXX", tmpdir);
+ if (fname == NULL)
+ FAIL ();
+
+ /* Create a temporary file. */
+ int fd = mkstemp (fname);
+ if (fd == -1)
+ FAIL ();
+
+ FILE *fp = fdopen (fd, "w+");
+ if (fp == NULL)
+ FAIL ();
+ else
+ {
+ if (fputs (" 1.25s x", fp) == EOF)
+ FAIL ();
+ if (fseek (fp, 0, SEEK_SET) != 0)
+ FAIL ();
+ if (fscanf (fp, "%as%2c", &sp, c) != 2)
+ FAIL ();
+ else
+ {
+ if (strcmp (sp, "1.25s") != 0 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ memset (sp, 'x', sizeof "1.25s");
+ free (sp);
+ }
+
+ if (freopen (fname, "r", stdin) == NULL)
+ FAIL ();
+ else
+ {
+ if (scanf ("%as%2c", &sp, c) != 2)
+ FAIL ();
+ else
+ {
+ if (strcmp (sp, "1.25s") != 0 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ memset (sp, 'x', sizeof "1.25s");
+ free (sp);
+ }
+ }
+
+ fclose (fp);
+ }
+
+ remove (fname);
+
return result;
}
--- libc/stdio-common/scanf15.c 18 Sep 2007 17:59:38 -0000 1.1
+++ libc/stdio-common/scanf15.c 24 May 2008 18:14:36 -0000 1.2
@@ -50,5 +50,48 @@ main (void)
else if (d != 5.25 || memcmp (c, " x", 2) != 0)
FAIL ();
+ const char *tmpdir = getenv ("TMPDIR");
+ if (tmpdir == NULL || tmpdir[0] == '\0')
+ tmpdir = "/tmp";
+
+ char fname[strlen (tmpdir) + sizeof "/tst-scanf15.XXXXXX"];
+ sprintf (fname, "%s/tst-scanf15.XXXXXX", tmpdir);
+ if (fname == NULL)
+ FAIL ();
+
+ /* Create a temporary file. */
+ int fd = mkstemp (fname);
+ if (fd == -1)
+ FAIL ();
+
+ FILE *fp = fdopen (fd, "w+");
+ if (fp == NULL)
+ FAIL ();
+ else
+ {
+ if (fputs (" 1.25s x", fp) == EOF)
+ FAIL ();
+ if (fseek (fp, 0, SEEK_SET) != 0)
+ FAIL ();
+ if (fscanf (fp, "%as%2c", &f, c) != 2)
+ FAIL ();
+ else if (f != 1.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+
+ if (freopen (fname, "r", stdin) == NULL)
+ FAIL ();
+ else
+ {
+ if (scanf ("%as%2c", &f, c) != 2)
+ FAIL ();
+ else if (f != 1.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ }
+
+ fclose (fp);
+ }
+
+ remove (fname);
+
return result;
}
--- libc/stdio-common/scanf16.c 1 Jan 1970 00:00:00 -0000
+++ libc/stdio-common/scanf16.c 24 May 2008 18:14:36 -0000 1.1
@@ -0,0 +1,147 @@
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+
+#define FAIL() \
+ do { \
+ result = 1; \
+ printf ("test at line %d failed\n", __LINE__); \
+ } while (0)
+
+static int
+xsscanf (const char *str, const char *fmt, ...)
+{
+ va_list ap;
+ va_start (ap, fmt);
+ int ret = vsscanf (str, fmt, ap);
+ va_end (ap);
+ return ret;
+}
+
+static int
+xscanf (const char *fmt, ...)
+{
+ va_list ap;
+ va_start (ap, fmt);
+ int ret = vscanf (fmt, ap);
+ va_end (ap);
+ return ret;
+}
+
+static int
+xfscanf (FILE *f, const char *fmt, ...)
+{
+ va_list ap;
+ va_start (ap, fmt);
+ int ret = vfscanf (f, fmt, ap);
+ va_end (ap);
+ return ret;
+}
+
+int
+main (void)
+{
+ wchar_t *lsp;
+ char *sp;
+ float f;
+ double d;
+ char c[8];
+ int result = 0;
+
+ if (xsscanf (" 0.25s x", "%e%3c", &f, c) != 2)
+ FAIL ();
+ else if (f != 0.25 || memcmp (c, "s x", 3) != 0)
+ FAIL ();
+ if (xsscanf (" 1.25s x", "%as%2c", &sp, c) != 2)
+ FAIL ();
+ else
+ {
+ if (strcmp (sp, "1.25s") != 0 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ memset (sp, 'x', sizeof "1.25s");
+ free (sp);
+ }
+ if (xsscanf (" 2.25s x", "%las%2c", &d, c) != 2)
+ FAIL ();
+ else if (d != 2.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ if (xsscanf (" 3.25S x", "%4aS%3c", &lsp, c) != 2)
+ FAIL ();
+ else
+ {
+ if (wcscmp (lsp, L"3.25") != 0 || memcmp (c, "S x", 3) != 0)
+ FAIL ();
+ memset (lsp, 'x', sizeof L"3.25");
+ free (lsp);
+ }
+ if (xsscanf ("4.25[0-9.] x", "%a[0-9.]%8c", &sp, c) != 2)
+ FAIL ();
+ else
+ {
+ if (strcmp (sp, "4.25") != 0 || memcmp (c, "[0-9.] x", 8) != 0)
+ FAIL ();
+ memset (sp, 'x', sizeof "4.25");
+ free (sp);
+ }
+ if (xsscanf ("5.25[0-9.] x", "%la[0-9.]%2c", &d, c) != 2)
+ FAIL ();
+ else if (d != 5.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+
+ const char *tmpdir = getenv ("TMPDIR");
+ if (tmpdir == NULL || tmpdir[0] == '\0')
+ tmpdir = "/tmp";
+
+ char fname[strlen (tmpdir) + sizeof "/tst-scanf16.XXXXXX"];
+ sprintf (fname, "%s/tst-scanf16.XXXXXX", tmpdir);
+ if (fname == NULL)
+ FAIL ();
+
+ /* Create a temporary file. */
+ int fd = mkstemp (fname);
+ if (fd == -1)
+ FAIL ();
+
+ FILE *fp = fdopen (fd, "w+");
+ if (fp == NULL)
+ FAIL ();
+ else
+ {
+ if (fputs (" 1.25s x", fp) == EOF)
+ FAIL ();
+ if (fseek (fp, 0, SEEK_SET) != 0)
+ FAIL ();
+ if (xfscanf (fp, "%as%2c", &sp, c) != 2)
+ FAIL ();
+ else
+ {
+ if (strcmp (sp, "1.25s") != 0 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ memset (sp, 'x', sizeof "1.25s");
+ free (sp);
+ }
+
+ if (freopen (fname, "r", stdin) == NULL)
+ FAIL ();
+ else
+ {
+ if (xscanf ("%as%2c", &sp, c) != 2)
+ FAIL ();
+ else
+ {
+ if (strcmp (sp, "1.25s") != 0 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ memset (sp, 'x', sizeof "1.25s");
+ free (sp);
+ }
+ }
+
+ fclose (fp);
+ }
+
+ remove (fname);
+
+ return result;
+}
--- libc/stdio-common/scanf17.c 1 Jan 1970 00:00:00 -0000
+++ libc/stdio-common/scanf17.c 24 May 2008 18:14:36 -0000 1.1
@@ -0,0 +1,128 @@
+#undef _GNU_SOURCE
+#define _XOPEN_SOURCE 600
+/* The following macro definitions are a hack. They word around disabling
+ the GNU extension while still using a few internal headers. */
+#define u_char unsigned char
+#define u_short unsigned short
+#define u_int unsigned int
+#define u_long unsigned long
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+
+#define FAIL() \
+ do { \
+ result = 1; \
+ printf ("test at line %d failed\n", __LINE__); \
+ } while (0)
+
+static int
+xsscanf (const char *str, const char *fmt, ...)
+{
+ va_list ap;
+ va_start (ap, fmt);
+ int ret = vsscanf (str, fmt, ap);
+ va_end (ap);
+ return ret;
+}
+
+static int
+xscanf (const char *fmt, ...)
+{
+ va_list ap;
+ va_start (ap, fmt);
+ int ret = vscanf (fmt, ap);
+ va_end (ap);
+ return ret;
+}
+
+static int
+xfscanf (FILE *f, const char *fmt, ...)
+{
+ va_list ap;
+ va_start (ap, fmt);
+ int ret = vfscanf (f, fmt, ap);
+ va_end (ap);
+ return ret;
+}
+
+int
+main (void)
+{
+ float f;
+ double d;
+ char c[8];
+ int result = 0;
+
+ if (xsscanf (" 0.25s x", "%e%3c", &f, c) != 2)
+ FAIL ();
+ else if (f != 0.25 || memcmp (c, "s x", 3) != 0)
+ FAIL ();
+ if (xsscanf (" 1.25s x", "%as%2c", &f, c) != 2)
+ FAIL ();
+ else if (f != 1.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ if (xsscanf (" 2.25s x", "%las%2c", &d, c) != 2)
+ FAIL ();
+ else if (d != 2.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ if (xsscanf (" 3.25S x", "%4aS%2c", &f, c) != 2)
+ FAIL ();
+ else if (f != 3.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ if (xsscanf (" 4.25[0-9.] x", "%a[0-9.]%2c", &f, c) != 2)
+ FAIL ();
+ else if (f != 4.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ if (xsscanf (" 5.25[0-9.] x", "%la[0-9.]%2c", &d, c) != 2)
+ FAIL ();
+ else if (d != 5.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+
+ const char *tmpdir = getenv ("TMPDIR");
+ if (tmpdir == NULL || tmpdir[0] == '\0')
+ tmpdir = "/tmp";
+
+ char fname[strlen (tmpdir) + sizeof "/tst-scanf17.XXXXXX"];
+ sprintf (fname, "%s/tst-scanf17.XXXXXX", tmpdir);
+ if (fname == NULL)
+ FAIL ();
+
+ /* Create a temporary file. */
+ int fd = mkstemp (fname);
+ if (fd == -1)
+ FAIL ();
+
+ FILE *fp = fdopen (fd, "w+");
+ if (fp == NULL)
+ FAIL ();
+ else
+ {
+ if (fputs (" 1.25s x", fp) == EOF)
+ FAIL ();
+ if (fseek (fp, 0, SEEK_SET) != 0)
+ FAIL ();
+ if (xfscanf (fp, "%as%2c", &f, c) != 2)
+ FAIL ();
+ else if (f != 1.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+
+ if (freopen (fname, "r", stdin) == NULL)
+ FAIL ();
+ else
+ {
+ if (xscanf ("%as%2c", &f, c) != 2)
+ FAIL ();
+ else if (f != 1.25 || memcmp (c, " x", 2) != 0)
+ FAIL ();
+ }
+
+ fclose (fp);
+ }
+
+ remove (fname);
+
+ return result;
+}

View File

@ -1,15 +0,0 @@
Short description: Adjust CS_PATH return value.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Upstream status: not-needed
In Fedora we should return only /usr/bin because /bin is just a symlink
to /usr/bin after MoveToUsr transition (which glibc has not really
completed).
diff -pruN a/sysdeps/unix/confstr.h b/sysdeps/unix/confstr.h
--- a/sysdeps/unix/confstr.h 2012-12-25 08:32:13.000000000 +0530
+++ b/sysdeps/unix/confstr.h 2014-09-05 20:02:55.698275219 +0530
@@ -1 +1 @@
-#define CS_PATH "/bin:/usr/bin"
+#define CS_PATH "/usr/bin"

View File

@ -1,91 +0,0 @@
Short description: Cleanup use of _dl_starting_up.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Upstream status: https://sourceware.org/ml/libc-alpha/2014-02/msg00589.html
Upstream discussions:
https://sourceware.org/ml/libc-alpha/2014-02/msg00580.html
Based on the following commit:
~~~
From 16552c01a66633c9e412984d9d92616bd4e5303c Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@redhat.com>
Date: Fri, 11 Jun 2010 11:04:11 +0200
Subject: [PATCH] Properly set __libc_multiple_libcs
* elf/rtld.c (_dl_starting_up): Always define.
(dl_main): Always set _dl_starting_up.
* elf/dl-support.c (_dl_starting_up): Always define.
* elf/dl-init.c (_dl_init): Always clear _dl_starting_up.
---
ChangeLog | 7 +++++++
elf/dl-init.c | 4 ----
elf/dl-support.c | 2 --
elf/rtld.c | 4 ----
4 files changed, 7 insertions(+), 10 deletions(-)
~~~
This patch needs to go upstream to get cleaned up, but has always involed
analysis of the GNU/Hurd parts of the change and that stalled out, but
perhaps with build-many-glibcs we can now test these changes more easily.
Index: b/elf/dl-init.c
===================================================================
--- a/elf/dl-init.c
+++ b/elf/dl-init.c
@@ -119,8 +119,6 @@ _dl_init (struct link_map *main_map, int
while (i-- > 0)
call_init (main_map->l_initfini[i], argc, argv, env);
-#ifndef HAVE_INLINED_SYSCALLS
/* Finished starting up. */
_dl_starting_up = 0;
-#endif
}
Index: b/elf/dl-support.c
===================================================================
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -117,10 +117,8 @@ struct r_scope_elem _dl_initial_searchli
.r_nlist = 1,
};
-#ifndef HAVE_INLINED_SYSCALLS
/* Nonzero during startup. */
int _dl_starting_up = 1;
-#endif
/* Random data provided by the kernel. */
void *_dl_random;
Index: b/elf/rtld.c
===================================================================
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -214,7 +214,6 @@ audit_list_iter_next (struct audit_list_
return iter->previous->name;
}
-#ifndef HAVE_INLINED_SYSCALLS
/* Set nonzero during loading and initialization of executable and
libraries, cleared before the executable's entry point runs. This
must not be initialized to nonzero, because the unused dynamic
@@ -224,7 +223,6 @@ audit_list_iter_next (struct audit_list_
never be called. */
int _dl_starting_up = 0;
rtld_hidden_def (_dl_starting_up)
-#endif
/* This is the structure which defines all variables global to ld.so
(except those which cannot be added for some reason). */
@@ -898,10 +896,8 @@ dl_main (const ElfW(Phdr) *phdr,
/* Process the environment variable which control the behaviour. */
process_envvars (&mode);
-#ifndef HAVE_INLINED_SYSCALLS
/* Set up a flag which tells we are just starting. */
_dl_starting_up = 1;
-#endif
if (*user_entry == (ElfW(Addr)) ENTRY_POINT)
{

View File

@ -1,61 +0,0 @@
Short description: Fedora-specific workaround for kernel pty bug.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Upstream status: not-submitted
This is a Fedora-specific workaround for a kernel bug where calling
ioctl on a pty will silently ignore the invalid c_cflag. The
workaround is to use TCGETS to verify the setting matches. This is
not upstream and needs to either be removed or submitted upstream
after analysis.
Index: b/sysdeps/unix/sysv/linux/tcsetattr.c
===================================================================
--- a/sysdeps/unix/sysv/linux/tcsetattr.c
+++ b/sysdeps/unix/sysv/linux/tcsetattr.c
@@ -45,6 +45,7 @@ __tcsetattr (int fd, int optional_action
{
struct __kernel_termios k_termios;
unsigned long int cmd;
+ int retval;
switch (optional_actions)
{
@@ -75,7 +76,36 @@ __tcsetattr (int fd, int optional_action
memcpy (&k_termios.c_cc[0], &termios_p->c_cc[0],
__KERNEL_NCCS * sizeof (cc_t));
- return INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
+ retval = INLINE_SYSCALL (ioctl, 3, fd, cmd, &k_termios);
+
+ if (retval == 0 && cmd == TCSETS)
+ {
+ /* The Linux kernel has a bug which silently ignore the invalid
+ c_cflag on pty. We have to check it here. */
+ int save = errno;
+ retval = INLINE_SYSCALL (ioctl, 3, fd, TCGETS, &k_termios);
+ if (retval)
+ {
+ /* We cannot verify if the setting is ok. We don't return
+ an error (?). */
+ __set_errno (save);
+ retval = 0;
+ }
+ else if ((termios_p->c_cflag & (PARENB | CREAD))
+ != (k_termios.c_cflag & (PARENB | CREAD))
+ || ((termios_p->c_cflag & CSIZE)
+ && ((termios_p->c_cflag & CSIZE)
+ != (k_termios.c_cflag & CSIZE))))
+ {
+ /* It looks like the Linux kernel silently changed the
+ PARENB/CREAD/CSIZE bits in c_cflag. Report it as an
+ error. */
+ __set_errno (EINVAL);
+ retval = -1;
+ }
+ }
+
+ return retval;
}
weak_alias (__tcsetattr, tcsetattr)
libc_hidden_def (tcsetattr)

View File

@ -1,49 +0,0 @@
Short description: Add 4 ISO-8859-15 locales to SUPPORTED for Euro symbol.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Bug-RHEL: #61908
Upstream status: not-needed
Very early RHL 7.3 requirement to add these locales so users can
get access to Euro symbol. We should review this bug and decide if
the UTF-8 locales are now serving the same purpose and drop the
additional locales.
* Tue Mar 26 2002 Jakub Jelinek <jakub@redhat.com> 2.2.5-28
- add a couple of .ISO-8859-15 locales (#61908)
diff -Nrup a/localedata/SUPPORTED b/localedata/SUPPORTED
--- a/localedata/SUPPORTED 2012-11-25 12:59:31.000000000 -0700
+++ b/localedata/SUPPORTED 2012-11-26 12:58:43.298223018 -0700
@@ -89,6 +89,7 @@ cy_GB.UTF-8/UTF-8 \
cy_GB/ISO-8859-14 \
da_DK.UTF-8/UTF-8 \
da_DK/ISO-8859-1 \
+da_DK.ISO-8859-15/ISO-8859-15 \
de_AT.UTF-8/UTF-8 \
de_AT/ISO-8859-1 \
de_AT@euro/ISO-8859-15 \
@@ -121,6 +122,7 @@ en_DK.UTF-8/UTF-8 \
en_DK/ISO-8859-1 \
en_GB.UTF-8/UTF-8 \
en_GB/ISO-8859-1 \
+en_GB.ISO-8859-15/ISO-8859-15 \
en_HK.UTF-8/UTF-8 \
en_HK/ISO-8859-1 \
en_IE.UTF-8/UTF-8 \
@@ -136,6 +138,7 @@ en_SG.UTF-8/UTF-8 \
en_SG/ISO-8859-1 \
en_US.UTF-8/UTF-8 \
en_US/ISO-8859-1 \
+en_US.ISO-8859-15/ISO-8859-15 \
en_ZA.UTF-8/UTF-8 \
en_ZA/ISO-8859-1 \
en_ZM/UTF-8 \
@@ -385,6 +388,7 @@ sv_FI/ISO-8859-1 \
sv_FI@euro/ISO-8859-15 \
sv_SE.UTF-8/UTF-8 \
sv_SE/ISO-8859-1 \
+sv_SE.ISO-8859-15/ISO-8859-15 \
sw_KE/UTF-8 \
sw_TZ/UTF-8 \
szl_PL/UTF-8 \

View File

@ -1,21 +0,0 @@
Short description: Fedora-specific glibc install locale changes.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Upstream status: not-needed
The Fedora glibc build and install does not need the normal install
behaviour which updates the locale archive. The Fedora install phase
in the spec file of the rpm will handle this manually.
diff --git a/localedata/Makefile b/localedata/Makefile
index 0eea396ad86da956..54caabda33728207 100644
--- a/localedata/Makefile
+++ b/localedata/Makefile
@@ -413,6 +413,7 @@ define build-one-locale
echo -n '...'; \
input=`echo $$locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; \
$(LOCALEDEF) $$flags --alias-file=../intl/locale.alias \
+ --no-archive \
-i locales/$$input -f charmaps/$$charset \
$(addprefix --prefix=,$(install_root)) $$locale \
&& echo ' done';

View File

@ -1,31 +0,0 @@
Short description: Place glibc info into "Libraries" category.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Upstream status: not-needed
The category names for libraries is completely random including
"Libraries", "GNU Libraries", "GNU libraries", and "Software libraries."
In the GNU info manual the "Software libraries" category is given as an
example, but really we need to standardize on a category for upstream.
I suggest we drop this change after some upstream discussion.
From 4820b9175535e13df79ce816106016040014916e Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Fri, 3 Nov 2006 16:31:21 +0000
Subject: [PATCH] Change @dircategory.
---
manual/libc.texinfo | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
--- a/manual/libc.texinfo
+++ b/manual/libc.texinfo
@@ -7,7 +7,7 @@
@include macros.texi
@comment Tell install-info what to do.
-@dircategory Software libraries
+@dircategory Libraries
@direntry
* Libc: (libc). C library.
@end direntry

View File

@ -1,31 +0,0 @@
Short description: Fedora-specific enabling batch read in NSS.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Bug-RHEL: #188246
Upstream status: not-submitted
Enable batch read in NSS. It's not clear if this is always a win or
just a win for NIS+, this needs to be analyzed and sent upstream or
removed.
From baba5d9461d4e8a581ac26fe4412ad783ffc73e7 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Mon, 1 May 2006 08:02:53 +0000
Subject: [PATCH] Enable SETENT_BATCH_READ nis/nss option by default
* Mon May 1 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-4
- SETENT_BATCH_READ /etc/default/nss option for speeding up
some usages of NIS+ (#188246)
diff --git a/nis/nss b/nis/nss
--- a/nis/nss
+++ b/nis/nss
@@ -25,7 +25,7 @@
# memory with every getXXent() call. Otherwise each getXXent() call
# might result into a network communication with the server to get
# the next entry.
-#SETENT_BATCH_READ=TRUE
+SETENT_BATCH_READ=TRUE
#
# ADJUNCT_AS_SHADOW
# If set to TRUE, the passwd routines in the NIS NSS module will not

View File

@ -1,20 +0,0 @@
Short description: NSCD must use nscd user.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Upstream status: not-needed
Fedora-specific configuration adjustment to introduce the nscd user.
(Upstream does not assume this user exists.)
diff -Nrup a/nscd/nscd.conf b/nscd/nscd.conf
--- a/nscd/nscd.conf 2012-06-05 07:42:49.000000000 -0600
+++ b/nscd/nscd.conf 2012-06-07 12:15:21.818318670 -0600
@@ -33,7 +33,7 @@
# logfile /var/log/nscd.log
# threads 4
# max-threads 32
-# server-user nobody
+ server-user nscd
# stat-user somebody
debug-level 0
# reload-count 5

View File

@ -1,45 +0,0 @@
The Fedora /etc/nsswitch.conf is based largely on the upstream
version with minor downstream distribution modifications for
use with SSSD and systemd.
diff --git a/nss/nsswitch.conf b/nss/nsswitch.conf
index f55358811495c9f1..14c3cde8080a848c 100644
--- a/nss/nsswitch.conf
+++ b/nss/nsswitch.conf
@@ -1,7 +1,7 @@
#
# /etc/nsswitch.conf
#
-# An example Name Service Switch config file. This file should be
+# Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# Valid databases are: aliases, ethers, group, gshadow, hosts,
@@ -52,18 +52,20 @@
# shadow: db files
# group: db files
-# In alphabetical order. Re-order as required to optimize peformance.
+# In order of likelihood of use to accelerate lookup.
+passwd: sss files
+shadow: files sss
+group: sss files
+hosts: files dns myhostname
+services: files sss
+netgroup: sss
+automount: files sss
+
aliases: files
ethers: files
-group: files
gshadow: files
-hosts: files dns
initgroups: files
-netgroup: files
networks: files dns
-passwd: files
protocols: files
publickey: files
rpc: files
-shadow: files
-services: files

2919
glibc-fedora.patch Normal file

File diff suppressed because it is too large Load Diff

92
glibc-ia64-lib64.patch Normal file
View File

@ -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

7089
glibc-lt-l10n.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,171 @@
2008-07-12 Ulrich Drepper <drepper@redhat.com>
* nscd/connections.c (main_loop_poll): Fix handling of read errors
from inotify.
(main_loop_epoll): Likewise.
--- libc/nscd/connections.c 3 Jul 2008 12:21:15 -0000 1.55.2.42
+++ libc/nscd/connections.c 16 Jul 2008 09:47:15 -0000
@@ -1806,42 +1806,64 @@ main_loop_poll (void)
size_t first = 1;
#ifdef HAVE_INOTIFY
- if (conns[1].fd == inotify_fd)
+ if (inotify_fd != -1 && conns[1].fd == inotify_fd)
{
if (conns[1].revents != 0)
{
- bool done[lastdb] = { false, };
+ bool to_clear[lastdb] = { false, };
union
{
struct inotify_event i;
char buf[100];
} inev;
- while (TEMP_FAILURE_RETRY (read (inotify_fd, &inev,
- sizeof (inev)))
- >= (ssize_t) sizeof (struct inotify_event))
+ while (1)
{
+ ssize_t nb = TEMP_FAILURE_RETRY (read (inotify_fd, &inev,
+ sizeof (inev)));
+ if (nb < (ssize_t) sizeof (struct inotify_event))
+ {
+ if (nb == -1)
+ {
+ /* Something went wrong when reading the inotify
+ data. Better disable inotify. */
+ conns[1].fd = -1;
+ firstfree = 1;
+ if (nused == 2)
+ nused = 1;
+ close (inotify_fd);
+ inotify_fd = -1;
+ dbg_log (_("disabled inotify after read error"));
+ }
+ break;
+ }
+
/* Check which of the files changed. */
for (size_t dbcnt = 0; dbcnt < lastdb; ++dbcnt)
- if (!done[dbcnt]
- && (inev.i.wd == dbs[dbcnt].inotify_descr
- || (dbcnt == hstdb
- && inev.i.wd == resolv_conf_descr)))
+ if (inev.i.wd == dbs[dbcnt].inotify_descr)
{
- if (dbcnt == hstdb
- && inev.i.wd == resolv_conf_descr)
- res_init ();
-
- pthread_mutex_lock (&dbs[dbcnt].prune_lock);
- dbs[dbcnt].clear_cache = 1;
- pthread_mutex_unlock (&dbs[dbcnt].prune_lock);
- pthread_cond_signal (&dbs[dbcnt].prune_cond);
-
- done[dbcnt] = true;
- break;
+ to_clear[dbcnt] = true;
+ goto next;
}
+
+ if (inev.i.wd == resolv_conf_descr)
+ {
+ res_init ();
+ to_clear[hstdb] = true;
+ }
+ next:;
}
+ /* Actually perform the cache clearing. */
+ for (size_t dbcnt = 0; dbcnt < lastdb; ++dbcnt)
+ if (to_clear[dbcnt])
+ {
+ pthread_mutex_lock (&dbs[dbcnt].prune_lock);
+ dbs[dbcnt].clear_cache = 1;
+ pthread_mutex_unlock (&dbs[dbcnt].prune_lock);
+ pthread_cond_signal (&dbs[dbcnt].prune_cond);
+ }
+
--n;
}
@@ -1966,27 +1988,57 @@ main_loop_epoll (int efd)
#ifdef HAVE_INOTIFY
else if (revs[cnt].data.fd == inotify_fd)
{
+ bool to_clear[lastdb] = { false, };
union
{
struct inotify_event i;
char buf[100];
} inev;
- while (TEMP_FAILURE_RETRY (read (inotify_fd, &inev,
- sizeof (inev)))
- >= (ssize_t) sizeof (struct inotify_event))
+ while (1)
{
+ ssize_t nb = TEMP_FAILURE_RETRY (read (inotify_fd, &inev,
+ sizeof (inev)));
+ if (nb < (ssize_t) sizeof (struct inotify_event))
+ {
+ if (nb == -1)
+ {
+ /* Something went wrong when reading the inotify
+ data. Better disable inotify. */
+ (void) epoll_ctl (efd, EPOLL_CTL_DEL, inotify_fd,
+ NULL);
+ close (inotify_fd);
+ inotify_fd = -1;
+ dbg_log (_("disabled inotify after read error"));
+ }
+ break;
+ }
+
/* Check which of the files changed. */
for (size_t dbcnt = 0; dbcnt < lastdb; ++dbcnt)
if (inev.i.wd == dbs[dbcnt].inotify_descr)
{
- pthread_mutex_trylock (&dbs[dbcnt].prune_lock);
- dbs[dbcnt].clear_cache = 1;
- pthread_mutex_unlock (&dbs[dbcnt].prune_lock);
- pthread_cond_signal (&dbs[dbcnt].prune_cond);
- break;
+ to_clear[dbcnt] = true;
+ goto next;
}
+
+ if (inev.i.wd == resolv_conf_descr)
+ {
+ res_init ();
+ to_clear[hstdb] = true;
+ }
+ next:;
}
+
+ /* Actually perform the cache clearing. */
+ for (size_t dbcnt = 0; dbcnt < lastdb; ++dbcnt)
+ if (to_clear[dbcnt])
+ {
+ pthread_mutex_lock (&dbs[dbcnt].prune_lock);
+ dbs[dbcnt].clear_cache = 1;
+ pthread_mutex_unlock (&dbs[dbcnt].prune_lock);
+ pthread_cond_signal (&dbs[dbcnt].prune_cond);
+ }
}
#endif
else
@@ -2010,8 +2062,10 @@ main_loop_epoll (int efd)
/* Now look for descriptors for accepted connections which have
no reply in too long of a time. */
time_t laststart = now - ACCEPT_TIMEOUT;
+ assert (starttime[sock] == 0);
+ assert (inotify_fd == -1 || starttime[inotify_fd] == 0);
for (int cnt = highest; cnt > STDERR_FILENO; --cnt)
- if (cnt != sock && starttime[cnt] != 0 && starttime[cnt] < laststart)
+ if (starttime[cnt] != 0 && starttime[cnt] < laststart)
{
/* We are waiting for this one for too long. Close it. */
(void) epoll_ctl (efd, EPOLL_CTL_DEL, cnt, NULL);

View File

@ -1,21 +0,0 @@
Short description: Provide options to nscd startup.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Upstream status: not-needed
Fedora-specific nscd startup configuration file.
diff --git a/nscd/nscd.service b/nscd/nscd.service
index b7428a3..19ba185 100644
--- a/nscd/nscd.service
+++ b/nscd/nscd.service
@@ -5,7 +5,8 @@ Description=Name Service Cache Daemon
[Service]
Type=forking
-ExecStart=/usr/sbin/nscd
+EnvironmentFile=-/etc/sysconfig/nscd
+ExecStart=/usr/sbin/nscd $NSCD_OPTIONS
ExecStop=/usr/sbin/nscd --shutdown
ExecReload=/usr/sbin/nscd -i passwd
ExecReload=/usr/sbin/nscd -i group

1152
glibc-nscd.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,40 +0,0 @@
Use python3 for installed executable python scripts.
Fedora is a Python3-only distribution:
https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
This fixes build failures where builders may strictly enforce only
python3 during a transitional phase.
Author: Carlos O'Donell <carlos@redhat.com>
diff --git a/benchtests/scripts/compare_bench.py b/benchtests/scripts/compare_bench.py
index c1c438a1c9f0eae6..b7d3d7bcee87969d 100755
--- a/benchtests/scripts/compare_bench.py
+++ b/benchtests/scripts/compare_bench.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# Copyright (C) 2015-2019 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
#
diff --git a/benchtests/scripts/import_bench.py b/benchtests/scripts/import_bench.py
index 7a55d19f038e64d4..72e6034243a8c9b6 100644
--- a/benchtests/scripts/import_bench.py
+++ b/benchtests/scripts/import_bench.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# Copyright (C) 2015-2019 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
#
diff --git a/benchtests/scripts/validate_benchout.py b/benchtests/scripts/validate_benchout.py
index 55d07c6bce5b5184..04129f9c26c2874c 100755
--- a/benchtests/scripts/validate_benchout.py
+++ b/benchtests/scripts/validate_benchout.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# Copyright (C) 2014-2019 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
#

147
glibc-res-hconf-init.patch Normal file
View File

@ -0,0 +1,147 @@
2008-06-13 Ulrich Drepper <drepper@redhat.com>
* sysdeps/posix/getaddrinfo.c: Move _res_hconf_init call to a
better place so it is not called when nscd is used.
2008-05-14 Ulrich Drepper <drepper@redhat.com>
* sysdeps/posix/getaddrinfo.c (getaddrinfo): Call _res_hconf_init
if necessary.
* posix/tst-rfc3484.c: Add dummy definition of _res_hconf_init.
* posix/tst-rfc3484-2.c: Likewise.
* posix/tst-rfc3484-3.c: Likewise.
--- libc/sysdeps/posix/getaddrinfo.c 10 May 2008 23:27:32 -0000 1.126
+++ libc/sysdeps/posix/getaddrinfo.c 14 May 2008 22:46:55 -0000 1.131
@@ -61,6 +61,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI
#include <not-cancel.h>
#include <nscd/nscd-client.h>
#include <nscd/nscd_proto.h>
+#include <resolv/res_hconf.h>
#ifdef HAVE_LIBIDN
extern int __idna_to_ascii_lz (const char *input, char **output, int flags);
@@ -684,6 +684,9 @@ gaih_inet (const char *name, const struc
"dns [!UNAVAIL=return] files",
&nip);
+ /* Initialize configurations. */
+ if (__builtin_expect (!_res_hconf.initialized, 0))
+ _res_hconf_init ();
if (__res_maybe_init (&_res, 0) == -1)
no_more = 1;
--- libc/posix/tst-rfc3484-2.c 10 Jan 2008 20:00:37 -0000 1.11
+++ libc/posix/tst-rfc3484-2.c 15 May 2008 03:06:05 -0000 1.12
@@ -18,24 +18,35 @@ __check_pf (bool *p1, bool *p2, struct i
*in6ai = NULL;
*in6ailen = 0;
}
+
void
attribute_hidden
__check_native (uint32_t a1_index, int *a1_native,
uint32_t a2_index, int *a2_native)
{
}
+
int
+attribute_hidden
__idna_to_ascii_lz (const char *input, char **output, int flags)
{
return 0;
}
+
int
+attribute_hidden
__idna_to_unicode_lzlz (const char *input, char **output, int flags)
{
*output = NULL;
return 0;
}
+void
+attribute_hidden
+_res_hconf_init (void)
+{
+}
+
#include "../sysdeps/posix/getaddrinfo.c"
service_user *__nss_hosts_database attribute_hidden;
--- libc/posix/tst-rfc3484-3.c 10 Jan 2008 20:00:37 -0000 1.2
+++ libc/posix/tst-rfc3484-3.c 15 May 2008 03:06:05 -0000 1.3
@@ -18,24 +18,35 @@ __check_pf (bool *p1, bool *p2, struct i
*in6ai = NULL;
*in6ailen = 0;
}
+
void
attribute_hidden
__check_native (uint32_t a1_index, int *a1_native,
uint32_t a2_index, int *a2_native)
{
}
+
int
+attribute_hidden
__idna_to_ascii_lz (const char *input, char **output, int flags)
{
return 0;
}
+
int
+attribute_hidden
__idna_to_unicode_lzlz (const char *input, char **output, int flags)
{
*output = NULL;
return 0;
}
+void
+attribute_hidden
+_res_hconf_init (void)
+{
+}
+
#include "../sysdeps/posix/getaddrinfo.c"
service_user *__nss_hosts_database attribute_hidden;
--- libc/posix/tst-rfc3484.c 10 Jan 2008 20:00:37 -0000 1.11
+++ libc/posix/tst-rfc3484.c 15 May 2008 03:06:05 -0000 1.12
@@ -18,24 +18,35 @@ __check_pf (bool *p1, bool *p2, struct i
*in6ai = NULL;
*in6ailen = 0;
}
+
void
attribute_hidden
__check_native (uint32_t a1_index, int *a1_native,
uint32_t a2_index, int *a2_native)
{
}
+
int
+attribute_hidden
__idna_to_ascii_lz (const char *input, char **output, int flags)
{
return 0;
}
+
int
+attribute_hidden
__idna_to_unicode_lzlz (const char *input, char **output, int flags)
{
*output = NULL;
return 0;
}
+void
+attribute_hidden
+_res_hconf_init (void)
+{
+}
+
#include "../sysdeps/posix/getaddrinfo.c"
service_user *__nss_hosts_database attribute_hidden;

View File

@ -1,38 +0,0 @@
Short description: Add syslog.target dependency.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Bug-Fedora: #1070416
Upstream status: not-needed
Fedora-specific changes to the nscd.service file.
See also: glibc-nscd-sysconfig.patch.
--- a/nscd/nscd.service
+++ b/nscd/nscd.service
@@ -2,6 +2,7 @@
[Unit]
Description=Name Service Cache Daemon
+After=syslog.target
[Service]
Type=forking
@@ -17,3 +18,4 @@
[Install]
WantedBy=multi-user.target
+Also=nscd.socket
diff --git a/nscd/nscd.socket b/nscd/nscd.socket
new file mode 100644
index 0000000..7e512d5
--- /dev/null
+++ b/nscd/nscd.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=Name Service Cache Daemon Socket
+
+[Socket]
+ListenDatagram=/var/run/nscd/socket
+
+[Install]
+WantedBy=sockets.target

View File

@ -1,22 +0,0 @@
Please see the following bug for a complete summary:
https://bugzilla.redhat.com/show_bug.cgi?id=1615608
Index: glibc-2.28/manual/startup.texi
===================================================================
--- glibc-2.28.orig/manual/startup.texi
+++ glibc-2.28/manual/startup.texi
@@ -1005,14 +1005,6 @@ This function actually terminates the pr
intercept this signal; see @ref{Signal Handling}.
@end deftypefun
-@c Put in by rms. Don't remove.
-@cartouche
-@strong{Future Change Warning:} Proposed Federal censorship regulations
-may prohibit us from giving you information about the possibility of
-calling this function. We would be required to say that this is not an
-acceptable way of terminating a program.
-@end cartouche
-
@node Termination Internals
@subsection Termination Internals

41
glibc-rh446406.patch Normal file
View File

@ -0,0 +1,41 @@
2008-06-05 Jakub Jelinek <jakub@redhat.com>
* misc/regexp.h (compile): Use __REPB_PREFIX macro.
Avoid segfault if first GETC returns eof/'\0'/'\n'.
--- libc/misc/regexp.h 19 May 2004 16:52:44 -0000 1.12
+++ libc/misc/regexp.h 6 Jun 2008 19:23:39 -0000 1.13
@@ -129,8 +130,9 @@ compile (char *__restrict instring, char
__expr_ptr = (regex_t *) expbuf;
/* The remaining space in the buffer can be used for the compiled
pattern. */
- __expr_ptr->buffer = expbuf + sizeof (regex_t);
- __expr_ptr->allocated = endbuf - (char *) __expr_ptr->buffer;
+ __expr_ptr->__REPB_PREFIX (buffer) = expbuf + sizeof (regex_t);
+ __expr_ptr->__REPB_PREFIX (allocated)
+ = endbuf - (char *) __expr_ptr->__REPB_PREFIX (buffer);
while ((__ch = (GETC ())) != eof)
{
@@ -162,7 +164,10 @@ compile (char *__restrict instring, char
}
__input_buffer[__current_size++] = __ch;
}
- __input_buffer[__current_size++] = '\0';
+ if (__current_size)
+ __input_buffer[__current_size++] = '\0';
+ else
+ __input_buffer = "";
/* Now compile the pattern. */
__error = regcomp (__expr_ptr, __input_buffer, REG_NEWLINE);
@@ -198,7 +203,8 @@ compile (char *__restrict instring, char
}
/* Everything is ok. */
- RETURN ((char *) (__expr_ptr->buffer + __expr_ptr->used));
+ RETURN ((char *) (__expr_ptr->__REPB_PREFIX (buffer)
+ + __expr_ptr->__REPB_PREFIX (used)));
}
#endif

17
glibc-rh449358.patch Normal file
View File

@ -0,0 +1,17 @@
2008-06-03 Jakub Jelinek <jakub@redhat.com>
* nscd/nscd_getserv_r.c (__nscd_getservbyport_r): Pass cp
instead of portstr to nscd_getserv_r. Patch by
Roman Kagan <rkagan@mail.ru>.
--- libc/nscd/nscd_getserv_r.c 13 Oct 2007 23:04:28 -0000 1.5
+++ libc/nscd/nscd_getserv_r.c 3 Jun 2008 10:22:52 -0000 1.6
@@ -53,7 +53,7 @@ __nscd_getservbyport_r (int port, const
portstr[sizeof (portstr) - 1] = '\0';
char *cp = _itoa_word (port, portstr + sizeof (portstr) - 1, 10, 0);
- return nscd_getserv_r (portstr, portstr + sizeof (portstr) - cp, proto,
+ return nscd_getserv_r (cp, portstr + sizeof (portstr) - cp, proto,
GETSERVBYPORT, result_buf, buf, buflen, result);
}

82
glibc-rh450790.patch Normal file
View File

@ -0,0 +1,82 @@
2008-06-12 Jakub Jelinek <jakub@redhat.com>
* sysdeps/powerpc/powerpc64/fpu/s_llround.S (__llround): Avoid using
cr[34] registers.
* sysdeps/powerpc/powerpc64/fpu/s_llroundf.S (__llroundf): Likewise.
* sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S (__llround):
Likewise.
* sysdeps/powerpc/powerpc32/fpu/s_lround.S (__lround): Avoid using cr3
register.
--- libc/sysdeps/powerpc/powerpc32/fpu/s_lround.S 11 Apr 2008 19:30:46 -0000 1.8
+++ libc/sysdeps/powerpc/powerpc32/fpu/s_lround.S 13 Jun 2008 01:18:11 -0000 1.9
@@ -65,10 +65,10 @@ ENTRY (__lround)
fabs fp2, fp1 /* Get the absolute value of x. */
fsub fp12,fp10,fp10 /* Compute 0.0. */
fcmpu cr6, fp2, fp10 /* if |x| < 0.5 */
- fcmpu cr3, fp1, fp12 /* x is negative? x < 0.0 */
+ fcmpu cr7, fp1, fp12 /* x is negative? x < 0.0 */
blt- cr6,.Lretzero
fadd fp3,fp2,fp10 /* |x|+=0.5 bias to prepare to round. */
- bge cr3,.Lconvert /* x is positive so don't negate x. */
+ bge cr7,.Lconvert /* x is positive so don't negate x. */
fnabs fp3,fp3 /* -(|x|+=0.5) */
.Lconvert:
fctiwz fp4,fp3 /* Convert to Integer word lround toward 0. */
--- libc/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S 11 Apr 2008 19:31:08 -0000 1.2
+++ libc/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S 13 Jun 2008 01:18:11 -0000 1.3
@@ -75,12 +75,12 @@ ENTRY (__llround)
fabs fp2,fp1 /* Get the absolute value of x. */
fsub fp12,fp10,fp10 /* Compute 0.0 into fpr12. */
fcmpu cr6,fp2,fp10 /* if |x| < 0.5 */
- fcmpu cr4,fp2,fp9 /* if |x| >= 2^52 */
- fcmpu cr3,fp1,fp12 /* x is negative? x < 0.0 */
+ fcmpu cr7,fp2,fp9 /* if |x| >= 2^52 */
+ fcmpu cr1,fp1,fp12 /* x is negative? x < 0.0 */
blt- cr6,.Lretzero /* 0.5 > x < -0.5 so just return 0. */
- bge- cr4,.Lnobias /* 2^52 > x < -2^52 just convert with no bias. */
+ bge- cr7,.Lnobias /* 2^52 > x < -2^52 just convert with no bias. */
fadd fp3,fp2,fp10 /* |x|+=0.5 bias to prepare to round. */
- bge cr3,.Lconvert /* x is positive so don't negate x. */
+ bge cr1,.Lconvert /* x is positive so don't negate x. */
fnabs fp3,fp3 /* -(|x|+=0.5) */
.Lconvert:
fctidz fp4,fp3 /* Convert to Integer double word round toward 0. */
--- libc/sysdeps/powerpc/powerpc64/fpu/s_llround.S 11 Apr 2008 19:31:51 -0000 1.4
+++ libc/sysdeps/powerpc/powerpc64/fpu/s_llround.S 13 Jun 2008 01:18:11 -0000 1.5
@@ -52,12 +52,12 @@ ENTRY (__llround)
fabs fp2,fp1 /* Get the absolute value of x. */
fsub fp12,fp10,fp10 /* Compute 0.0 into fp12. */
fcmpu cr6,fp2,fp10 /* if |x| < 0.5 */
- fcmpu cr4,fp2,fp9 /* if |x| >= 2^52 */
- fcmpu cr3,fp1,fp12 /* x is negative? x < 0.0 */
+ fcmpu cr7,fp2,fp9 /* if |x| >= 2^52 */
+ fcmpu cr1,fp1,fp12 /* x is negative? x < 0.0 */
blt- cr6,.Lretzero /* 0.5 > x < -0.5 so just return 0. */
- bge- cr4,.Lnobias /* 2^52 > x < -2^52 just convert with no bias. */
+ bge- cr7,.Lnobias /* 2^52 > x < -2^52 just convert with no bias. */
fadd fp3,fp2,fp10 /* |x|+=0.5 bias to prepare to round. */
- bge cr3,.Lconvert /* x is positive so don't negate x. */
+ bge cr1,.Lconvert /* x is positive so don't negate x. */
fnabs fp3,fp3 /* -(|x|+=0.5) */
.Lconvert:
fctidz fp4,fp3 /* Convert to Integer double word round toward 0. */
--- libc/sysdeps/powerpc/powerpc64/fpu/s_llroundf.S 11 Apr 2008 19:31:51 -0000 1.4
+++ libc/sysdeps/powerpc/powerpc64/fpu/s_llroundf.S 13 Jun 2008 01:18:11 -0000 1.5
@@ -51,12 +51,12 @@ ENTRY (__llroundf)
fabs fp2,fp1 /* Get the absolute value of x. */
fsub fp12,fp10,fp10 /* Compute 0.0 into fp12. */
fcmpu cr6,fp2,fp10 /* if |x| < 0.5 */
- fcmpu cr4,fp2,fp9 /* if |x| >= 2^23 */
- fcmpu cr3,fp1,fp12 /* x is negative? x < 0.0 */
+ fcmpu cr7,fp2,fp9 /* if |x| >= 2^23 */
+ fcmpu cr1,fp1,fp12 /* x is negative? x < 0.0 */
blt- cr6,.Lretzero /* 0.5 > x < -0.5 so just return 0. */
- bge- cr4,.Lnobias /* 2^23 > x < -2^23 just convert with no bias. */
+ bge- cr7,.Lnobias /* 2^23 > x < -2^23 just convert with no bias. */
fadd fp3,fp2,fp10 /* |x|+=0.5 bias to prepare to round. */
- bge cr3,.Lconvert /* x is positive so don't negate x. */
+ bge cr1,.Lconvert /* x is positive so don't negate x. */
fnabs fp3,fp3 /* -(|x|+=0.5) */
.Lconvert:
fctidz fp4,fp3 /* Convert to Integer double word round toward 0. */

30
glibc-rh455360.patch Normal file
View File

@ -0,0 +1,30 @@
2008-07-15 Ulrich Drepper <drepper@redhat.com>
* stdio-common/vfprintf.c (_IO_helper_overflow): In case _IO_sputn
doesn't manage to write anything, fail.
--- libc/stdio-common/vfprintf.c 8 Apr 2008 07:59:50 -0000 1.128.2.13
+++ libc/stdio-common/vfprintf.c 16 Jul 2008 09:47:15 -0000
@@ -2080,6 +2080,11 @@ _IO_helper_overflow (_IO_FILE *s, int c)
{
_IO_size_t written = _IO_sputn (target, s->_wide_data->_IO_write_base,
used);
+ if (written == 0 || written == WEOF)
+ return WEOF;
+ __wmemmove (s->_wide_data->_IO_write_base,
+ s->_wide_data->_IO_write_base + written,
+ used - written);
s->_wide_data->_IO_write_ptr -= written;
}
#else
@@ -2087,6 +2092,10 @@ _IO_helper_overflow (_IO_FILE *s, int c)
if (used)
{
_IO_size_t written = _IO_sputn (target, s->_IO_write_base, used);
+ if (written == 0 || written == EOF)
+ return EOF;
+ memmove (s->_IO_write_base, s->_IO_write_base + written,
+ used - written);
s->_IO_write_ptr -= written;
}
#endif

View File

@ -1,21 +0,0 @@
Short description: Add UCS-2 aliases.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Bug-RHEL: #697421
Upstream status: https://sourceware.org/ml/libc-alpha/2012-12/msg00103.html
This is a Fedora-specific change to include new aliases for UCS-2
data for gconv used by a certain class of users. This should be
revisited at some point to determine if those users are just using
UTF-8 at this point.
diff -rup a/iconvdata/gconv-modules b/iconvdata/gconv-modules
--- a/iconvdata/gconv-modules 2010-05-04 05:27:23.000000000 -0600
+++ b/iconvdata/gconv-modules 2012-01-26 10:58:24.181895489 -0700
@@ -1954,3 +1954,6 @@ alias HPGREEK8// HP-GREEK8//
alias OSF10010004// HP-GREEK8//
module HP-GREEK8// INTERNAL HP-GREEK8 1
module INTERNAL HP-GREEK8// HP-GREEK8 1
+
+alias ISO-10646-UCS-2// UNICODE//
+alias ISO-10646-UCS-2// ISO-10646/UTF8/

View File

@ -1,84 +0,0 @@
Short description: Work ld.so --verify crash on debuginfo files.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Bug-RHEL: #741105, #767146
Upstream status: not-needed
This change is designed to work around running ld.so on a debuginfo
file. This is the wrong fix for this problem and should be dropped.
The correct solution is to mark debuginfo files as new types of
ELF files.
Index: glibc-2.22-386-g95e8397/elf/dl-load.c
===================================================================
--- glibc-2.22-386-g95e8397.orig/elf/dl-load.c
+++ glibc-2.22-386-g95e8397/elf/dl-load.c
@@ -881,7 +881,8 @@ _dl_map_object_from_fd (const char *name
/* Get file information. */
struct r_file_id id;
- if (__glibc_unlikely (!_dl_get_file_id (fd, &id)))
+ struct stat64 st;
+ if (__glibc_unlikely (!_dl_get_file_id (fd, &id, &st)))
{
errstring = N_("cannot stat shared object");
call_lose_errno:
@@ -1076,6 +1077,16 @@ _dl_map_object_from_fd (const char *name
= N_("ELF load command address/offset not properly aligned");
goto call_lose;
}
+ if (__glibc_unlikely (ph->p_offset + ph->p_filesz > st.st_size))
+ {
+ /* If the segment requires zeroing of part of its last
+ page, we'll crash when accessing the unmapped page.
+ There's still a possibility of a race, if the shared
+ object is truncated between the fxstat above and the
+ memset below. */
+ errstring = N_("ELF load command past end of file");
+ goto call_lose;
+ }
struct loadcmd *c = &loadcmds[nloadcmds++];
c->mapstart = ALIGN_DOWN (ph->p_vaddr, GLRO(dl_pagesize));
Index: glibc-2.22-386-g95e8397/sysdeps/generic/dl-fileid.h
===================================================================
--- glibc-2.22-386-g95e8397.orig/sysdeps/generic/dl-fileid.h
+++ glibc-2.22-386-g95e8397/sysdeps/generic/dl-fileid.h
@@ -29,7 +29,8 @@ struct r_file_id
On error, returns false, with errno set. */
static inline bool
_dl_get_file_id (int fd __attribute__ ((unused)),
- struct r_file_id *id __attribute__ ((unused)))
+ struct r_file_id *id __attribute__ ((unused)),
+ struct stat64_t *st __attribute__((unused)))
{
return true;
}
Index: glibc-2.22-386-g95e8397/sysdeps/posix/dl-fileid.h
===================================================================
--- glibc-2.22-386-g95e8397.orig/sysdeps/posix/dl-fileid.h
+++ glibc-2.22-386-g95e8397/sysdeps/posix/dl-fileid.h
@@ -27,18 +27,16 @@ struct r_file_id
ino64_t ino;
};
-/* Sample FD to fill in *ID. Returns true on success.
+/* Sample FD to fill in *ID and *ST. Returns true on success.
On error, returns false, with errno set. */
static inline bool
-_dl_get_file_id (int fd, struct r_file_id *id)
+_dl_get_file_id (int fd, struct r_file_id *id, struct stat64 *st)
{
- struct stat64 st;
-
- if (__glibc_unlikely (__fxstat64 (_STAT_VER, fd, &st) < 0))
+ if (__glibc_unlikely (__fxstat64 (_STAT_VER, fd, st) < 0))
return false;
- id->dev = st.st_dev;
- id->ino = st.st_ino;
+ id->dev = st->st_dev;
+ id->ino = st->st_ino;
return true;
}

View File

@ -1,91 +0,0 @@
Short description: fnmatch() fails with MBCS.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Bug-RHEL: #819430, #826149, #826151
Bug-Upstream: #14185
Upstream status: not-submitted
fnmatch() fails when '*' wildcard is applied on the file name
containing multi-byte character(s)
This needs to be reviewed thoroughly and go upstream with a
new test case.
diff -Nrup a/posix/fnmatch.c b/posix/fnmatch.c
--- a/posix/fnmatch.c 2012-01-01 07:16:32.000000000 -0500
+++ b/posix/fnmatch.c 2012-05-23 14:14:29.099461189 -0400
@@ -333,6 +333,7 @@ fnmatch (pattern, string, flags)
# if HANDLE_MULTIBYTE
if (__builtin_expect (MB_CUR_MAX, 1) != 1)
{
+ const char *orig_pattern = pattern;
mbstate_t ps;
size_t n;
const char *p;
@@ -356,10 +357,8 @@ fnmatch (pattern, string, flags)
alloca_used);
n = mbsrtowcs (wpattern, &p, n + 1, &ps);
if (__glibc_unlikely (n == (size_t) -1))
- /* Something wrong.
- XXX Do we have to set `errno' to something which mbsrtows hasn't
- already done? */
- return -1;
+ /* Something wrong: Fall back to single byte matching. */
+ goto try_singlebyte;
if (p)
{
memset (&ps, '\0', sizeof (ps));
@@ -371,10 +370,8 @@ fnmatch (pattern, string, flags)
prepare_wpattern:
n = mbsrtowcs (NULL, &pattern, 0, &ps);
if (__glibc_unlikely (n == (size_t) -1))
- /* Something wrong.
- XXX Do we have to set `errno' to something which mbsrtows hasn't
- already done? */
- return -1;
+ /*Something wrong: Fall back to single byte matching. */
+ goto try_singlebyte;
if (__glibc_unlikely (n >= (size_t) -1 / sizeof (wchar_t)))
{
__set_errno (ENOMEM);
@@ -401,14 +398,8 @@ fnmatch (pattern, string, flags)
alloca_used);
n = mbsrtowcs (wstring, &p, n + 1, &ps);
if (__glibc_unlikely (n == (size_t) -1))
- {
- /* Something wrong.
- XXX Do we have to set `errno' to something which
- mbsrtows hasn't already done? */
- free_return:
- free (wpattern_malloc);
- return -1;
- }
+ /* Something wrong: Fall back to single byte matching. */
+ goto free_and_try_singlebyte;
if (p)
{
memset (&ps, '\0', sizeof (ps));
@@ -420,10 +411,8 @@ fnmatch (pattern, string, flags)
prepare_wstring:
n = mbsrtowcs (NULL, &string, 0, &ps);
if (__glibc_unlikely (n == (size_t) -1))
- /* Something wrong.
- XXX Do we have to set `errno' to something which mbsrtows hasn't
- already done? */
- goto free_return;
+ /* Something wrong: Fall back to singlebyte matching. */
+ goto free_and_try_singlebyte;
if (__glibc_unlikely (n >= (size_t) -1 / sizeof (wchar_t)))
{
free (wpattern_malloc);
@@ -450,6 +439,10 @@ fnmatch (pattern, string, flags)
free (wpattern_malloc);
return res;
+ free_and_try_singlebyte:
+ free(wpattern_malloc);
+ try_singlebyte:
+ pattern = orig_pattern;
}
# endif /* mbstate_t and mbsrtowcs or _LIBC. */

View File

@ -1,37 +0,0 @@
Short description: Fix newlocale error return.
Author(s): Fedora glibc team <glibc@lists.fedoraproject.org>
Origin: PATCH
Bug-RHEL: #832516
Bug-Fedora: #827510
Bug-Upstream: #14247
Upstream status: not-submitted
This needs to go upstream right away to fix the error case for
newlocale not correctly returning an error.
2012-06-14 Jeff Law <law@redhat.com>
* locale/loadlocale.c (_nl_load_locale): Delay setting
file->decided until we have successfully loaded the file's
data.
diff --git a/locale/loadlocale.c b/locale/loadlocale.c
index e3fa187..9fd9216 100644
--- a/locale/loadlocale.c
+++ b/locale/loadlocale.c
@@ -169,7 +169,6 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
int save_err;
int alloc = ld_mapped;
- file->decided = 1;
file->data = NULL;
fd = __open_nocancel (file->filename, O_RDONLY | O_CLOEXEC);
@@ -278,6 +277,7 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
newdata->alloc = alloc;
file->data = newdata;
+ file->decided = 1;
}
void

195
glibc-rwlock-pshared.patch Normal file
View File

@ -0,0 +1,195 @@
2008-05-10 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S: Access
__pshared correctly.
* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S:
Likewise.
* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S:
Likewise.
* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S:
Likewise.
* sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S:
Likewise.
Reported by Clemens Kolbitsch <clemens.kol@gmx.at>.
--- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S 14 Aug 2007 02:24:49 -0000 1.15
+++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_rdlock.S 11 May 2008 05:40:33 -0000 1.16
@@ -122,7 +122,7 @@ __pthread_rwlock_rdlock:
#else
leal MUTEX(%ebx), %edx
#endif
- movl PSHARED(%ebx), %ecx
+ movzbl PSHARED(%ebx), %ecx
call __lll_lock_wait
jmp 2b
@@ -138,7 +138,7 @@ __pthread_rwlock_rdlock:
#else
leal MUTEX(%ebx), %eax
#endif
- movl PSHARED(%ebx), %ecx
+ movzbl PSHARED(%ebx), %ecx
call __lll_unlock_wake
jmp 7b
@@ -158,7 +158,7 @@ __pthread_rwlock_rdlock:
#else
leal MUTEX(%ebx), %eax
#endif
- movl PSHARED(%ebx), %ecx
+ movzbl PSHARED(%ebx), %ecx
call __lll_unlock_wake
jmp 11b
@@ -168,7 +168,7 @@ __pthread_rwlock_rdlock:
#else
leal MUTEX(%ebx), %edx
#endif
- movl PSHARED(%ebx), %ecx
+ movzbl PSHARED(%ebx), %ecx
call __lll_lock_wait
jmp 13b
.size __pthread_rwlock_rdlock,.-__pthread_rwlock_rdlock
--- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S 14 Aug 2007 02:25:44 -0000 1.16
+++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedrdlock.S 11 May 2008 05:40:33 -0000 1.17
@@ -162,7 +162,7 @@ pthread_rwlock_timedrdlock:
#else
leal MUTEX(%ebp), %edx
#endif
- movl PSHARED(%ebp), %ecx
+ movzbl PSHARED(%ebp), %ecx
call __lll_lock_wait
jmp 2b
@@ -177,7 +177,7 @@ pthread_rwlock_timedrdlock:
#else
leal MUTEX(%ebp), %eax
#endif
- movl PSHARED(%ebp), %ecx
+ movzbl PSHARED(%ebp), %ecx
call __lll_unlock_wake
jmp 7b
@@ -197,7 +197,7 @@ pthread_rwlock_timedrdlock:
#else
leal MUTEX(%ebp), %eax
#endif
- movl PSHARED(%ebp), %ecx
+ movzbl PSHARED(%ebp), %ecx
call __lll_unlock_wake
jmp 11b
@@ -207,7 +207,7 @@ pthread_rwlock_timedrdlock:
#else
leal MUTEX(%ebp), %edx
#endif
- movl PSHARED(%ebp), %ecx
+ movzbl PSHARED(%ebp), %ecx
call __lll_lock_wait
jmp 13b
--- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S 14 Aug 2007 02:24:58 -0000 1.17
+++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_timedwrlock.S 11 May 2008 05:40:33 -0000 1.18
@@ -160,7 +160,7 @@ pthread_rwlock_timedwrlock:
#else
leal MUTEX(%ebp), %edx
#endif
- movl PSHARED(%ebp), %ecx
+ movzbl PSHARED(%ebp), %ecx
call __lll_lock_wait
jmp 2b
@@ -175,7 +175,7 @@ pthread_rwlock_timedwrlock:
#else
leal MUTEX(%ebp), %eax
#endif
- movl PSHARED(%ebp), %ecx
+ movzbl PSHARED(%ebp), %ecx
call __lll_unlock_wake
jmp 7b
@@ -190,7 +190,7 @@ pthread_rwlock_timedwrlock:
#else
leal MUTEX(%ebp), %eax
#endif
- movl PSHARED(%ebp), %ecx
+ movzbl PSHARED(%ebp), %ecx
call __lll_unlock_wake
jmp 11b
@@ -200,7 +200,7 @@ pthread_rwlock_timedwrlock:
#else
leal MUTEX(%ebp), %edx
#endif
- movl PSHARED(%ebp), %ecx
+ movzbl PSHARED(%ebp), %ecx
call __lll_lock_wait
jmp 13b
--- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S 14 Aug 2007 02:25:06 -0000 1.13
+++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_unlock.S 11 May 2008 05:40:33 -0000 1.14
@@ -110,7 +110,7 @@ __pthread_rwlock_unlock:
#else
leal MUTEX(%edi), %edx
#endif
- movl PSHARED(%edi), %ecx
+ movzbl PSHARED(%edi), %ecx
call __lll_lock_wait
jmp 2b
@@ -120,7 +120,7 @@ __pthread_rwlock_unlock:
#else
leal MUTEX(%edi), %eax
#endif
- movl PSHARED(%edi), %ecx
+ movzbl PSHARED(%edi), %ecx
call __lll_unlock_wake
jmp 4b
@@ -130,7 +130,7 @@ __pthread_rwlock_unlock:
#else
leal MUTEX(%edi), %eax
#endif
- movl PSHARED(%edi), %ecx
+ movzbl PSHARED(%edi), %ecx
call __lll_unlock_wake
jmp 8b
--- libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S 14 Aug 2007 02:25:27 -0000 1.15
+++ libc/nptl/sysdeps/unix/sysv/linux/i386/i486/pthread_rwlock_wrlock.S 11 May 2008 05:40:33 -0000 1.16
@@ -120,7 +120,7 @@ __pthread_rwlock_wrlock:
#else
leal MUTEX(%ebx), %edx
#endif
- movl PSHARED(%ebx), %ecx
+ movzbl PSHARED(%ebx), %ecx
call __lll_lock_wait
jmp 2b
@@ -135,7 +135,7 @@ __pthread_rwlock_wrlock:
#else
leal MUTEX(%ebx), %eax
#endif
- movl PSHARED(%ebx), %ecx
+ movzbl PSHARED(%ebx), %ecx
call __lll_unlock_wake
jmp 7b
@@ -149,7 +149,7 @@ __pthread_rwlock_wrlock:
#else
leal MUTEX(%ebx), %eax
#endif
- movl PSHARED(%ebx), %ecx
+ movzbl PSHARED(%ebx), %ecx
call __lll_unlock_wake
jmp 11b
@@ -159,7 +159,7 @@ __pthread_rwlock_wrlock:
#else
leal MUTEX(%ebx), %edx
#endif
- movl PSHARED(%ebx), %ecx
+ movzbl PSHARED(%ebx), %ecx
call __lll_lock_wait
jmp 13b
.size __pthread_rwlock_wrlock,.-__pthread_rwlock_wrlock

1003
glibc-sparc.patch Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,12 @@
diff -up glibc-20080412T0741/elf/Makefile.BAD glibc-20080412T0741/elf/Makefile
--- glibc-20080412T0741/elf/Makefile.BAD 2008-05-26 20:09:30.000000000 -0500
+++ glibc-20080412T0741/elf/Makefile 2008-05-26 20:10:19.000000000 -0500
@@ -389,6 +389,8 @@ CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'
-D'SLIBDIR="$(slibdir)"' -DIS_IN_ldconfig=1
CFLAGS-dl-cache.c = $(SYSCONF-FLAGS)
CFLAGS-cache.c = $(SYSCONF-FLAGS)
+CFLAGS-soinit.c += -fno-asynchronous-unwind-tables
+CFLAGS-sofini.c += -fno-asynchronous-unwind-tables
CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),-DNOT_IN_libc=1 -DIS_IN_rtld=1)

View File

@ -0,0 +1,75 @@
2008-10-09 Jakub Jelinek <jakub@redhat.com>,
David S. Miller <davem@davemloft.net>
* sysdeps/sparc/sparc64/sparcv9v/memcpy.S,
sysdeps/sparc/sparc64/sparcv9v/memset.S,
sysdeps/sparc/sparc64/sparcv9v2/memcpy.S: When not USE_BPR,
make sure any registers used with 64-bit 'branch-on-register'
instructions have their top 32-bits clear.
diff --git a/sysdeps/sparc/sparc64/sparcv9v/memcpy.S b/sysdeps/sparc/sparc64/sparcv9v/memcpy.S
index 05c837f..ad2b0f7 100644
--- a/sysdeps/sparc/sparc64/sparcv9v/memcpy.S
+++ b/sysdeps/sparc/sparc64/sparcv9v/memcpy.S
@@ -1,5 +1,5 @@
/* Copy SIZE bytes from SRC to DEST. For SUN4V Niagara.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller (davem@davemloft.net)
@@ -61,6 +61,9 @@ END(bcopy)
.align 32
ENTRY(memcpy)
+#ifndef USE_BPR
+ srl %o2, 0, %o2
+#endif
100: /* %o0=dst, %o1=src, %o2=len */
mov %o0, %g5
cmp %o2, 0
diff --git a/sysdeps/sparc/sparc64/sparcv9v/memset.S b/sysdeps/sparc/sparc64/sparcv9v/memset.S
index ac0a50c..64817b8 100644
--- a/sysdeps/sparc/sparc64/sparcv9v/memset.S
+++ b/sysdeps/sparc/sparc64/sparcv9v/memset.S
@@ -1,5 +1,5 @@
/* Set a block of memory to some byte value. For SUN4V Niagara.
- Copyright (C) 2006 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller (davem@davemloft.net)
@@ -49,7 +49,11 @@ END(memset)
ENTRY(__bzero)
clr %o2
-1: brz,pn %o1, 90f
+1:
+#ifndef USE_BRP
+ srl %o1, 0, %o1
+#endif
+ brz,pn %o1, 90f
mov %o0, %o3
wr %g0, ASI_P, %asi
diff --git a/sysdeps/sparc/sparc64/sparcv9v2/memcpy.S b/sysdeps/sparc/sparc64/sparcv9v2/memcpy.S
index d94dd47..b261f46 100644
--- a/sysdeps/sparc/sparc64/sparcv9v2/memcpy.S
+++ b/sysdeps/sparc/sparc64/sparcv9v2/memcpy.S
@@ -1,5 +1,5 @@
/* Copy SIZE bytes from SRC to DEST. For SUN4V Niagara-2.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2008 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David S. Miller (davem@davemloft.net)
@@ -163,6 +163,9 @@ END(bcopy)
.align 32
ENTRY(memcpy)
+#ifndef USE_BPR
+ srl %o2, 0, %o2
+#endif
100: /* %o0=dst, %o1=src, %o2=len */
mov %o0, %g5
cmp %o2, 0

123
glibc-tls-getaddr.patch Normal file
View File

@ -0,0 +1,123 @@
2008-05-11 Ulrich Drepper <drepper@redhat.com>
* elf/dl-tls.c (__tls_get_addr): Optimize by moving slow path in
its own function. This reduces the frame setup costs and more.
--- libc/elf/dl-tls.c 8 Mar 2008 06:11:58 -0000 1.6
+++ libc/elf/dl-tls.c 12 May 2008 05:35:52 -0000 1.7
@@ -691,6 +691,61 @@ _dl_update_slotinfo (unsigned long int r
}
+static void *
+__attribute_noinline__
+tls_get_addr_tail (dtv_t *dtv, struct link_map *the_map, size_t module)
+{
+ /* The allocation was deferred. Do it now. */
+ if (the_map == NULL)
+ {
+ /* Find the link map for this module. */
+ size_t idx = module;
+ struct dtv_slotinfo_list *listp = GL(dl_tls_dtv_slotinfo_list);
+
+ while (idx >= listp->len)
+ {
+ idx -= listp->len;
+ listp = listp->next;
+ }
+
+ the_map = listp->slotinfo[idx].map;
+ }
+
+ again:
+ /* Make sure that, if a dlopen running in parallel forces the
+ variable into static storage, we'll wait until the address in the
+ static TLS block is set up, and use that. If we're undecided
+ yet, make sure we make the decision holding the lock as well. */
+ if (__builtin_expect (the_map->l_tls_offset
+ != FORCED_DYNAMIC_TLS_OFFSET, 0))
+ {
+ __rtld_lock_lock_recursive (GL(dl_load_lock));
+ if (__builtin_expect (the_map->l_tls_offset == NO_TLS_OFFSET, 1))
+ {
+ the_map->l_tls_offset = FORCED_DYNAMIC_TLS_OFFSET;
+ __rtld_lock_unlock_recursive (GL(dl_load_lock));
+ }
+ else
+ {
+ __rtld_lock_unlock_recursive (GL(dl_load_lock));
+ if (__builtin_expect (the_map->l_tls_offset
+ != FORCED_DYNAMIC_TLS_OFFSET, 1))
+ {
+ void *p = dtv[module].pointer.val;
+ if (__builtin_expect (p == TLS_DTV_UNALLOCATED, 0))
+ goto again;
+
+ return p;
+ }
+ }
+ }
+ void *p = dtv[module].pointer.val = allocate_and_init (the_map);
+ dtv[module].pointer.is_static = false;
+
+ return p;
+}
+
+
/* The generic dynamic and local dynamic model cannot be used in
statically linked applications. */
void *
@@ -703,52 +758,10 @@ __tls_get_addr (GET_ADDR_ARGS)
if (__builtin_expect (dtv[0].counter != GL(dl_tls_generation), 0))
the_map = _dl_update_slotinfo (GET_ADDR_MODULE);
- retry:
p = dtv[GET_ADDR_MODULE].pointer.val;
if (__builtin_expect (p == TLS_DTV_UNALLOCATED, 0))
- {
- /* The allocation was deferred. Do it now. */
- if (the_map == NULL)
- {
- /* Find the link map for this module. */
- size_t idx = GET_ADDR_MODULE;
- struct dtv_slotinfo_list *listp = GL(dl_tls_dtv_slotinfo_list);
-
- while (idx >= listp->len)
- {
- idx -= listp->len;
- listp = listp->next;
- }
-
- the_map = listp->slotinfo[idx].map;
- }
-
- /* Make sure that, if a dlopen running in parallel forces the
- variable into static storage, we'll wait until the address in
- the static TLS block is set up, and use that. If we're
- undecided yet, make sure we make the decision holding the
- lock as well. */
- if (__builtin_expect (the_map->l_tls_offset
- != FORCED_DYNAMIC_TLS_OFFSET, 0))
- {
- __rtld_lock_lock_recursive (GL(dl_load_lock));
- if (__builtin_expect (the_map->l_tls_offset == NO_TLS_OFFSET, 1))
- {
- the_map->l_tls_offset = FORCED_DYNAMIC_TLS_OFFSET;
- __rtld_lock_unlock_recursive (GL(dl_load_lock));
- }
- else
- {
- __rtld_lock_unlock_recursive (GL(dl_load_lock));
- if (__builtin_expect (the_map->l_tls_offset
- != FORCED_DYNAMIC_TLS_OFFSET, 1))
- goto retry;
- }
- }
- p = dtv[GET_ADDR_MODULE].pointer.val = allocate_and_init (the_map);
- dtv[GET_ADDR_MODULE].pointer.is_static = false;
- }
+ p = tls_get_addr_tail (dtv, the_map, GET_ADDR_MODULE);
return (char *) p + GET_ADDR_OFFSET;
}

7216
glibc.spec

File diff suppressed because it is too large Load Diff

View File

@ -1 +0,0 @@
d /run/nscd 0755 root root

View File

@ -1,273 +0,0 @@
/* 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");
#ifdef __powerpc64__
#define m1 0x5555555555555555L
#define m2 0x3333333333333333L
#define m3 0x0f0f0f0f0f0f0f0fL
#else
#define m1 0x55555555
#define m2 0x33333333
#define m3 0x0f0f0f0f
#endif
static inline unsigned long
popcntb (unsigned long n)
{
n -= (n >> 1) & m1;
n = (n & m2) + ((n >> 2) & m2);
n = (n + (n >> 4)) & m3;
return 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;
}
if ((insn & 0xfc00ffff) == 0x7c0000f4) /* popcntb */
{
unsigned long *regs = (unsigned long *) ctx->regs;
unsigned dest = (insn >> 16) & 0x1f;
unsigned src = (insn >> 21) & 0x1f;
unsigned long res = 0;
int i;
regs[dest] = popcntb (regs[src]);
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);
}

View File

@ -1,22 +0,0 @@
#!/bin/bash
# Patches are in the current directory.
export QUILT_PATCHES=$PWD
# Extract source file name from sources file,
# and assume it's the same name as the directory.
source=`awk -F '[() ]+' '/^[A-Z0-9]+ /{print $2}; /^[0-9a-f]+ /{print $2}' sources`
srcdir=${source%.tar.xz}
if [ "$1" == "-f" ] && [ -d "$srcdir" ]; then
echo Cleaning up $srcdir
rm -rf $srcdir
fi
if [ -d "$srcdir" ]; then
# Don't overwrite existing source directory.
echo "ERROR: Source directory $srcdir already exists. Use -f to force cleanup step."
exit 1
fi
tar Jxvf $source
echo "Entering $srcdir"
pushd $srcdir
# Apply all patches.
quilt push -a
popd

View File

@ -1 +1,2 @@
SHA512 (glibc-2.30.9000-100-g1a6566094d.tar.xz) = e6054a8f1367fde262f023c76f7eaf5ce588613c4894b8d577c7e1c3159a2dfcefb7c60e301340b823cd8e6d2f8d264d7da83e61034b9180836d392d5db4c5ba
8b67546612e1b53aced5e16b51b48fba glibc-20080412T0741.tar.bz2
9141e1d01ea2422a6e81fa84978a08ee glibc-fedora-20080412T0741.tar.bz2

View File

@ -1,11 +0,0 @@
Short description: <Short description>
Author(s): <Who wrote them. Comma separated.>
Origin: <Source repo(s) where it came from or keyword "PATCH" if this is simply a patch>
# Likely git://sourceware.org/git/glibc.git
Bug-RHEL: <Rhel bug #'s, comma separated e.g. #XXX, #YYY, #ZZZ>
Bug-Fedora: <Fedora bug #'s, comma separated e.g. #XXX, #YYY, #ZZZ>
Bug-Upstream: <Upstream bug#'s, comma separated e.g. #XXX, #YYY, #ZZZ>
Upstream status: <[Patchwork URL|libc-alpha URL|not-needed|not-submitted|committed] for each commit>
# <Additional descriptive text follows 'Upstream status:' line>
<If upstream status == committed then a copy of the upstream commit log follows>
<Patch>