diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-01-26 02:07:07 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-01-26 02:07:07 +0000 |
commit | 14a6b4e45f4297a39b704557491fcc16ff863ef7 (patch) | |
tree | 9b5549eb864f8c4a188da18c8178e7b4b007e72e | |
parent | f00ebd7f811ac03665c877846cad3750b0815122 (diff) | |
download | glibc-14a6b4e45f4297a39b704557491fcc16ff863ef7.tar glibc-14a6b4e45f4297a39b704557491fcc16ff863ef7.tar.gz glibc-14a6b4e45f4297a39b704557491fcc16ff863ef7.tar.bz2 glibc-14a6b4e45f4297a39b704557491fcc16ff863ef7.zip |
Update.
2000-01-23 Paul Eggert <eggert@twinsun.com>
* posix/regex.c (GET_UNSIGNED_NUMBER): Allow only ASCII digits.
2000-01-23 Paul Eggert <eggert@twinsun.com>
* posix/regex.c (compile_range): When matching a character
range, use the current collating sequence, as POSIX requires.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | FAQ.in | 54 | ||||
-rw-r--r-- | posix/regex.c | 54 |
3 files changed, 65 insertions, 52 deletions
@@ -1,3 +1,12 @@ +2000-01-23 Paul Eggert <eggert@twinsun.com> + + * posix/regex.c (GET_UNSIGNED_NUMBER): Allow only ASCII digits. + +2000-01-23 Paul Eggert <eggert@twinsun.com> + + * posix/regex.c (compile_range): When matching a character + range, use the current collating sequence, as POSIX requires. + 2000-01-25 Ulrich Drepper <drepper@cygnus.com> * string/argz-stringify.c: Handle case of missing \0 at the end of @@ -721,7 +721,7 @@ necessary conversion and calls to create those files. The file is `db-Makefile' in the subdirectory `nss' and you can call it with `make -f db-Makefile'. Please note that not all services are capable of using a database. Currently passwd, group, ethers, protocol, rpc, services shadow -and netgroup are implemented. +and netgroup are implemented. See also question ?nssdb. ?? I have /usr/include/net and /usr/include/scsi as symlinks into my Linux source tree. Is that wrong? @@ -955,6 +955,30 @@ installed by glibc 2.1 in your include directory. {AJ} See ?libs. +??nssdb What happened to the Berkeley DB libraries? Can I still use db + in /etc/nsswitch.conf? + +{AJ} Due to too many incompatible changes in disk layout and API of Berkeley +DB and a too tight coupling of libc and libdb, the db library has been +removed completely from glibc 2.2. The only place that really used the +Berkeley DB was the NSS db module. + +The NSS db module has been rewritten to support a number of different +versions of Berkeley DB for the NSS db module. Currently the releases 2.x +and 3.x of Berkeley DB are supported. The older db 1.85 library is not +supported. You can use the version from glibc 2.1.x or download a version +from Sleepycat Software (http://www.sleepycat.com). The library has to be +compiled as shared library and installed in the system lib directory +(normally /lib). The library needs to have a special soname to be found by +the NSS module. + +If public structures change in a new Berkeley db release, this needs to be +reflected in glibc. + +Currently the code searches for libraries with a soname of "libdb.so.3" +(that's the name from db 2.4.14 which comes with glibc 2.1.x) and +"libdb-3.0.so" (the name used by db 3.0.55 as default). + ? Source and binary incompatibilities, and what to do about them @@ -1245,15 +1269,6 @@ e.g. __ivaliduser). If a program uses these interfaces, it's broken. These internal interfaces might change between glibc releases or dropped completely. -?? When using the db-2 library which comes with glibc is used in - the Perl db modules the testsuite is not passed. This did not - happen with db-1, gdbm, or ndbm. - -{MK} Db-2 does not support zero-sized keys. The Perl testsuite -tests the support for zero-sized keys and therefore fails when db-2 is -used. The Perl folks are looking for a solution, but thus far have -not found a satisfactory one. - ?? The pow() inline function I get when including <math.h> is broken. I get segmentation faults when I run the program. @@ -1341,21 +1356,6 @@ suffix `_unlocked', for details check <stdio.h>. Using `putc_unlocked' etc. instead of `putc' should give nearly the same speed with bonnie (bonnie is a benchmark program for measuring disk access). -?? Programs compiled with glibc 2.1 can't read db files made with glibc - 2.0. What has changed that programs like rpm break? - -{AJ} The GNU C library 2.1 uses db2 instead of db1 which was used in version -2.0. The internal formats of the actual db files are different. To convert -the db files from db1 format to db2 format, you can use the programs -`db_dump185' and `db_load'. Alternativly programs can be linked with db1 -using `-ldb1' instead of linking with db2 which uses `-ldb'. Linking with -db1 might be preferable if older programs need to access the db file. - -db2 supports the old db1 programming interface and also a new programming -interface. For compilation with the old API, <db_185.h> has to be included -(and not <db.h>) and you can link with either `-ldb1' or `-ldb' for either -of the db formats. - ?? Autoconf's AC_CHECK_FUNC macro reports that a function exists, but when I try to use it, it always returns -1 and sets errno to ENOSYS. @@ -1443,7 +1443,7 @@ reading the POSIX standards. <http://www.gnu.org/software/libc/>. The problem data base of open and solved bugs in GNU libc is available at <http://www-gnats.gnu.org:8080/cgi-bin/wwwgnats.pl>. Eric Green has written -a HowTo for converting from Linux libc5 to glibc2. The HowTo is accessable +a HowTo for converting from Linux libc5 to glibc2. The HowTo is accessible via the FSF page and at <http://www.imaxx.net/~thrytis/glibc>. Frodo Looijaard describes a different way installing glibc2 as secondary libc at <http://huizen.dds.nl/~frodol/glibc>. @@ -1516,7 +1516,7 @@ Answers were given by: {UD} Ulrich Drepper, <drepper@cygnus.com> {DMT} David Mosberger-Tang, <davidm@AZStarNet.com> {RM} Roland McGrath, <roland@gnu.org> -{AJ} Andreas Jaeger, <aj@arthur.rhein-neckar.de> +{AJ} Andreas Jaeger, <aj@suse.de> {EY} Eric Youngdale, <eric@andante.jic.com> {PB} Phil Blundell, <Philip.Blundell@pobox.com> {MK} Mark Kettenis, <kettenis@phys.uva.nl> diff --git a/posix/regex.c b/posix/regex.c index 6dd3d2a96f..2a5737dde9 100644 --- a/posix/regex.c +++ b/posix/regex.c @@ -1769,7 +1769,7 @@ typedef struct { if (p != pend) \ { \ PATFETCH (c); \ - while (ISDIGIT (c)) \ + while ('0' <= c && c <= '9') \ { \ if (num < 0) \ num = 0; \ @@ -3423,49 +3423,53 @@ group_in_compile_stack (compile_stack, regnum) `regex_compile' itself. */ static reg_errcode_t -compile_range (range_start, p_ptr, pend, translate, syntax, b) - unsigned int range_start; - const char **p_ptr, *pend; - RE_TRANSLATE_TYPE translate; - reg_syntax_t syntax; - unsigned char *b; +compile_range (range_start_char, p_ptr, pend, translate, syntax, b) + unsigned int range_start_char; + const char **p_ptr, *pend; + RE_TRANSLATE_TYPE translate; + reg_syntax_t syntax; + unsigned char *b; { unsigned this_char; const char *p = *p_ptr; - unsigned int range_end; + reg_errcode_t ret; + char range_start[2]; + char range_end[2]; + char ch[2]; if (p == pend) return REG_ERANGE; - /* Even though the pattern is a signed `char *', we need to fetch - with unsigned char *'s; if the high bit of the pattern character - is set, the range endpoints will be negative if we fetch using a - signed char *. - - We also want to fetch the endpoints without translating them; the + /* Fetch the endpoints without translating them; the appropriate translation is done in the bit-setting loop below. */ - /* The SVR4 compiler on the 3B2 had trouble with unsigned const char *. */ - range_end = ((const unsigned char *) p)[0]; + range_start[0] = range_start_char; + range_start[1] = '\0'; + range_end[0] = p[0]; + range_end[1] = '\0'; /* Have to increment the pointer into the pattern string, so the caller isn't still at the ending character. */ (*p_ptr)++; - /* If the start is after the end, the range is empty. */ - if (range_start > range_end) - return syntax & RE_NO_EMPTY_RANGES ? REG_ERANGE : REG_NOERROR; + /* Report an error if the range is empty and the syntax prohibits this. */ + ret = syntax & RE_NO_EMPTY_RANGES ? REG_ERANGE : REG_NOERROR; /* Here we see why `this_char' has to be larger than an `unsigned - char' -- the range is inclusive, so if `range_end' == 0xff - (assuming 8-bit characters), we would otherwise go into an infinite - loop, since all characters <= 0xff. */ - for (this_char = range_start; this_char <= range_end; this_char++) + char' -- we would otherwise go into an infinite loop, since all + characters <= 0xff. */ + ch[1] = '\0'; + for (this_char = 0; this_char <= (unsigned char) -1; ++this_char) { - SET_LIST_BIT (TRANSLATE (this_char)); + ch[0] = this_char; + if (strcoll (range_start, ch) <= 0 && strcoll (ch, range_end) <= 0) + { + SET_LIST_BIT (TRANSLATE (this_char)); + ret = REG_NOERROR; + } } - return REG_NOERROR; + return ret; } /* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in |