diff options
-rw-r--r-- | ChangeLog | 23 | ||||
-rw-r--r-- | localedata/ChangeLog | 5 | ||||
-rw-r--r-- | localedata/tests/test7.cm | 106 | ||||
-rwxr-xr-x | localedata/tst-locale.sh | 2 | ||||
-rw-r--r-- | math/test-fpucw.c | 9 | ||||
-rw-r--r-- | resolv/README | 74 | ||||
-rw-r--r-- | resolv/resolv.h | 14 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/arm/sysdep.h | 9 |
8 files changed, 166 insertions, 76 deletions
@@ -1,3 +1,23 @@ +2000-07-28 Philip Blundell <philb@gnu.org> + + * math/test-fpucw.c: Ignore reserved bits in control word. + +2000-07-28 Philip Blundell <philb@gnu.org> + + * sysdeps/unix/sysv/linux/arm/sysdep.h (PSEUDO_RET): New macro. + (ret): Redefine to PSEUDO_RET. + (PSEUDO): Remove jump to syscall_error. + +2000-07-29 Mark Kettenis <kettenis@gnu.org> + + * resolv/README: Add some information about using the resolver in + multi-threaded code and with C++. Spelling fixes. + +2000-07-29 Mark Kettenis <kettenis@gnu.org> + + * resolv/resolv.h (struct __sockaddr_in): Remove. + (struct __res_state) [!_LIBC]: Remove reference to __sockaddr_in. + 2000-07-29 Greg McGary <greg@mcgary.org> * Rules (test-bp-inputs, make-test-out): New variables. @@ -28,7 +48,8 @@ pointers as __unbounded. Wrap bounds around variable `current'. * sysdeps/i386/backtrace.c (struct layout): Make pointers __unbounded. (ADVANCE_STACK_FRAME): Wrap bounds around return value. - * sysdeps/powerpc/backtrace.c (struct layout): Make pointers __unbounded. + * sysdeps/powerpc/backtrace.c (struct layout): Make pointers + __unbounded. (__backtrace): Qualify frame-pointer chain and return address pointers as __unbounded. Wrap bounds around variable `current'. diff --git a/localedata/ChangeLog b/localedata/ChangeLog index da0faca..caf60a8 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,5 +1,10 @@ 2000-07-29 Ulrich Drepper <drepper@redhat.com> + * tst-digits.c: Add tests for wprintf. + * tests/test7.cm: Change so that it is usable for wprintf tests. + + * tst-locale.sh: Fix typo in last change. + * tst-digits.c: Add ctype and wctype tests. 2000-07-28 Ulrich Drepper <drepper@redhat.com> diff --git a/localedata/tests/test7.cm b/localedata/tests/test7.cm index 207197e..86b058d 100644 --- a/localedata/tests/test7.cm +++ b/localedata/tests/test7.cm @@ -1,4 +1,4 @@ -<code_set_name> test7 +<code_set_name> UTF-8 <mb_cur_min> 1 <mb_cur_max> 3 @@ -21,58 +21,58 @@ CHARMAP <U0037> \x37 <U0038> \x38 <U0039> \x39 -<U0061> \x41 -<U0062> \x42 -<U0063> \x43 -<U0064> \x44 -<U0065> \x45 -<U0066> \x46 -<U0067> \x47 -<U0068> \x48 -<U0069> \x49 -<U006A> \x4A -<U006B> \x4B -<U006C> \x4C -<U006D> \x4D -<U006E> \x4E -<U006F> \x4F -<U0070> \x50 -<U0071> \x51 -<U0072> \x52 -<U0073> \x53 -<U0074> \x54 -<U0075> \x55 -<U0076> \x56 -<U0077> \x57 -<U0078> \x58 -<U0079> \x59 -<U007A> \x5A -<U0041> \x61 -<U0042> \x62 -<U0043> \x63 -<U0044> \x64 -<U0045> \x65 -<U0046> \x66 -<U0047> \x67 -<U0048> \x68 -<U0049> \x69 -<U004A> \x6a -<U004B> \x6b -<U004C> \x6c -<U004D> \x6d -<U004E> \x6e -<U004F> \x6f -<U0050> \x70 -<U0051> \x71 -<U0052> \x72 -<U0053> \x73 -<U0054> \x74 -<U0055> \x75 -<U0056> \x76 -<U0057> \x77 -<U0058> \x78 -<U0059> \x79 -<U005A> \x7a +<U0041> \x41 +<U0042> \x42 +<U0043> \x43 +<U0044> \x44 +<U0045> \x45 +<U0046> \x46 +<U0047> \x47 +<U0048> \x48 +<U0049> \x49 +<U004A> \x4a +<U004B> \x4b +<U004C> \x4c +<U004D> \x4d +<U004E> \x4e +<U004F> \x4f +<U0050> \x50 +<U0051> \x51 +<U0052> \x52 +<U0053> \x53 +<U0054> \x54 +<U0055> \x55 +<U0056> \x56 +<U0057> \x57 +<U0058> \x58 +<U0059> \x59 +<U005A> \x5a +<U0061> \x61 +<U0062> \x62 +<U0063> \x63 +<U0064> \x64 +<U0065> \x65 +<U0066> \x66 +<U0067> \x67 +<U0068> \x68 +<U0069> \x69 +<U006A> \x6A +<U006B> \x6B +<U006C> \x6C +<U006D> \x6D +<U006E> \x6E +<U006F> \x6F +<U0070> \x70 +<U0071> \x71 +<U0072> \x72 +<U0073> \x73 +<U0074> \x74 +<U0075> \x75 +<U0076> \x76 +<U0077> \x77 +<U0078> \x78 +<U0079> \x79 +<U007A> \x7A <U2080> \xe2\x82\x80 <U2081> \xe2\x82\x81 <U2082> \xe2\x82\x82 diff --git a/localedata/tst-locale.sh b/localedata/tst-locale.sh index 5aa43e0..b25f9a6 100755 --- a/localedata/tst-locale.sh +++ b/localedata/tst-locale.sh @@ -52,7 +52,7 @@ test_locale tests/test3.cm tests/test3.def test3 test_locale tests/test4.cm tests/test4.def test4 test_locale tests/test5.cm tests/test5.def test5 tests/test5.ds test_locale tests/test6.cm tests/test6.def test6 tests/test6.ds -test_locale tests/test7.cm tests/test4.def test7 +test_locale tests/test7.cm tests/test7.def test7 exit 0 diff --git a/math/test-fpucw.c b/math/test-fpucw.c index a702d17..0294a42 100644 --- a/math/test-fpucw.c +++ b/math/test-fpucw.c @@ -29,10 +29,13 @@ main (void) _FPU_GETCW (cw); - if (cw != _FPU_DEFAULT) - printf ("control word is 0x%x but should be 0x%x.\n", cw, _FPU_DEFAULT); + cw &= ~_FPU_RESERVED; - return (cw != _FPU_DEFAULT); + if (cw != (_FPU_DEFAULT & ~_FPU_RESERVED)) + printf ("control word is 0x%x but should be 0x%x.\n", + cw, (_FPU_DEFAULT & ~_FPU_RESERVED)); + + return cw != (_FPU_DEFAULT & ~_FPU_RESERVED); #else return 0; diff --git a/resolv/README b/resolv/README index e862fff..416205d 100644 --- a/resolv/README +++ b/resolv/README @@ -1,3 +1,6 @@ +The resolver in the GNU C Library +********************************* + Starting with version 2.2, the resolver in the GNU C Library comes from BIND 8. Only a subset of the src/lib/resolv part of libbind is included here; basically the parts that are needed to provide the @@ -30,11 +33,78 @@ The resolver in the GNU C Library still differs from what's in BIND * The `res_close' function in glibc only tries to close open files referenced through `_res' if the RES_INIT bit is set in `_res.options'. This fixes a potential security bug with programs - that bogusly call `res_close' without initializing the resolver + that bogusly call `res_close' without initialising the resolver state first. Note that the thread-safe `res_nclose' still doesn't check the RES_INIT bit. By the way, you're not really supposed to call `res_close/res_nclose' directly. +* The resolver in glibc can connect to a nameserver over IPv6. Just + specify the IPv6 address in /etc/resolv.conf. You cannot change the + address of an IPv6 nameserver dynamically in your program though. + + +Using the resolver in multi-threaded code +========================================= + +The traditional resolver interfaces `res_query', `res_search', +`res_mkquery', `res_send' and `res_init', used a static (global) +resolver state stored in the `_res' structure. Therefore, these +interfaces are not thread-safe. Therefore, BIND 8.2 introduced a set +of "new" interfaces `res_nquery', `res_nsearch', `res_nmkquery', +`res_nsend' and `res_ninit' that take a `res_state' as their first +argument, so you can use a per-thread resolver state. In glibc, when +you link with -lpthread, such a per-thread resolver state is already +present. It can be accessed using `_res', which has been redefined as +a macro, in a similar way to what has been done for the `errno' and +`h_errno' variables. This per-thread resolver state is also used for +the `gethostby*' family of functions, which means that for example +`gethostbyname_r' is now fully thread-safe and re-entrant. The +traditional resolver interfaces however, continue to use a single +resolver state and are therefore still thread-unsafe. The resolver +state is the same resolver state that is used for the initial ("main") +thread. + +This has the following consequences for existing binaries and source +code: + +* Single-threaded programs will continue to work. There should be no + user-visible changes when you recompile them. + +* Multi-threaded programs that use the traditional resolver interfaces + in the "main" thread should continue to work, except that they no + longer see any changes in the global resolver state caused by calls + to, for example, `gethostbyname' in other threads. Again there + should be no user-visible changes when you recompile these programs. + +* Multi-threaded programs that use the traditional resolver interfaces + in more than one thread should be just as buggy as before (there are + no problems if you use proper locking of course). If you recompile + these programs, manipulating the _res structure in threads other + than the "main" thread will seem to have no effect though. + +* In Multi-threaded that manipulate the _res structure, calls to + functions like `gethostbyname' in threads other than the "main" + thread won't be influenced by the those changes anymore. So if you + set RES_USE_INET6, a call to `gethostbyname' won't return any IPv6 + hosts anymore. If you recompile such programs, manipulating the + _res structure will affect the thread in which you do so instead of + the "main" thread. + +We recommend to use the new thread-safe interfaces in new code, since +the traditional interfaces have been deprecated by the BIND folks. +For compatibility with other (older) systems you might want to +continue to use those interfaces though. + + +Using the resolver in C++ code +============================== + +There resolver contains some hooks which will allow the user to +install some callback functions that make it possible to filter DNS +requests and responses. Although we do not encourage you to make use +of this facility at all, C++ developers should realise that it isn't +safe to throw exceptions from such callback functions. + Source code =========== @@ -78,7 +148,7 @@ src/lib/inet/ src/lib/isc/ base64.c -Some of these files have been optimized a bit, and adaptations have +Some of these files have been optimised a bit, and adaptations have been made to make them fit in with the rest of glibc. The more non-obvious changes are wrapped in something like `#ifdef _LIBC'. diff --git a/resolv/resolv.h b/resolv/resolv.h index 4f505a2..74a55ef 100644 --- a/resolv/resolv.h +++ b/resolv/resolv.h @@ -123,16 +123,6 @@ struct res_sym { #define RES_DFLRETRY 2 /* Default #/tries. */ #define RES_MAXTIME 65535 /* Infinity, in milliseconds. */ -/* - * Like "struct sockaddr_in", but without any padding (to avoid making - * "struct __rest_state" too large). - */ -struct __sockaddr_in { - __SOCKADDR_COMMON (sin_); - in_port_t sin_port; - struct in_addr sin_addr; -}; - struct __res_state { int retrans; /* retransmition time interval */ int retry; /* number of times to retransmit */ @@ -163,12 +153,8 @@ struct __res_state { u_int16_t nscount; u_int16_t nstimes[MAXNS]; /* ms. */ int nssocks[MAXNS]; -#ifdef _LIBC u_int16_t nscount6; struct sockaddr_in6 *nsaddrs[MAXNS]; -#else - struct __sockaddr_in nsaddrs[MAXNS]; -#endif } _ext; } _u; }; diff --git a/sysdeps/unix/sysv/linux/arm/sysdep.h b/sysdeps/unix/sysv/linux/arm/sysdep.h index c337af2..1413a48 100644 --- a/sysdeps/unix/sysv/linux/arm/sysdep.h +++ b/sysdeps/unix/sysv/linux/arm/sysdep.h @@ -52,8 +52,13 @@ .type syscall_error,%function; \ ENTRY (name); \ DO_CALL (args, syscall_name); \ - cmn r0, $4096; \ - bhs PLTJMP(C_SYMBOL_NAME(__syscall_error)); + cmn r0, $4096; + +#define PSEUDO_RET \ + RETINSTR(movcc, pc, lr); \ + b PLTJMP(__syscall_error) +#undef ret +#define ret PSEUDO_RET #undef PSEUDO_END #define PSEUDO_END(name) \ |