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
|
||||
# whenever this changes or the `glibcbug.in' file.
|
||||
$(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.
|
||||
.PHONY: info dvi
|
||||
|
14
Makerules
14
Makerules
@ -573,8 +573,8 @@ object-suffixes-left := $(object-suffixes)
|
||||
endif
|
||||
include $(o-iterator)
|
||||
define do-ar
|
||||
topdir=`cd $(..).; pwd`; \
|
||||
$(patsubst %/,cd %;,$(objpfx)) \
|
||||
topdir=`cd $(..). && pwd`; \
|
||||
$(patsubst %/,cd % &&,$(objpfx)) \
|
||||
$(SHELL) $$topdir/autolock.sh ${O%-lib}.lck $(AR) $(CREATE_ARFLAGS) ${O%-lib} \
|
||||
$(patsubst $(objpfx)%,%,$?)
|
||||
rm -f $@
|
||||
@ -617,7 +617,7 @@ objects objs: $(foreach o,$(object-suffixes-for-libc),$(o-objects)) \
|
||||
|
||||
# Canned sequence for building an extra library archive.
|
||||
define build-extra-lib
|
||||
$(patsubst %/,cd %;,$(objpfx)) \
|
||||
$(patsubst %/,cd % &&,$(objpfx)) \
|
||||
$(AR) $(CREATE_ARFLAGS) $(@:$(objpfx)%=%) \
|
||||
$(patsubst $(objpfx)%,%,$^)
|
||||
$(RANLIB) $@
|
||||
@ -901,7 +901,7 @@ install: install-no-libc.a-nosubdir
|
||||
# Command to compile $< in $(objdir) using the native libraries.
|
||||
define native-compile
|
||||
$(make-target-directory)
|
||||
$(patsubst %/,cd %;,$(objpfx)) \
|
||||
$(patsubst %/,cd % &&,$(objpfx)) \
|
||||
$(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \
|
||||
$(firstword $(filter /%,$< $(shell pwd)/$<)) -o $(@F)
|
||||
endef
|
||||
@ -909,7 +909,7 @@ endef
|
||||
# Command to compile $< in $(common-objdir) using the native libraries.
|
||||
# We must cd to $(objdir) anyway so that $(..)config.h is valid.
|
||||
define common-objdir-compile
|
||||
$(patsubst %/,cd %;,$(objpfx)) \
|
||||
$(patsubst %/,cd % &&,$(objpfx)) \
|
||||
$(BUILD_CC) $($(basename $(<F))-CFLAGS) $(ALL_BUILD_CFLAGS) \
|
||||
$(firstword $(filter /%,$< $(shell pwd)/$<)) -o $(..)$(@F)
|
||||
endef
|
||||
@ -978,8 +978,8 @@ stubs: $(common-objpfx)stub-$(subdir)
|
||||
s = $(sysdep_dir)/generic
|
||||
$(common-objpfx)stub-$(subdir): $(+depfiles)
|
||||
# Use /dev/null since `...` might expand to empty.
|
||||
(s=`cd $s; /bin/pwd`; \
|
||||
$(patsubst %/,cd %;,$(objpfx)) \
|
||||
(s=`cd $s && /bin/pwd`; \
|
||||
$(patsubst %/,cd % &&,$(objpfx)) \
|
||||
sed -n 's/^stub_warning *(\([^)]*\).*$$/#define __stub_\1/p' \
|
||||
`sed -n -e '\@ $s/[^ ]*\.c@{; s@^.* $s/\([^ ]*\.c\).*$$@'"$$s"'/\1@; h; }' \
|
||||
-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;
|
||||
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)
|
||||
continue;
|
||||
{
|
||||
static char curwd[2];
|
||||
cp = strcpy (curwd, ".");
|
||||
}
|
||||
|
||||
/* Remove trailing slashes. */
|
||||
while (len > 1 && cp[len - 1] == '/')
|
||||
@ -331,8 +335,11 @@ _dl_init_paths (const char *llp)
|
||||
const char *cp = llp;
|
||||
nllp = 1;
|
||||
while (*cp)
|
||||
if (*cp++ == ':')
|
||||
++nllp;
|
||||
{
|
||||
if (*cp == ':' || *cp == ';')
|
||||
++nllp;
|
||||
++cp;
|
||||
}
|
||||
}
|
||||
else
|
||||
nllp = 0;
|
||||
|
@ -56,13 +56,8 @@ dlerror (void)
|
||||
}
|
||||
|
||||
/* Get error string. */
|
||||
if (__libc_internal_tsd_get != NULL)
|
||||
{
|
||||
result = (struct dl_action_result *) __libc_getspecific (key);
|
||||
if (result == NULL)
|
||||
result = &last_result;
|
||||
}
|
||||
else
|
||||
result = (struct dl_action_result *) __libc_getspecific (key);
|
||||
if (result == NULL)
|
||||
result = &last_result;
|
||||
|
||||
if (! result->errstring)
|
||||
|
@ -44,15 +44,15 @@ while read from to subset targets; do
|
||||
|
||||
for t in $targets; do
|
||||
$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
|
||||
cmp $temp1 testdata/$from..$t >& /dev/null ||
|
||||
{ echo "*** $from -> $t conversion failed"; failed=1; }
|
||||
cmp $temp1 testdata/$from..$t > /dev/null 2>&1 ||
|
||||
{ echo "*** $from -> $t conversion failed"; failed=1; continue; }
|
||||
fi
|
||||
$ICONV -f $t -t $to -o $temp2 $temp1 ||
|
||||
{ echo "*** conversion from $t to $to failed"; failed=1; }
|
||||
test -s $temp1 && cmp testdata/$from $temp2 >& /dev/null ||
|
||||
{ echo "*** $from -> t -> $to conversion failed"; failed=1; }
|
||||
{ echo "*** conversion from $t to $to failed"; failed=1; continue; }
|
||||
test -s $temp1 && cmp testdata/$from $temp2 > /dev/null 2>&1 ||
|
||||
{ echo "*** $from -> t -> $to conversion failed"; failed=1; continue; }
|
||||
rm -f $temp1 $temp2
|
||||
|
||||
# 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
|
||||
$ICONV -f $from -t $t testdata/suntzus |
|
||||
$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 ||
|
||||
{ echo "*** conversion $from->$t->$to of suntzus incorrect";
|
||||
failed=1; }
|
||||
failed=1; continue; }
|
||||
else
|
||||
$ICONV -f ASCII -t $to testdata/suntzus |
|
||||
$ICONV -f $to -f ASCII > $temp1 ||
|
||||
{ echo "*** conversion ASCII->$to->ASCII of suntzus failed";
|
||||
failed=1; }
|
||||
failed=1; continue; }
|
||||
cmp testdata/suntzus $temp1 ||
|
||||
{ echo "*** conversion ASCII->$to->ASCII of suntzus incorrect";
|
||||
failed=1; }
|
||||
failed=1; continue; }
|
||||
fi
|
||||
rm -f $temp1
|
||||
# All tests ok.
|
||||
|
Loading…
Reference in New Issue
Block a user