aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog18
-rw-r--r--linuxthreads/manager.c8
-rw-r--r--linuxthreads/pthread.c22
-rw-r--r--linuxthreads/sysdeps/i386/i686/pt-machine.h3
-rw-r--r--linuxthreads/sysdeps/i386/pt-machine.h3
-rw-r--r--locale/weight.h10
-rw-r--r--localedata/Makefile14
-rw-r--r--localedata/hr_HR.in2
-rw-r--r--nss/getXXbyYY.c10
-rw-r--r--nss/getXXbyYY_r.c8
-rw-r--r--sunrpc/key_call.c2
11 files changed, 69 insertions, 31 deletions
diff --git a/ChangeLog b/ChangeLog
index 1796eacea4..0d919fa1fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
Reverse the change of 1998-04-22. Providing a struct dirent with
diff --git a/linuxthreads/manager.c b/linuxthreads/manager.c
index eafff3f4a8..5a5420d9a9 100644
--- a/linuxthreads/manager.c
+++ b/linuxthreads/manager.c
@@ -101,11 +101,9 @@ int __pthread_manager(void *arg)
/* Set the error variable. */
__pthread_manager_thread.p_errnop = &__pthread_manager_thread.p_errno;
__pthread_manager_thread.p_h_errnop = &__pthread_manager_thread.p_h_errno;
- /* Block all signals except __pthread_sig_restart, __pthread_sig_cancel
- and SIGTRAP */
+ /* Block all signals except __pthread_sig_cancel and SIGTRAP */
sigfillset(&mask);
- sigdelset(&mask, __pthread_sig_restart);
- sigdelset(&mask, __pthread_sig_cancel); /* for debugging new threads */
+ sigdelset(&mask, __pthread_sig_cancel); /* for thread termination */
sigdelset(&mask, SIGTRAP); /* for debugging purposes */
sigprocmask(SIG_SETMASK, &mask, NULL);
/* 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
CLONE_PTRACE |
#endif
- __pthread_sig_restart, new_thread);
+ __pthread_sig_cancel, new_thread);
/* Check if cloning succeeded */
if (pid == -1) {
/* Free the stack if we allocated it */
diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c
index 004c346e3a..8d892b7bb5 100644
--- a/linuxthreads/pthread.c
+++ b/linuxthreads/pthread.c
@@ -459,9 +459,7 @@ static void pthread_exit_process(int retcode, void *arg)
/* The handler for the RESTART signal just records the signal received
in the thread descriptor, and optionally performs a siglongjmp
- (for pthread_cond_timedwait).
- For the thread manager thread, redirect the signal to
- __pthread_manager_sighandler. */
+ (for pthread_cond_timedwait). */
#ifndef __i386__
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));
self = thread_self();
#endif
- if (self == &__pthread_manager_thread) {
- __pthread_manager_sighandler(sig);
- } else {
- THREAD_SETMEM(self, p_signal, sig);
- if (THREAD_GETMEM(self, p_signal_jmp) != NULL)
- siglongjmp(*THREAD_GETMEM(self, p_signal_jmp), 1);
- }
+ THREAD_SETMEM(self, p_signal, sig);
+ if (THREAD_GETMEM(self, p_signal_jmp) != NULL)
+ siglongjmp(*THREAD_GETMEM(self, p_signal_jmp), 1);
}
/* The handler for the CANCEL signal checks for cancellation
(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:
On reception of a REQ_DEBUG request (sent by new threads created to
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
if (self == &__pthread_manager_thread)
- return;
+ {
+ __pthread_manager_sighandler(sig);
+ return;
+ }
if (__pthread_exit_requested) {
/* Main thread should accumulate times for thread manager and its
children, so that timings for main thread account for all threads. */
diff --git a/linuxthreads/sysdeps/i386/i686/pt-machine.h b/linuxthreads/sysdeps/i386/i686/pt-machine.h
index 1b193a0c09..91dfb46881 100644
--- a/linuxthreads/sysdeps/i386/i686/pt-machine.h
+++ b/linuxthreads/sysdeps/i386/i686/pt-machine.h
@@ -57,7 +57,8 @@ __compare_and_swap (long int *p, long int oldval, long int newval)
__asm__ __volatile__ ("lock; cmpxchgl %3, %1; sete %0"
: "=q" (ret), "=m" (*p), "=a" (readval)
- : "r" (newval), "m" (*p), "a" (oldval));
+ : "r" (newval), "m" (*p), "a" (oldval)
+ : "memory");
return ret;
}
diff --git a/linuxthreads/sysdeps/i386/pt-machine.h b/linuxthreads/sysdeps/i386/pt-machine.h
index 88599467ad..97d75d4c04 100644
--- a/linuxthreads/sysdeps/i386/pt-machine.h
+++ b/linuxthreads/sysdeps/i386/pt-machine.h
@@ -60,7 +60,8 @@ __compare_and_swap (long int *p, long int oldval, long int newval)
__asm__ __volatile__ ("lock; cmpxchgl %3, %1; sete %0"
: "=q" (ret), "=m" (*p), "=a" (readval)
- : "r" (newval), "m" (*p), "a" (oldval));
+ : "r" (newval), "m" (*p), "a" (oldval)
+ : "memory");
return ret;
}
diff --git a/locale/weight.h b/locale/weight.h
index 96fb28e987..9a1911bd7a 100644
--- a/locale/weight.h
+++ b/locale/weight.h
@@ -115,7 +115,7 @@ get_weight (const STRING_TYPE **str, weight_t *result,
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;
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
an 8-bit string. */
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;
- /* 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. */
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
given locale (not the global one) cannot use the global tables. */
#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
# 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
#define get_string(str, forw, backw) \
diff --git a/localedata/Makefile b/localedata/Makefile
index 4108b7ed47..614e1355dc 100644
--- a/localedata/Makefile
+++ b/localedata/Makefile
@@ -35,7 +35,9 @@ repertoiremaps := $(filter-out $(addprefix repertoiremaps/, CVS RCS %~), \
$(wildcard repertoiremaps/*))
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, \
$(addsuffix $s, $(basename $(test-input))))
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-dirs := $(basename $(test-input)) en_US $(ld-test-names)
-distribute := CHECKSUMS tst-fmon.sh tst-fmon.data ChangeLog sort-test.sh \
- README fr_CA,2.13.in de_DE.in da_DK.in $(repertoiremaps) \
- $(charmaps) $(locales) $(ld-test-srcs) tst-rpmatch.sh \
- SUPPORTED tst-locale.sh
+distribute := CHECKSUMS README SUPPORTED ChangeLog \
+ $(charmaps) $(locales) $(repertoiremaps) \
+ tst-rpmatch.sh tst-locale.sh tst-fmon.sh sort-test.sh \
+ tst-fmon.data $(test-input-data) $(ld-test-srcs)
# Get $(inst_i18ndir) defined.
include ../Makeconfig
@@ -69,7 +71,7 @@ ifeq (no,$(cross-compiling))
.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
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)
do-tst-fmon: tst-fmon.sh $(objpfx)tst-fmon tst-fmon.data do-collate-test
$(SHELL) -e $< $(common-objpfx) tst-fmon.data
diff --git a/localedata/hr_HR.in b/localedata/hr_HR.in
new file mode 100644
index 0000000000..ddf0952c5f
--- /dev/null
+++ b/localedata/hr_HR.in
@@ -0,0 +1,2 @@
+Ï® ; <D<>;<Z<>
+D® ; <D-Z<>
diff --git a/nss/getXXbyYY.c b/nss/getXXbyYY.c
index 21baad9474..a79fd08fef 100644
--- a/nss/getXXbyYY.c
+++ b/nss/getXXbyYY.c
@@ -96,6 +96,16 @@ FUNCTION_NAME (ADD_PARAMS)
if (buffer != NULL)
{
#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"
#endif
}
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c
index 7e567a1325..3c7f2a14bb 100644
--- a/nss/getXXbyYY_r.c
+++ b/nss/getXXbyYY_r.c
@@ -115,6 +115,14 @@ INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer,
#endif
#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)
# include "digits_dots.c"
# undef resbuf
diff --git a/sunrpc/key_call.c b/sunrpc/key_call.c
index 0aa49cc78a..6157e574b9 100644
--- a/sunrpc/key_call.c
+++ b/sunrpc/key_call.c
@@ -445,7 +445,7 @@ getkeyserv_handle (int vers)
clnt_control (kcp->client, CLSET_RETRY_TIMEOUT,
(char *)&wait_time);
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;
}