1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-01 10:06:57 +03:00
1998-12-21  Ulrich Drepper  <drepper@cygnus.com>

	* inet/gethstbynm_r.c: Remove NEED__RES definition since we do this
	anyway for digits_dots.c.
	* nss/getXXbyYY.c: Initialize _res before using digits_dots.c
	functions.
	* nss/getXXbyYY_r.c: Likewise.

1998-12-19  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de> 
 
	* sunrpc/key_call.c (getkeyserv_handle): Use __fcntl instead of 
	fcntl.
 
1998-12-20  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de> 
 
	* locale/weight.h (get_weight): Extract string elements as 
	unsigned values.
This commit is contained in:
Ulrich Drepper
1998-12-21 12:25:07 +00:00
parent 095827866f
commit d17a729b48
11 changed files with 69 additions and 31 deletions

View File

@ -1,3 +1,21 @@
1998-12-21 Ulrich Drepper <drepper@cygnus.com>
* inet/gethstbynm_r.c: Remove NEED__RES definition since we do this
anyway for digits_dots.c.
* nss/getXXbyYY.c: Initialize _res before using digits_dots.c
functions.
* nss/getXXbyYY_r.c: Likewise.
1998-12-19 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* sunrpc/key_call.c (getkeyserv_handle): Use __fcntl instead of
fcntl.
1998-12-20 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
* locale/weight.h (get_weight): Extract string elements as
unsigned values.
1998-12-06 Mark Kettenis <kettenis@phys.uva.nl> 1998-12-06 Mark Kettenis <kettenis@phys.uva.nl>
Reverse the change of 1998-04-22. Providing a struct dirent with Reverse the change of 1998-04-22. Providing a struct dirent with

View File

@ -101,11 +101,9 @@ int __pthread_manager(void *arg)
/* Set the error variable. */ /* Set the error variable. */
__pthread_manager_thread.p_errnop = &__pthread_manager_thread.p_errno; __pthread_manager_thread.p_errnop = &__pthread_manager_thread.p_errno;
__pthread_manager_thread.p_h_errnop = &__pthread_manager_thread.p_h_errno; __pthread_manager_thread.p_h_errnop = &__pthread_manager_thread.p_h_errno;
/* Block all signals except __pthread_sig_restart, __pthread_sig_cancel /* Block all signals except __pthread_sig_cancel and SIGTRAP */
and SIGTRAP */
sigfillset(&mask); sigfillset(&mask);
sigdelset(&mask, __pthread_sig_restart); sigdelset(&mask, __pthread_sig_cancel); /* for thread termination */
sigdelset(&mask, __pthread_sig_cancel); /* for debugging new threads */
sigdelset(&mask, SIGTRAP); /* for debugging purposes */ sigdelset(&mask, SIGTRAP); /* for debugging purposes */
sigprocmask(SIG_SETMASK, &mask, NULL); sigprocmask(SIG_SETMASK, &mask, NULL);
/* Raise our priority to match that of main thread */ /* Raise our priority to match that of main thread */
@ -378,7 +376,7 @@ static int pthread_handle_create(pthread_t *thread, const pthread_attr_t *attr,
#ifdef CLONE_PTRACE #ifdef CLONE_PTRACE
CLONE_PTRACE | CLONE_PTRACE |
#endif #endif
__pthread_sig_restart, new_thread); __pthread_sig_cancel, new_thread);
/* Check if cloning succeeded */ /* Check if cloning succeeded */
if (pid == -1) { if (pid == -1) {
/* Free the stack if we allocated it */ /* Free the stack if we allocated it */

View File

@ -459,9 +459,7 @@ static void pthread_exit_process(int retcode, void *arg)
/* The handler for the RESTART signal just records the signal received /* The handler for the RESTART signal just records the signal received
in the thread descriptor, and optionally performs a siglongjmp in the thread descriptor, and optionally performs a siglongjmp
(for pthread_cond_timedwait). (for pthread_cond_timedwait). */
For the thread manager thread, redirect the signal to
__pthread_manager_sighandler. */
#ifndef __i386__ #ifndef __i386__
static void pthread_handle_sigrestart(int sig) static void pthread_handle_sigrestart(int sig)
@ -474,18 +472,15 @@ static void pthread_handle_sigrestart(int sig, struct sigcontext ctx)
asm volatile ("movw %w0,%%gs" : : "r" (ctx.gs)); asm volatile ("movw %w0,%%gs" : : "r" (ctx.gs));
self = thread_self(); self = thread_self();
#endif #endif
if (self == &__pthread_manager_thread) {
__pthread_manager_sighandler(sig);
} else {
THREAD_SETMEM(self, p_signal, sig); THREAD_SETMEM(self, p_signal, sig);
if (THREAD_GETMEM(self, p_signal_jmp) != NULL) if (THREAD_GETMEM(self, p_signal_jmp) != NULL)
siglongjmp(*THREAD_GETMEM(self, p_signal_jmp), 1); siglongjmp(*THREAD_GETMEM(self, p_signal_jmp), 1);
} }
}
/* The handler for the CANCEL signal checks for cancellation /* The handler for the CANCEL signal checks for cancellation
(in asynchronous mode), for process-wide exit and exec requests. (in asynchronous mode), for process-wide exit and exec requests.
For the thread manager thread, we ignore the signal. For the thread manager thread, redirect the signal to
__pthread_manager_sighandler.
The debugging strategy is as follows: The debugging strategy is as follows:
On reception of a REQ_DEBUG request (sent by new threads created to On reception of a REQ_DEBUG request (sent by new threads created to
the thread manager under debugging mode), the thread manager throws the thread manager under debugging mode), the thread manager throws
@ -510,7 +505,10 @@ static void pthread_handle_sigcancel(int sig, struct sigcontext ctx)
#endif #endif
if (self == &__pthread_manager_thread) if (self == &__pthread_manager_thread)
{
__pthread_manager_sighandler(sig);
return; return;
}
if (__pthread_exit_requested) { if (__pthread_exit_requested) {
/* Main thread should accumulate times for thread manager and its /* Main thread should accumulate times for thread manager and its
children, so that timings for main thread account for all threads. */ children, so that timings for main thread account for all threads. */

