mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
(dlerror): Don't assume that __libc_internal_tsd_get is defined. __libc_getspecific is already well-protected, so just use it directly.
This commit is contained in:
parent
dc9335c14f
commit
af3878dff0
2
Makefile
2
Makefile
@ -232,7 +232,7 @@ endif
|
|||||||
# The `glibcbug' script contains the version number and it shall be rebuild
|
# The `glibcbug' script contains the version number and it shall be rebuild
|
||||||
# whenever this changes or the `glibcbug.in' file.
|
# whenever this changes or the `glibcbug.in' file.
|
||||||
$(objpfx)glibcbug: $(common-objpfx)config.status glibcbug.in
|
$(objpfx)glibcbug: $(common-objpfx)config.status glibcbug.in
|
||||||
cd $(<D); CONFIG_FILES=$(@F) CONFIG_HEADERS= $(SHELL) $(<F)
|
cd $(<D) && CONFIG_FILES=$(@F) CONFIG_HEADERS= $(SHELL) $(<F)
|
||||||
|
|
||||||
# This makes the Info or DVI file of the documentation from the Texinfo source.
|
# This makes the Info or DVI file of the documentation from the Texinfo source.
|
||||||
.PHONY: info dvi
|
.PHONY: info dvi
|
||||||
|
14
Makerules
14
Makerules
@ -573,8 +573,8 @@ object-suffixes-left := $(object-suffixes)
|
|||||||
endif
|
endif
|
||||||
include $(o-iterator)
|
include $(o-iterator)
|
||||||
define do-ar
|
define do-ar
|
||||||
topdir=`cd $(..).; pwd`; \
|
topdir=`cd $(..). && pwd`; \
|
||||||
$(patsubst %/,cd %;,$(objpfx)) \
|
$(patsubst %/,cd % &&,$(objpfx)) \
|
||||||
$(SHELL) $$topdir/autolock.sh ${O%-lib}.lck $(AR) $(CREATE_ARFLAGS) ${O%-lib} \
|
$(SHELL) $$topdir/autolock.sh ${O%-lib}.lck $(AR) $(CREATE_ARFLAGS) ${O%-lib} \
|
||||||
$(patsubst $(objpfx)%,%,$?)
|
$(patsubst $(objpfx)%,%,$?)
|
||||||
rm -f $@
|
rm -f $@
|
||||||
@ -617,7 +617,7 @@ objects objs: $(foreach o,$(object-suffixes-for-libc),$(o-objects)) \
|
|||||||
|
|
||||||
# Canned sequence for building an extra library archive.
|
# Canned sequence for building an extra library archive.
|
||||||
define build-extra-lib
|
define build-extra-lib
|
||||||
$(patsubst %/,cd %;,$(objpfx)) \
|
$(patsubst %/,cd % &&,$(objpfx)) \
|
||||||
$(AR) $(CREATE_ARFLAGS) $(@:$(objpfx)%=%) \
|
$(AR) $(CREATE_ARFLAGS) $(@:$(objpfx)%=%) \
|
||||||
$(patsubst $(objpfx)%,%,$^)
|
$(patsubst $(objpfx)%,%,$^)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
@ -901,7 +901,7 @@ install: install-no-libc.a-nosubdir
|
|||||||
# Command to compile $< in $(objdir) using the native libraries.
|
# Command to compile $< in $(objdir) using the native libraries.
|
||||||
define native-compile
|
define native-compile
|
||||||
$(make-target-directory)
|
$(make-target-directory)
|
||||||
$(patsubst %/,cd %;,$(objpfx)) \
|
$(patsubst %/,cd % &&,$(objpfx)) \
|
||||||
$(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \
|
$(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \
|
||||||
$(firstword $(filter /%,$< $(shell pwd)/$<)) -o $(@F)
|
$(firstword $(filter /%,$< $(shell pwd)/$<)) -o $(@F)
|
||||||
endef
|
endef
|
||||||
@ -909,7 +909,7 @@ endef
|
|||||||
# Command to compile $< in $(common-objdir) using the native libraries.
|
# Command to compile $< in $(common-objdir) using the native libraries.
|
||||||
# We must cd to $(objdir) anyway so that $(..)config.h is valid.
|
# We must cd to $(objdir) anyway so that $(..)config.h is valid.
|
||||||
define common-objdir-compile
|
define common-objdir-compile
|
||||||
$(patsubst %/,cd %;,$(objpfx)) \
|
$(patsubst %/,cd % &&,$(objpfx)) \
|
||||||
$(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \
|
$(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \
|
||||||
$(firstword $(filter /%,$< $(shell pwd)/$<)) -o $(..)$(@F)
|
$(firstword $(filter /%,$< $(shell pwd)/$<)) -o $(..)$(@F)
|
||||||
endef
|
endef
|
||||||
@ -978,8 +978,8 @@ stubs: $(common-objpfx)stub-$(subdir)
|
|||||||
s = $(sysdep_dir)/generic
|
s = $(sysdep_dir)/generic
|
||||||
$(common-objpfx)stub-$(subdir): $(+depfiles)
|
$(common-objpfx)stub-$(subdir): $(+depfiles)
|
||||||
# Use /dev/null since `...` might expand to empty.
|
# Use /dev/null since `...` might expand to empty.
|
||||||
(s=`cd $s; /bin/pwd`; \
|
(s=`cd $s && /bin/pwd`; \
|
||||||
$(patsubst %/,cd %;,$(objpfx)) \
|
$(patsubst %/,cd % &&,$(objpfx)) \
|
||||||
sed -n 's/^stub_warning *(\([^)]*\).*$$/#define __stub_\1/p' \
|
sed -n 's/^stub_warning *(\([^)]*\).*$$/#define __stub_\1/p' \
|
||||||
`sed -n -e '\@ $s/[^ ]*\.c@{; s@^.* $s/\([^ ]*\.c\).*$$@'"$$s"'/\1@; h; }' \
|
`sed -n -e '\@ $s/[^ ]*\.c@{; s@^.* $s/\([^ ]*\.c\).*$$@'"$$s"'/\1@; h; }' \
|
||||||
-e '/stub-tag\.h/{; g; p; }' \
|
-e '/stub-tag\.h/{; g; p; }' \
|
||||||
|
@ -182,9 +182,13 @@ fillin_rpath (char *rpath, struct r_search_path_elem **result, const char *sep,
|
|||||||
struct r_search_path_elem *dirp;
|
struct r_search_path_elem *dirp;
|
||||||
size_t len = strlen (cp);
|
size_t len = strlen (cp);
|
||||||
|
|
||||||
/* `strsep' can pass an empty string. */
|
/* `strsep' can pass an empty string. This has to be
|
||||||
|
interpreted as `use the current directory'. */
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
continue;
|
{
|
||||||
|
static char curwd[2];
|
||||||
|
cp = strcpy (curwd, ".");
|
||||||
|
}
|
||||||
|
|
||||||
/* Remove trailing slashes. */
|
/* Remove trailing slashes. */
|
||||||
while (len > 1 && cp[len - 1] == '/')
|
while (len > 1 && cp[len - 1] == '/')
|
||||||
@ -331,8 +335,11 @@ _dl_init_paths (const char *llp)
|
|||||||
const char *cp = llp;
|
const char *cp = llp;
|
||||||
nllp = 1;
|
nllp = 1;
|
||||||
while (*cp)
|
while (*cp)
|
||||||
if (*cp++ == ':')
|
{
|
||||||
++nllp;
|
if (*cp == ':' || *cp == ';')
|
||||||
|
++nllp;
|
||||||
|
++cp;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
nllp = 0;
|
nllp = 0;
|
||||||
|
@ -56,13 +56,8 @@ dlerror (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get error string. */
|
/* Get error string. */
|
||||||
if (__libc_internal_tsd_get != NULL)
|
result = (struct dl_action_result *) __libc_getspecific (key);
|
||||||
{
|
if (result == NULL)
|
||||||
result = (struct dl_action_result *) __libc_getspecific (key);
|
|
||||||
if (result == NULL)
|
|
||||||
result = &last_result;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
result = &last_result;
|
result = &last_result;
|
||||||
|
|
||||||
if (! result->errstring)
|
if (! result->errstring)
|
||||||
|
@ -44,15 +44,15 @@ while read from to subset targets; do
|
|||||||
|
|
||||||
for t in $targets; do
|
for t in $targets; do
|
||||||
$ICONV -f $from -t $t testdata/$from > $temp1 ||
|
$ICONV -f $from -t $t testdata/$from > $temp1 ||
|
||||||
{ echo "*** conversion from $from to $t failed"; failed=1; }
|
{ echo "*** conversion from $from to $t failed"; failed=1; continue; }
|
||||||
if test -s testdata/$from..$t; then
|
if test -s testdata/$from..$t; then
|
||||||
cmp $temp1 testdata/$from..$t >& /dev/null ||
|
cmp $temp1 testdata/$from..$t > /dev/null 2>&1 ||
|
||||||
{ echo "*** $from -> $t conversion failed"; failed=1; }
|
{ echo "*** $from -> $t conversion failed"; failed=1; continue; }
|
||||||
fi
|
fi
|
||||||
$ICONV -f $t -t $to -o $temp2 $temp1 ||
|
$ICONV -f $t -t $to -o $temp2 $temp1 ||
|
||||||
{ echo "*** conversion from $t to $to failed"; failed=1; }
|
{ echo "*** conversion from $t to $to failed"; failed=1; continue; }
|
||||||
test -s $temp1 && cmp testdata/$from $temp2 >& /dev/null ||
|
test -s $temp1 && cmp testdata/$from $temp2 > /dev/null 2>&1 ||
|
||||||
{ echo "*** $from -> t -> $to conversion failed"; failed=1; }
|
{ echo "*** $from -> t -> $to conversion failed"; failed=1; continue; }
|
||||||
rm -f $temp1 $temp2
|
rm -f $temp1 $temp2
|
||||||
|
|
||||||
# Now test some bigger text, entirely in ASCII. If ASCII is no subset
|
# Now test some bigger text, entirely in ASCII. If ASCII is no subset
|
||||||
@ -61,18 +61,19 @@ while read from to subset targets; do
|
|||||||
if test $subset = Y; then
|
if test $subset = Y; then
|
||||||
$ICONV -f $from -t $t testdata/suntzus |
|
$ICONV -f $from -t $t testdata/suntzus |
|
||||||
$ICONV -f $t -t $to > $temp1 ||
|
$ICONV -f $t -t $to > $temp1 ||
|
||||||
{ echo "*** conversion $from->$t->$to of suntzus failed"; failed=1; }
|
{ echo "*** conversion $from->$t->$to of suntzus failed"; failed=1;
|
||||||
|
continue; }
|
||||||
cmp testdata/suntzus $temp1 ||
|
cmp testdata/suntzus $temp1 ||
|
||||||
{ echo "*** conversion $from->$t->$to of suntzus incorrect";
|
{ echo "*** conversion $from->$t->$to of suntzus incorrect";
|
||||||
failed=1; }
|
failed=1; continue; }
|
||||||
else
|
else
|
||||||
$ICONV -f ASCII -t $to testdata/suntzus |
|
$ICONV -f ASCII -t $to testdata/suntzus |
|
||||||
$ICONV -f $to -f ASCII > $temp1 ||
|
$ICONV -f $to -f ASCII > $temp1 ||
|
||||||
{ echo "*** conversion ASCII->$to->ASCII of suntzus failed";
|
{ echo "*** conversion ASCII->$to->ASCII of suntzus failed";
|
||||||
failed=1; }
|
failed=1; continue; }
|
||||||
cmp testdata/suntzus $temp1 ||
|
cmp testdata/suntzus $temp1 ||
|
||||||
{ echo "*** conversion ASCII->$to->ASCII of suntzus incorrect";
|
{ echo "*** conversion ASCII->$to->ASCII of suntzus incorrect";
|
||||||
failed=1; }
|
failed=1; continue; }
|
||||||
fi
|
fi
|
||||||
rm -f $temp1
|
rm -f $temp1
|
||||||
# All tests ok.
|
# All tests ok.
|
||||||
|
Loading…
Reference in New Issue
Block a user