diff --git a/ChangeLog b/ChangeLog index ed27d72673..e681e4b941 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2000-07-28 Philip Blundell + + * math/test-fpucw.c: Ignore reserved bits in control word. + +2000-07-28 Philip Blundell + + * 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 + + * resolv/README: Add some information about using the resolver in + multi-threaded code and with C++. Spelling fixes. + +2000-07-29 Mark Kettenis + + * resolv/resolv.h (struct __sockaddr_in): Remove. + (struct __res_state) [!_LIBC]: Remove reference to __sockaddr_in. + 2000-07-29 Greg McGary * 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 da0faca163..caf60a87e1 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,5 +1,10 @@ 2000-07-29 Ulrich Drepper + * 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 diff --git a/localedata/tests/test7.cm b/localedata/tests/test7.cm index 207197e020..86b058dc58 100644 --- a/localedata/tests/test7.cm +++ b/localedata/tests/test7.cm @@ -1,4 +1,4 @@ - test7 + UTF-8 1 3 @@ -21,58 +21,58 @@ CHARMAP \x37 \x38 \x39 - \x41 - \x42 - \x43 - \x44 - \x45 - \x46 - \x47 - \x48 - \x49 - \x4A - \x4B - \x4C - \x4D - \x4E - \x4F - \x50 - \x51 - \x52 - \x53 - \x54 - \x55 - \x56 - \x57 - \x58 - \x59 - \x5A - \x61 - \x62 - \x63 - \x64 - \x65 - \x66 - \x67 - \x68 - \x69 - \x6a - \x6b - \x6c - \x6d - \x6e - \x6f - \x70 - \x71 - \x72 - \x73 - \x74 - \x75 - \x76 - \x77 - \x78 - \x79 - \x7a + \x41 + \x42 + \x43 + \x44 + \x45 + \x46 + \x47 + \x48 + \x49 + \x4a + \x4b + \x4c + \x4d + \x4e + \x4f + \x50 + \x51 + \x52 + \x53 + \x54 + \x55 + \x56 + \x57 + \x58 + \x59 + \x5a + \x61 + \x62 + \x63 + \x64 + \x65 + \x66 + \x67 + \x68 + \x69 + \x6A + \x6B + \x6C + \x6D + \x6E + \x6F + \x70 + \x71 + \x72 + \x73 + \x74 + \x75 + \x76 + \x77 + \x78 + \x79 + \x7A \xe2\x82\x80 \xe2\x82\x81 \xe2\x82\x82 diff --git a/localedata/tst-locale.sh b/localedata/tst-locale.sh index 5aa43e069f..b25f9a61f4 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 a702d17330..0294a42bb5 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 e862fffe57..416205da77 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 4f505a2199..74a55ef0fb 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 c337af2b14..1413a48736 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) \