View File

@ -57,7 +57,8 @@ __compare_and_swap (long int *p, long int oldval, long int newval)
__asm__ __volatile__ ("lock; cmpxchgl %3, %1; sete %0" __asm__ __volatile__ ("lock; cmpxchgl %3, %1; sete %0"
: "=q" (ret), "=m" (*p), "=a" (readval) : "=q" (ret), "=m" (*p), "=a" (readval)
: "r" (newval), "m" (*p), "a" (oldval)); : "r" (newval), "m" (*p), "a" (oldval)
: "memory");
return ret; return ret;
} }

View File

@ -60,7 +60,8 @@ __compare_and_swap (long int *p, long int oldval, long int newval)
__asm__ __volatile__ ("lock; cmpxchgl %3, %1; sete %0" __asm__ __volatile__ ("lock; cmpxchgl %3, %1; sete %0"
: "=q" (ret), "=m" (*p), "=a" (readval) : "=q" (ret), "=m" (*p), "=a" (readval)
: "r" (newval), "m" (*p), "a" (oldval)); : "r" (newval), "m" (*p), "a" (oldval)
: "memory");
return ret; return ret;
} }

View File

@ -115,7 +115,7 @@ get_weight (const STRING_TYPE **str, weight_t *result,
if (__collate_table[slot + 1] != (u_int32_t) FORWARD_CHAR) if (__collate_table[slot + 1] != (u_int32_t) FORWARD_CHAR)
{ {
/* We have a simple form. One one value for each weight. */ /* We have a simple form. One value for each weight. */
size_t cnt; size_t cnt;
for (cnt = 0; cnt < collate_nrules; ++cnt) for (cnt = 0; cnt < collate_nrules; ++cnt)
@ -139,10 +139,10 @@ get_weight (const STRING_TYPE **str, weight_t *result,
/* This is a comparison between a u_int32_t array (aka wchar_t) and /* This is a comparison between a u_int32_t array (aka wchar_t) and
an 8-bit string. */ an 8-bit string. */
for (idx = 0; __collate_extra[slot + 2 + idx] != 0; ++idx) for (idx = 0; __collate_extra[slot + 2 + idx] != 0; ++idx)
if (__collate_extra[slot + 2 + idx] != (u_int32_t) (*str)[idx]) if (__collate_extra[slot + 2 + idx] != ((USTRING_TYPE *) *str)[idx])
break; break;
/* When the loop finished with all character of the collation /* When the loop finished with all characters of the collation
element used, we found the longest prefix. */ element used, we found the longest prefix. */
if (__collate_extra[slot + 2 + idx] == 0) if (__collate_extra[slot + 2 + idx] == 0)
{ {
@ -174,10 +174,10 @@ get_weight (const STRING_TYPE **str, weight_t *result,
We have this strange extra macro since the functions which use the We have this strange extra macro since the functions which use the
given locale (not the global one) cannot use the global tables. */ given locale (not the global one) cannot use the global tables. */
#ifndef USE_IN_EXTENDED_LOCALE_MODEL #ifndef USE_IN_EXTENDED_LOCALE_MODEL
# define call_get_weight(strp, newp) get_weight ((strp), (newp)) # define call_get_weight(strp, newp) get_weight (strp, newp)
#else #else
# define call_get_weight(strp, newp) \ # define call_get_weight(strp, newp) \
get_weight ((strp), (newp), current, collate_table, collate_extra) get_weight (strp, newp, current, collate_table, collate_extra)
#endif #endif
#define get_string(str, forw, backw) \ #define get_string(str, forw, backw) \

View File

@ -35,7 +35,9 @@ repertoiremaps := $(filter-out $(addprefix repertoiremaps/, CVS RCS %~), \
$(wildcard repertoiremaps/*)) $(wildcard repertoiremaps/*))
test-srcs := collate-test xfrm-test tst-fmon tst-rpmatch test-srcs := collate-test xfrm-test tst-fmon tst-rpmatch
test-input := de_DE.ISO-8859-1 da_DK.ISO-8859-1 fr_CA,2.13.ISO-8859-1 test-input := de_DE.ISO-8859-1 da_DK.ISO-8859-1 fr_CA,2.13.ISO-8859-1 \
hr_HR.ISO-8859-2
test-input-data = $(addsuffix .in, $(basename $(test-input)))
test-output := $(foreach s, .out .xout, \ test-output := $(foreach s, .out .xout, \
$(addsuffix $s, $(basename $(test-input)))) $(addsuffix $s, $(basename $(test-input))))
ld-test-names := test1 test2 test3 test4 test5 ld-test-names := test1 test2 test3 test4 test5
@ -45,10 +47,10 @@ ld-test-srcs := $(addprefix tests/,$(addsuffix .cm,$(ld-test-names)) \
generated := $(test-input) $(test-output) generated := $(test-input) $(test-output)
generated-dirs := $(basename $(test-input)) en_US $(ld-test-names) generated-dirs := $(basename $(test-input)) en_US $(ld-test-names)
distribute := CHECKSUMS tst-fmon.sh tst-fmon.data ChangeLog sort-test.sh \ distribute := CHECKSUMS README SUPPORTED ChangeLog \
README fr_CA,2.13.in de_DE.in da_DK.in $(repertoiremaps) \ $(charmaps) $(locales) $(repertoiremaps) \
$(charmaps) $(locales) $(ld-test-srcs) tst-rpmatch.sh \ tst-rpmatch.sh tst-locale.sh tst-fmon.sh sort-test.sh \
SUPPORTED tst-locale.sh tst-fmon.data $(test-input-data) $(ld-test-srcs)
# Get $(inst_i18ndir) defined. # Get $(inst_i18ndir) defined.
include ../Makeconfig include ../Makeconfig
@ -69,7 +71,7 @@ ifeq (no,$(cross-compiling))
.PHONY: do-collate-test do-tst-fmon do-tst-locale do-tst-rpmatch .PHONY: do-collate-test do-tst-fmon do-tst-locale do-tst-rpmatch
tests: do-collate-test do-tst-fmon do-tst-locale do-tst-rpmatch tests: do-collate-test do-tst-fmon do-tst-locale do-tst-rpmatch
do-collate-test: sort-test.sh $(objpfx)collate-test $(objpfx)xfrm-test \ do-collate-test: sort-test.sh $(objpfx)collate-test $(objpfx)xfrm-test \
$(test-input:.ISO-8859-1=.in) $(test-input-data)
$(SHELL) -e $< $(common-objpfx) $(test-input) $(SHELL) -e $< $(common-objpfx) $(test-input)
do-tst-fmon: tst-fmon.sh $(objpfx)tst-fmon tst-fmon.data do-collate-test do-tst-fmon: tst-fmon.sh $(objpfx)tst-fmon tst-fmon.data do-collate-test
$(SHELL) -e $< $(common-objpfx) tst-fmon.data $(SHELL) -e $< $(common-objpfx) tst-fmon.data

2
localedata/hr_HR.in Normal file
View File

@ -0,0 +1,2 @@
Ϯ ; <D<>;<Z<>
D<EFBFBD> ; <D-Z<>

View File

@ -96,6 +96,16 @@ FUNCTION_NAME (ADD_PARAMS)
if (buffer != NULL) if (buffer != NULL)
{ {
#ifdef HANDLE_DIGITS_DOTS #ifdef HANDLE_DIGITS_DOTS
/* We have to test for the use of IPv6 which can only be done by
examining `_res'. */
if ((_res.options & RES_INIT) == 0 && res_init () == -1)
{
# ifdef NEED_H_ERRNO
h_errno_tmp = NETDB_INTERNAL;
# endif
result = NULL;
goto done;
}
# include "digits_dots.c" # include "digits_dots.c"
#endif #endif
} }

View File

@ -115,6 +115,14 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
#endif #endif
#ifdef HANDLE_DIGITS_DOTS #ifdef HANDLE_DIGITS_DOTS
/* We have to test for the use of IPv6 which can only be done by
examining `_res'. */
if ((_res.options & RES_INIT) == 0 && res_init () == -1)
{
*h_errnop = NETDB_INTERNAL;
*result = NULL;
return -1;
}
# define resbuf (*resbuf) # define resbuf (*resbuf)
# include "digits_dots.c" # include "digits_dots.c"
# undef resbuf # undef resbuf

View File

@ -445,7 +445,7 @@ getkeyserv_handle (int vers)
clnt_control (kcp->client, CLSET_RETRY_TIMEOUT, clnt_control (kcp->client, CLSET_RETRY_TIMEOUT,
(char *)&wait_time); (char *)&wait_time);
if (clnt_control (kcp->client, CLGET_FD, (char *)&fd)) if (clnt_control (kcp->client, CLGET_FD, (char *)&fd))
fcntl (fd, F_SETFD, 1); /* make it "close on exec" */ __fcntl (fd, F_SETFD, 1); /* make it "close on exec" */
return kcp->client; return kcp->client;
} }