summaryrefslogtreecommitdiff
path: root/test/regex
diff options
context:
space:
mode:
Diffstat (limited to 'test/regex')
-rw-r--r--test/regex/LICENSE72
-rw-r--r--test/regex/Makefile8
-rw-r--r--test/regex/Makefile.in6
-rw-r--r--test/regex/basic.dat216
-rw-r--r--test/regex/categorize.dat62
-rw-r--r--test/regex/forcedassoc.dat30
-rw-r--r--test/regex/interpretation.dat93
-rw-r--r--test/regex/leftassoc.dat16
-rw-r--r--test/regex/nullsubexpr.dat73
-rw-r--r--test/regex/repetition.dat79
-rw-r--r--test/regex/rightassoc.dat16
-rw-r--r--test/regex/testregex.c2145
-rw-r--r--test/regex/tst-regex2.c250
-rw-r--r--test/regex/tst-regex2.dat2176
-rw-r--r--test/regex/tst-regexloc.c53
15 files changed, 0 insertions, 5295 deletions
diff --git a/test/regex/LICENSE b/test/regex/LICENSE
deleted file mode 100644
index 2e5acb9cd..000000000
--- a/test/regex/LICENSE
+++ /dev/null
@@ -1,72 +0,0 @@
-From gsf@research.att.com Wed Mar 1 20:30:54 2006
-Return-Path: <gsf@research.att.com>
-X-Original-To: mps@bridge.intra
-Delivered-To: mps@bridge.intra
-Received: from localhost (localhost [127.0.0.1])
- by localhost (Postfix) with ESMTP id B8C814E4F
- for <mps@bridge.intra>; Wed, 1 Mar 2006 20:30:53 +0100 (CET)
-Received: from mail.bridge.intra ([127.0.0.1])
- by localhost (lnx.bridge.intra [127.0.0.1]) (amavisd-new, port 10024)
- with LMTP id 05987-03 for <mps@bridge.intra>;
- Wed, 1 Mar 2006 20:30:42 +0100 (CET)
-Received: from pop.gmx.net (localhost [127.0.0.1])
- by mail.bridge.intra (Postfix) with ESMTP id C8C73794D
- for <mps@bridge.intra>; Wed, 1 Mar 2006 20:30:38 +0100 (CET)
-X-Flags: 0000
-Delivered-To: GMX delivery to ps.m@gmx.net
-Received: (qmail invoked by alias); 01 Mar 2006 19:23:46 -0000
-Received: from mail-red.research.att.com (EHLO mail-white.research.att.com) [192.20.225.110]
- by mx0.gmx.net (mx085) with SMTP; 01 Mar 2006 20:23:46 +0100
-Received: from raptor.research.att.com (raptor.research.att.com [135.207.23.32])
- by mail-blue.research.att.com (Postfix) with ESMTP id B7929147CBB
- for <ps.m@gmx.net>; Wed, 1 Mar 2006 14:23:45 -0500 (EST)
-Received: (from gsf@localhost)
- by raptor.research.att.com (SGI-8.9.3p2/8.8.7) id OAA86112
- for ps.m@gmx.net; Wed, 1 Mar 2006 14:23:45 -0500 (EST)
-Date: Wed, 1 Mar 2006 14:23:45 -0500 (EST)
-From: Glenn Fowler <gsf@research.att.com>
-Message-Id: <200603011923.OAA86112@raptor.research.att.com>
-Organization: AT&T Research
-X-Mailer: mailx (AT&T/BSD) 9.9 2005-04-21
-Mime-Version: 1.0
-Content-Type: text/plain; charset=us-ascii
-Content-Transfer-Encoding: 7bit
-References: <Pine.LNX.4.44.0603012011250.6386-100000@lnx.bridge.intra>
-To: mps@bridge.intra
-Subject: Re: testregex licensing question
-X-GMX-Antivirus: -1 (not scanned, may not use virus scanner)
-X-GMX-Antispam: 0 (Mail was not recognized as spam)
-X-GMX-UID: lJF3ZO9DeSEkJ2TcbHQhaXN1IGRvb0Ca
-X-Virus-Scanned: by amavisd-new at localhost
-Status: RO
-X-Status:
-X-Keywords:
-X-UID: 44736
-
-
-you may include it directly
-retain the testregex.c header comment
-it uses a very free license to maximize distribution
-you can copy that .c comment to any test data files you use
-using # comment style to be complete
-
-let me know how it works with your libc
-also pass on any new tests you cook up
-
-On Wed, 1 Mar 2006 20:15:02 +0100 (CET) Peter S. Mazinger wrote:
-> Hello Glenn!
-
-> I would want to add testregex.c and the related *.dat files to the uClibc
-> testsuite. uClibc is licensed under LGPL v2.1. I haven't found any
-> licensing related info on testregex.
-
-> Is it allowed to use the code there, or should I accomodate the testsuite
-> to download the needed files from the original site each time it is ran?
-
-> Thanks, Peter
-
-> --
-> Peter S. Mazinger <ps dot m at gmx dot net> ID: 0xA5F059F2
-> Key fingerprint = 92A4 31E1 56BC 3D5A 2D08 BB6E C389 975E A5F0 59F2
-
-
diff --git a/test/regex/Makefile b/test/regex/Makefile
deleted file mode 100644
index eea0c491b..000000000
--- a/test/regex/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-# uClibc regex tests
-# Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
-
-top_builddir=../../
-top_srcdir=../../
-include ../Rules.mak
--include Makefile.in
-include ../Test.mak
diff --git a/test/regex/Makefile.in b/test/regex/Makefile.in
deleted file mode 100644
index 59d0c0697..000000000
--- a/test/regex/Makefile.in
+++ /dev/null
@@ -1,6 +0,0 @@
-# slowsdown embedded test runs extremely and always some
-# some tests are failing
-# for lm32 triggers gcc ICE with gcc 5.3.0
-# ifeq ($(TARGET_lm32),y)
-TESTS_DISABLED := testregex
-# endif
diff --git a/test/regex/basic.dat b/test/regex/basic.dat
deleted file mode 100644
index 5c50f37b4..000000000
--- a/test/regex/basic.dat
+++ /dev/null
@@ -1,216 +0,0 @@
-NOTE all standard compliant implementations should pass these : 2002-05-31
-
-BE abracadabra$ abracadabracadabra (7,18)
-BE a...b abababbb (2,7)
-BE XXXXXX ..XXXXXX (2,8)
-E \) () (1,2)
-BE a] a]a (0,2)
-B } } (0,1)
-E \} } (0,1)
-BE \] ] (0,1)
-B ] ] (0,1)
-E ] ] (0,1)
-B { { (0,1)
-B } } (0,1)
-BE ^a ax (0,1)
-BE \^a a^a (1,3)
-BE a\^ a^ (0,2)
-BE a$ aa (1,2)
-BE a\$ a$ (0,2)
-BE ^$ NULL (0,0)
-E $^ NULL (0,0)
-E a($) aa (1,2)(2,2)
-E a*(^a) aa (0,1)(0,1)
-E (..)*(...)* a (0,0)
-E (..)*(...)* abcd (0,4)(2,4)
-E (ab|a)(bc|c) abc (0,3)(0,2)(2,3)
-E (ab)c|abc abc (0,3)(0,2)
-E a{0}b ab (1,2)
-E (a*)(b?)(b+)b{3} aaabbbbbbb (0,10)(0,3)(3,4)(4,7)
-E (a*)(b{0,1})(b{1,})b{3} aaabbbbbbb (0,10)(0,3)(3,4)(4,7)
-E a{9876543210} NULL BADBR
-E ((a|a)|a) a (0,1)(0,1)(0,1)
-E (a*)(a|aa) aaaa (0,4)(0,3)(3,4)
-E a*(a.|aa) aaaa (0,4)(2,4)
-E a(b)|c(d)|a(e)f aef (0,3)(?,?)(?,?)(1,2)
-E (a|b)?.* b (0,1)(0,1)
-E (a|b)c|a(b|c) ac (0,2)(0,1)
-E (a|b)c|a(b|c) ab (0,2)(?,?)(1,2)
-E (a|b)*c|(a|ab)*c abc (0,3)(1,2)
-E (a|b)*c|(a|ab)*c xc (1,2)
-E (.a|.b).*|.*(.a|.b) xa (0,2)(0,2)
-E a?(ab|ba)ab abab (0,4)(0,2)
-E a?(ac{0}b|ba)ab abab (0,4)(0,2)
-E ab|abab abbabab (0,2)
-E aba|bab|bba baaabbbaba (5,8)
-E aba|bab baaabbbaba (6,9)
-E (aa|aaa)*|(a|aaaaa) aa (0,2)(0,2)
-E (a.|.a.)*|(a|.a...) aa (0,2)(0,2)
-E ab|a xabc (1,3)
-E ab|a xxabc (2,4)
-Ei (Ab|cD)* aBcD (0,4)(2,4)
-BE [^-] --a (2,3)
-BE [a-]* --a (0,3)
-BE [a-m-]* --amoma-- (0,4)
-E :::1:::0:|:::1:1:0: :::0:::1:::1:::0: (8,17)
-E :::1:::0:|:::1:1:1: :::0:::1:::1:::0: (8,17)
-{E [[:upper:]] A (0,1) [[<element>]] not supported
-E [[:lower:]]+ `az{ (1,3)
-E [[:upper:]]+ @AZ[ (1,3)
-BE [[-]] [[-]] (2,4)
-BE [[.NIL.]] NULL ECOLLATE
-BE [[=aleph=]] NULL ECOLLATE
-}
-BE$ \n \n (0,1)
-BEn$ \n \n (0,1)
-BE$ [^a] \n (0,1)
-BE$ \na \na (0,2)
-E (a)(b)(c) abc (0,3)(0,1)(1,2)(2,3)
-BE xxx xxx (0,3)
-E1 (^|[ (,;])((([Ff]eb[^ ]* *|0*2/|\* */?)0*[6-7]))([^0-9]|$) feb 6, (0,6)
-E1 (^|[ (,;])((([Ff]eb[^ ]* *|0*2/|\* */?)0*[6-7]))([^0-9]|$) 2/7 (0,3)
-E1 (^|[ (,;])((([Ff]eb[^ ]* *|0*2/|\* */?)0*[6-7]))([^0-9]|$) feb 1,Feb 6 (5,11)
-E3 ((((((((((((((((((((((((((((((x)))))))))))))))))))))))))))))) x (0,1)(0,1)(0,1)
-E3 ((((((((((((((((((((((((((((((x))))))))))))))))))))))))))))))* xx (0,2)(1,2)(1,2)
-E a?(ab|ba)* ababababababababababababababababababababababababababababababababababababababababa (0,81)(79,81)
-E abaa|abbaa|abbbaa|abbbbaa ababbabbbabbbabbbbabbbbaa (18,25)
-E abaa|abbaa|abbbaa|abbbbaa ababbabbbabbbabbbbabaa (18,22)
-E aaac|aabc|abac|abbc|baac|babc|bbac|bbbc baaabbbabac (7,11)
-BE$ .* \x01\xff (0,2)
-E aaaa|bbbb|cccc|ddddd|eeeeee|fffffff|gggg|hhhh|iiiii|jjjjj|kkkkk|llll XaaaXbbbXcccXdddXeeeXfffXgggXhhhXiiiXjjjXkkkXlllXcbaXaaaa (53,57)
-L aaaa\nbbbb\ncccc\nddddd\neeeeee\nfffffff\ngggg\nhhhh\niiiii\njjjjj\nkkkkk\nllll XaaaXbbbXcccXdddXeeeXfffXgggXhhhXiiiXjjjXkkkXlllXcbaXaaaa NOMATCH
-E a*a*a*a*a*b aaaaaaaaab (0,10)
-BE ^ NULL (0,0)
-BE $ NULL (0,0)
-BE ^$ NULL (0,0)
-BE ^a$ a (0,1)
-BE abc abc (0,3)
-BE abc xabcy (1,4)
-BE abc ababc (2,5)
-BE ab*c abc (0,3)
-BE ab*bc abc (0,3)
-BE ab*bc abbc (0,4)
-BE ab*bc abbbbc (0,6)
-E ab+bc abbc (0,4)
-E ab+bc abbbbc (0,6)
-E ab?bc abbc (0,4)
-E ab?bc abc (0,3)
-E ab?c abc (0,3)
-BE ^abc$ abc (0,3)
-BE ^abc abcc (0,3)
-BE abc$ aabc (1,4)
-BE ^ abc (0,0)
-BE $ abc (3,3)
-BE a.c abc (0,3)
-BE a.c axc (0,3)
-BE a.*c axyzc (0,5)
-BE a[bc]d abd (0,3)
-BE a[b-d]e ace (0,3)
-BE a[b-d] aac (1,3)
-BE a[-b] a- (0,2)
-BE a[b-] a- (0,2)
-BE a] a] (0,2)
-BE a[]]b a]b (0,3)
-BE a[^bc]d aed (0,3)
-BE a[^-b]c adc (0,3)
-BE a[^]b]c adc (0,3)
-E ab|cd abc (0,2)
-E ab|cd abcd (0,2)
-E a\(b a(b (0,3)
-E a\(*b ab (0,2)
-E a\(*b a((b (0,4)
-E ((a)) abc (0,1)(0,1)(0,1)
-E (a)b(c) abc (0,3)(0,1)(2,3)
-E a+b+c aabbabc (4,7)
-E a* aaa (0,3)
-E (a*)* - (0,0)(0,0)
-E (a*)+ - (0,0)(0,0)
-E (a*|b)* - (0,0)(0,0)
-E (a+|b)* ab (0,2)(1,2)
-E (a+|b)+ ab (0,2)(1,2)
-E (a+|b)? ab (0,1)(0,1)
-BE [^ab]* cde (0,3)
-E (^)* - (0,0)(0,0)
-BE a* NULL (0,0)
-E ([abc])*d abbbcd (0,6)(4,5)
-E ([abc])*bcd abcd (0,4)(0,1)
-E a|b|c|d|e e (0,1)
-E (a|b|c|d|e)f ef (0,2)(0,1)
-E ((a*|b))* - (0,0)(0,0)(0,0)
-BE abcd*efg abcdefg (0,7)
-BE ab* xabyabbbz (1,3)
-BE ab* xayabbbz (1,2)
-E (ab|cd)e abcde (2,5)(2,4)
-BE [abhgefdc]ij hij (0,3)
-E (a|b)c*d abcd (1,4)(1,2)
-E (ab|ab*)bc abc (0,3)(0,1)
-E a([bc]*)c* abc (0,3)(1,3)
-E a([bc]*)(c*d) abcd (0,4)(1,3)(3,4)
-E a([bc]+)(c*d) abcd (0,4)(1,3)(3,4)
-E a([bc]*)(c+d) abcd (0,4)(1,2)(2,4)
-E a[bcd]*dcdcde adcdcde (0,7)
-E (ab|a)b*c abc (0,3)(0,2)
-E ((a)(b)c)(d) abcd (0,4)(0,3)(0,1)(1,2)(3,4)
-BE [A-Za-z_][A-Za-z0-9_]* alpha (0,5)
-E ^a(bc+|b[eh])g|.h$ abh (1,3)
-E (bc+d$|ef*g.|h?i(j|k)) effgz (0,5)(0,5)
-E (bc+d$|ef*g.|h?i(j|k)) ij (0,2)(0,2)(1,2)
-E (bc+d$|ef*g.|h?i(j|k)) reffgz (1,6)(1,6)
-E (((((((((a))))))))) a (0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)(0,1)
-BE multiple words multiple words yeah (0,14)
-E (.*)c(.*) abcde (0,5)(0,2)(3,5)
-BE abcd abcd (0,4)
-E a(bc)d abcd (0,4)(1,3)
-E a[-]?c ac (0,3)
-E M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] Muammar Qaddafi (0,15)(?,?)(10,12)
-E M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] Mo'ammar Gadhafi (0,16)(?,?)(11,13)
-E M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] Muammar Kaddafi (0,15)(?,?)(10,12)
-E M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] Muammar Qadhafi (0,15)(?,?)(10,12)
-E M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] Muammar Gadafi (0,14)(?,?)(10,11)
-E M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] Mu'ammar Qadafi (0,15)(?,?)(11,12)
-E M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] Moamar Gaddafi (0,14)(?,?)(9,11)
-E M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] Mu'ammar Qadhdhafi (0,18)(?,?)(13,15)
-E M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] Muammar Khaddafi (0,16)(?,?)(11,13)
-E M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] Muammar Ghaddafy (0,16)(?,?)(11,13)
-E M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] Muammar Ghadafi (0,15)(?,?)(11,12)
-E M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] Muammar Ghaddafi (0,16)(?,?)(11,13)
-E M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] Muamar Kaddafi (0,14)(?,?)(9,11)
-E M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] Muammar Quathafi (0,16)(?,?)(11,13)
-E M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] Muammar Gheddafi (0,16)(?,?)(11,13)
-E M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] Moammar Khadafy (0,15)(?,?)(11,12)
-E M[ou]'?am+[ae]r .*([AEae]l[- ])?[GKQ]h?[aeu]+([dtz][dhz]?)+af[iy] Moammar Qudhafi (0,15)(?,?)(10,12)
-E a+(b|c)*d+ aabcdd (0,6)(3,4)
-E ^.+$ vivi (0,4)
-E ^(.+)$ vivi (0,4)(0,4)
-E ^([^!.]+).att.com!(.+)$ gryphon.att.com!eby (0,19)(0,7)(16,19)
-E ^([^!]+!)?([^!]+)$ bas (0,3)(?,?)(0,3)
-E ^([^!]+!)?([^!]+)$ bar!bas (0,7)(0,4)(4,7)
-E ^([^!]+!)?([^!]+)$ foo!bas (0,7)(0,4)(4,7)
-E ^.+!([^!]+!)([^!]+)$ foo!bar!bas (0,11)(4,8)(8,11)
-E ((foo)|(bar))!bas bar!bas (0,7)(0,3)(?,?)(0,3)
-E ((foo)|(bar))!bas foo!bar!bas (4,11)(4,7)(?,?)(4,7)
-E ((foo)|(bar))!bas foo!bas (0,7)(0,3)(0,3)
-E ((foo)|bar)!bas bar!bas (0,7)(0,3)
-E ((foo)|bar)!bas foo!bar!bas (4,11)(4,7)
-E ((foo)|bar)!bas foo!bas (0,7)(0,3)(0,3)
-E (foo|(bar))!bas bar!bas (0,7)(0,3)(0,3)
-E (foo|(bar))!bas foo!bar!bas (4,11)(4,7)(4,7)
-E (foo|(bar))!bas foo!bas (0,7)(0,3)
-E (foo|bar)!bas bar!bas (0,7)(0,3)
-E (foo|bar)!bas foo!bar!bas (4,11)(4,7)
-E (foo|bar)!bas foo!bas (0,7)(0,3)
-E ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$ foo!bar!bas (0,11)(0,11)(?,?)(?,?)(4,8)(8,11)
-E ^([^!]+!)?([^!]+)$|^.+!([^!]+!)([^!]+)$ bas (0,3)(?,?)(0,3)
-E ^([^!]+!)?([^!]+)$|^.+!([^!]+!)([^!]+)$ bar!bas (0,7)(0,4)(4,7)
-E ^([^!]+!)?([^!]+)$|^.+!([^!]+!)([^!]+)$ foo!bar!bas (0,11)(?,?)(?,?)(4,8)(8,11)
-E ^([^!]+!)?([^!]+)$|^.+!([^!]+!)([^!]+)$ foo!bas (0,7)(0,4)(4,7)
-E ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$ bas (0,3)(0,3)(?,?)(0,3)
-E ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$ bar!bas (0,7)(0,7)(0,4)(4,7)
-E ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$ foo!bar!bas (0,11)(0,11)(?,?)(?,?)(4,8)(8,11)
-E ^(([^!]+!)?([^!]+)|.+!([^!]+!)([^!]+))$ foo!bas (0,7)(0,7)(0,4)(4,7)
-E .*(/XXX).* /XXX (0,4)(0,4)
-E .*(\\XXX).* \XXX (0,4)(0,4)
-E \\XXX \XXX (0,4)
-E .*(/000).* /000 (0,4)(0,4)
-E .*(\\000).* \000 (0,4)(0,4)
-E \\000 \000 (0,4)
diff --git a/test/regex/categorize.dat b/test/regex/categorize.dat
deleted file mode 100644
index d34851278..000000000
--- a/test/regex/categorize.dat
+++ /dev/null
@@ -1,62 +0,0 @@
-NOTE regex implementation categorization 2004-05-31
-
-?E aa* xaxaax (1,2) POSITION=leftmost
-; POSITION=bug
-
-?E (a*)(ab)*(b*) abc (0,2)(0,1)(?,?)(1,2) ASSOCIATIVITY=right
-|E (a*)(ab)*(b*) abc (0,2)(0,0)(0,2)(2,2) ASSOCIATIVITY=left
-; ASSOCIATIVITY=bug
-
-?E ((a*)(ab)*)((b*)(a*)) aba (0,3)(0,2)(0,0)(0,2)(2,3)(2,2)(2,3) SUBEXPRESSION=precedence
-|E ((a*)(ab)*)((b*)(a*)) aba (0,3)(0,1)(0,1)(?,?)(1,3)(1,2)(2,3) SUBEXPRESSION=grouping
-; SUBEXPRESSION=bug
-
-?E (...?.?)* xxxxxx (0,6)(4,6) REPEAT_LONGEST=first
-|E (...?.?)* xxxxxx (0,6)(2,6) REPEAT_LONGEST=last
-|E (...?.?)* xxxxxx OK REPEAT_LONGEST=unknown
-; REPEAT_LONGEST=bug
-
-?E (a|ab)(bc|c) abcabc (0,3)(0,2)(2,3) EXPECTED
-|E (a|ab)(bc|c) abcabc (0,3)(0,1)(1,3) BUG=alternation-order
-; BUG=alternation-order-UNKNOWN
-
-?E (aba|a*b)(aba|a*b) ababa (0,5)(0,2)(2,5) EXPECTED
-|E (aba|a*b)(aba|a*b) ababa (0,4)(0,3)(3,4) BUG=first-match
-; BUG=unknown-match
-
-?B a\(b\)*\1 a NOMATCH EXPECTED
-|B a\(b\)*\1 a (0,1) BUG=nomatch-match
-|B a\(b\)*\1 abab (0,2)(1,2) # BUG=repeat-any
-; BUG=nomatch-match-UNKNOWN
-
-?E (a*){2} xxxxx (0,0)(0,0) EXPECTED
-|E (a*){2} xxxxx (5,5)(5,5) BUG=range-null
-; BUG=range-null-UNKNOWN
-
-?B a\(b\)*\1 abab NOMATCH EXPECTED
-|B a\(b\)*\1 abab (0,1) # BUG=nomatch-match
-|B a\(b\)*\1 abab (0,2)(1,2) BUG=repeat-any
-; BUG=repeat-any-UNKNOWN
-
-?E (a*)* a (0,1)(0,1) EXPECTED
-|E (a*)* ax (0,1)(0,1) BUG=repeat-null-unknown
-|E (a*)* a (0,1)(1,1) BUG=repeat-null
-; BUG=repeat-null-UNKNOWN
-
-?E (aba|a*b)* ababa (0,5)(2,5) EXPECTED
-|E (aba|a*b)* ababa (0,5)(3,4) BUG=repeat-short
-|E (aba|a*b)* ababa (0,4)(3,4) # LENGTH=first
-; BUG=repeat-short-UNKNOWN
-
-?E (a(b)?)+ aba (0,3)(2,3) EXPECTED
-|E (a(b)?)+ aba (0,3)(2,3)(1,2) BUG=repeat-artifact
-; BUG=repeat-artifact-UNKNOWN
-
-?B \(a\(b\)*\)*\2 abab NOMATCH EXPECTED
-|B \(a\(b\)*\)*\2 abab (0,4)(2,3)(1,2) BUG=repeat-artifact-nomatch
-; BUG=repeat-artifact-nomatch-UNKNOWN
-
-?E (a?)((ab)?)(b?)a?(ab)?b? abab (0,4)(0,1)(1,1)(?,?)(1,2)(2,4) BUG=subexpression-first
-|E .*(.*) ab (0,2)(2,2) EXPECTED
-|E .*(.*) ab (0,2)(0,2) BUG=subexpression-first
-; BUG=subexpression-first-UNKNOWN
diff --git a/test/regex/forcedassoc.dat b/test/regex/forcedassoc.dat
deleted file mode 100644
index 39f3111da..000000000
--- a/test/regex/forcedassoc.dat
+++ /dev/null
@@ -1,30 +0,0 @@
-NOTE left-assoc:pass-all right-assoc:pass-all : 2002-04-29
-
-E (a|ab)(c|bcd) abcd (0,4)(0,1)(1,4)
-E (a|ab)(bcd|c) abcd (0,4)(0,1)(1,4)
-E (ab|a)(c|bcd) abcd (0,4)(0,1)(1,4)
-E (ab|a)(bcd|c) abcd (0,4)(0,1)(1,4)
-E ((a|ab)(c|bcd))(d*) abcd (0,4)(0,4)(0,1)(1,4)(4,4)
-E ((a|ab)(bcd|c))(d*) abcd (0,4)(0,4)(0,1)(1,4)(4,4)
-E ((ab|a)(c|bcd))(d*) abcd (0,4)(0,4)(0,1)(1,4)(4,4)
-E ((ab|a)(bcd|c))(d*) abcd (0,4)(0,4)(0,1)(1,4)(4,4)
-E (a|ab)((c|bcd)(d*)) abcd (0,4)(0,2)(2,4)(2,3)(3,4)
-E (a|ab)((bcd|c)(d*)) abcd (0,4)(0,2)(2,4)(2,3)(3,4)
-E (ab|a)((c|bcd)(d*)) abcd (0,4)(0,2)(2,4)(2,3)(3,4)
-E (ab|a)((bcd|c)(d*)) abcd (0,4)(0,2)(2,4)(2,3)(3,4)
-E (a*)(b|abc) abc (0,3)(0,0)(0,3)
-E (a*)(abc|b) abc (0,3)(0,0)(0,3)
-E ((a*)(b|abc))(c*) abc (0,3)(0,3)(0,0)(0,3)(3,3)
-E ((a*)(abc|b))(c*) abc (0,3)(0,3)(0,0)(0,3)(3,3)
-E (a*)((b|abc)(c*)) abc (0,3)(0,1)(1,3)(1,2)(2,3)
-E (a*)((abc|b)(c*)) abc (0,3)(0,1)(1,3)(1,2)(2,3)
-E (a*)(b|abc) abc (0,3)(0,0)(0,3)
-E (a*)(abc|b) abc (0,3)(0,0)(0,3)
-E ((a*)(b|abc))(c*) abc (0,3)(0,3)(0,0)(0,3)(3,3)
-E ((a*)(abc|b))(c*) abc (0,3)(0,3)(0,0)(0,3)(3,3)
-E (a*)((b|abc)(c*)) abc (0,3)(0,1)(1,3)(1,2)(2,3)
-E (a*)((abc|b)(c*)) abc (0,3)(0,1)(1,3)(1,2)(2,3)
-E (a|ab) ab (0,2)(0,2)
-E (ab|a) ab (0,2)(0,2)
-E (a|ab)(b*) ab (0,2)(0,2)(2,2)
-E (ab|a)(b*) ab (0,2)(0,2)(2,2)
diff --git a/test/regex/interpretation.dat b/test/regex/interpretation.dat
deleted file mode 100644
index 72e186eb7..000000000
--- a/test/regex/interpretation.dat
+++ /dev/null
@@ -1,93 +0,0 @@
-:RE#01:E a+ xaax (1,3)
-:RE#02:B .\(a*\). xaax (0,4)(1,3)
-:RE#03:E (a?)((ab)?) ab (0,2)(0,0)(0,2)(0,2)
-:RE#04:E (a?)((ab)?)(b?) ab (0,2)(0,1)(1,1)(?,?)(1,2)
-:RE#05:E ((a?)((ab)?))(b?) ab (0,2)(0,2)(0,0)(0,2)(0,2)(2,2)
-:RE#06:E (a?)(((ab)?)(b?)) ab (0,2)(0,1)(1,2)(1,1)(?,?)(1,2)
-:RE#07:E (.?) x (0,1)(0,1)
-:RE#08:E (.?){1} x (0,1)(0,1)
-:RE#09:E (.?)(.?) x (0,1)(0,1)(1,1)
-:RE#10:E (.?){2} x (0,1)(1,1)
-:RE#11:E (.?)* x (0,1)(0,1)
-:RE#12:E (.?.?) xxx (0,2)(0,2)
-:RE#13:E (.?.?){1} xxx (0,2)(0,2)
-:RE#14:E (.?.?)(.?.?) xxx (0,3)(0,2)(2,3)
-:RE#15:E (.?.?){2} xxx (0,3)(2,3)
-:RE#16:E (.?.?)(.?.?)(.?.?) xxx (0,3)(0,2)(2,3)(3,3)
-:RE#17:E (.?.?){3} xxx (0,3)(3,3)
-:RE#18:E (.?.?)* xxx (0,3)(2,3)
-:RE#19:E a?((ab)?)(b?) ab (0,2)(1,1)(?,?)(1,2)
-:RE#20:E (a?)((ab)?)b? ab (0,2)(0,1)(1,1)(?,?)
-:RE#21:E a?((ab)?)b? ab (0,2)(1,1)(?,?)
-:RE#22:E (a*){2} xxxxx (0,0)(0,0)
-:RE#23:E (ab?)(b?a) aba (0,3)(0,2)(2,3)
-:RE#24:E (a|ab)(ba|a) aba (0,3)(0,2)(2,3)
-:RE#25:E (a|ab|ba) aba (0,2)(0,2)
-:RE#26:E (a|ab|ba)(a|ab|ba) aba (0,3)(0,2)(2,3)
-:RE#27:E (a|ab|ba)* aba (0,3)(2,3)
-:RE#28:E (aba|a*b) ababa (0,3)(0,3)
-:RE#29:E (aba|a*b)(aba|a*b) ababa (0,5)(0,2)(2,5)
-:RE#30:E (aba|a*b)* ababa (0,5)(2,5)
-:RE#31:E (aba|ab|a) ababa (0,3)(0,3)
-:RE#32:E (aba|ab|a)(aba|ab|a) ababa (0,5)(0,2)(2,5)
-:RE#33:E (aba|ab|a)* ababa (0,5)(2,5)
-:RE#34:E (a(b)?) aba (0,2)(0,2)(1,2)
-:RE#35:E (a(b)?)(a(b)?) aba (0,3)(0,2)(1,2)(2,3)(?,?)
-:RE#36:E (a(b)?)+ aba (0,3)(2,3)(?,?)
-:RE#37:E (.*)(.*) xx (0,2)(0,2)(2,2)
-:RE#38:E .*(.*) xx (0,2)(2,2)
-:RE#39:E (a.*z|b.*y) azbazby (0,5)(0,5)
-:RE#40:E (a.*z|b.*y)(a.*z|b.*y) azbazby (0,7)(0,5)(5,7)
-:RE#41:E (a.*z|b.*y)* azbazby (0,7)(5,7)
-:RE#42:E (.|..)(.*) ab (0,2)(0,2)(2,2)
-:RE#43:E ((..)*(...)*) xxx (0,3)(0,3)(?,?)(0,3)
-:RE#44:E ((..)*(...)*)((..)*(...)*) xxx (0,3)(0,3)(?,?)(0,3)(3,3)(?,?)
-:RE#45:E ((..)*(...)*)* xxx (0,3)(0,3)(?,?)(0,3)
-:RE#46:B \(a\{0,1\}\)*b\1 ab (0,2)(1,1)
-:RE#47:B \(a*\)*b\1 ab (0,2)(1,1)
-:RE#48:B \(a*\)b\1* ab (0,2)(0,1)
-:RE#49:B \(a*\)*b\1* ab (0,2)(1,1)
-:RE#50:B \(a\{0,1\}\)*b\(\1\) ab (0,2)(1,1)(2,2)
-:RE#51:B \(a*\)*b\(\1\) ab (0,2)(1,1)(2,2)
-:RE#52:B \(a*\)b\(\1\)* ab (0,2)(0,1)(?,?)
-:RE#53:B \(a*\)*b\(\1\)* ab (0,2)(1,1)(2,2)
-:RE#54:B \(a\{0,1\}\)*b\1 aba (0,3)(0,1)
-:RE#55:B \(a*\)*b\1 aba (0,3)(0,1)
-:RE#56:B \(a*\)b\1* aba (0,3)(0,1)
-:RE#57:B \(a*\)*b\1* aba (0,3)(0,1)
-:RE#58:B \(a*\)*b\(\1\)* aba (0,3)(0,1)(2,3)
-:RE#59:B \(a\{0,1\}\)*b\1 abaa (0,3)(0,1)
-:RE#60:B \(a*\)*b\1 abaa (0,3)(0,1)
-:RE#61:B \(a*\)b\1* abaa (0,4)(0,1)
-:RE#62:B \(a*\)*b\1* abaa (0,4)(0,1)
-:RE#63:B \(a*\)*b\(\1\)* abaa (0,4)(0,1)(3,4)
-:RE#64:B \(a\{0,1\}\)*b\1 aab (0,3)(2,2)
-:RE#65:B \(a*\)*b\1 aab (0,3)(2,2)
-:RE#66:B \(a*\)b\1* aab (0,3)(0,2)
-:RE#67:B \(a*\)*b\1* aab (0,3)(2,2)
-:RE#68:B \(a*\)*b\(\1\)* aab (0,3)(2,2)(3,3)
-:RE#69:B \(a\{0,1\}\)*b\1 aaba (0,4)(1,2)
-:RE#70:B \(a*\)*b\1 aaba (0,4)(1,2)
-:RE#71:B \(a*\)b\1* aaba (0,3)(0,2)
-:RE#72:B \(a*\)*b\1* aaba (0,4)(1,2)
-:RE#73:B \(a*\)*b\(\1\)* aaba (0,4)(1,2)(3,4)
-:RE#74:B \(a\{0,1\}\)*b\1 aabaa (0,4)(1,2)
-:RE#75:B \(a*\)*b\1 aabaa (0,5)(0,2)
-:RE#76:B \(a*\)b\1* aabaa (0,5)(0,2)
-:RE#77:B \(a*\)*b\1* aabaa (0,5)(0,2)
-:RE#78:B \(a*\)*b\(\1\)* aabaa (0,5)(0,2)(3,5)
-:RE#79:B \(x\)*a\1 a NOMATCH
-:RE#80:B \(x\)*a\1* a (0,1)(?,?)
-:RE#81:B \(x\)*a\(\1\) a NOMATCH
-:RE#82:B \(x\)*a\(\1\)* a (0,1)(?,?)(?,?)
-:RE#83:E (aa(b(b))?)+ aabbaa (0,6)(4,6)(?,?)(?,?)
-:RE#84:E (a(b)?)+ aba (0,3)(2,3)(?,?)
-:RE#85:E ([ab]+)([bc]+)([cd]*) abcd (0,4)(0,2)(2,3)(3,4)
-:RE#86:B \([ab]*\)\([bc]*\)\([cd]*\)\1 abcdaa (0,5)(0,1)(1,3)(3,4)
-:RE#87:B \([ab]*\)\([bc]*\)\([cd]*\)\1 abcdab (0,6)(0,2)(2,3)(3,4)
-:RE#88:B \([ab]*\)\([bc]*\)\([cd]*\)\1* abcdaa (0,6)(0,1)(1,3)(3,4)
-:RE#89:B \([ab]*\)\([bc]*\)\([cd]*\)\1* abcdab (0,6)(0,2)(2,3)(3,4)
-:RE#90:E ^(A([^B]*))?(B(.*))? Aa (0,2)(0,2)(1,2)
-:RE#91:E ^(A([^B]*))?(B(.*))? Bb (0,2)(?,?)(?,?)(0,2)(1,2)
-:RE#92:B .*\([AB]\).*\1 ABA (0,3)(0,1)
-:RE#93:B$ [^A]*A \nA (0,2)
diff --git a/test/regex/leftassoc.dat b/test/regex/leftassoc.dat
deleted file mode 100644
index 9c068c61b..000000000
--- a/test/regex/leftassoc.dat
+++ /dev/null
@@ -1,16 +0,0 @@
-NOTE left-assoc:pass-all right-assoc:pass-none : 2002-04-29
-
-E (a|ab)(c|bcd)(d*) abcd (0,4)(0,1)(1,4)(4,4)
-E (a|ab)(bcd|c)(d*) abcd (0,4)(0,1)(1,4)(4,4)
-E (ab|a)(c|bcd)(d*) abcd (0,4)(0,1)(1,4)(4,4)
-E (ab|a)(bcd|c)(d*) abcd (0,4)(0,1)(1,4)(4,4)
-
-E (a*)(b|abc)(c*) abc (0,3)(0,0)(0,3)(3,3)
-E (a*)(abc|b)(c*) abc (0,3)(0,0)(0,3)(3,3)
-E (a*)(b|abc)(c*) abc (0,3)(0,0)(0,3)(3,3)
-E (a*)(abc|b)(c*) abc (0,3)(0,0)(0,3)(3,3)
-
-E (a|ab)(c|bcd)(d|.*) abcd (0,4)(0,1)(1,4)(4,4)
-E (a|ab)(bcd|c)(d|.*) abcd (0,4)(0,1)(1,4)(4,4)
-E (ab|a)(c|bcd)(d|.*) abcd (0,4)(0,1)(1,4)(4,4)
-E (ab|a)(bcd|c)(d|.*) abcd (0,4)(0,1)(1,4)(4,4)
diff --git a/test/regex/nullsubexpr.dat b/test/regex/nullsubexpr.dat
deleted file mode 100644
index c73d8f09e..000000000
--- a/test/regex/nullsubexpr.dat
+++ /dev/null
@@ -1,73 +0,0 @@
-NOTE null subexpression matches : 2002-06-06
-
-E (a*)* a (0,1)(0,1)
-E SAME x (0,0)(0,0)
-E SAME aaaaaa (0,6)(0,6)
-E SAME aaaaaax (0,6)(0,6)
-E (a*)+ a (0,1)(0,1)
-E SAME x (0,0)(0,0)
-E SAME aaaaaa (0,6)(0,6)
-E SAME aaaaaax (0,6)(0,6)
-E (a+)* a (0,1)(0,1)
-E SAME x (0,0)
-E SAME aaaaaa (0,6)(0,6)
-E SAME aaaaaax (0,6)(0,6)
-E (a+)+ a (0,1)(0,1)
-E SAME x NOMATCH
-E SAME aaaaaa (0,6)(0,6)
-E SAME aaaaaax (0,6)(0,6)
-
-E ([a]*)* a (0,1)(0,1)
-E SAME x (0,0)(0,0)
-E SAME aaaaaa (0,6)(0,6)
-E SAME aaaaaax (0,6)(0,6)
-E ([a]*)+ a (0,1)(0,1)
-E SAME x (0,0)(0,0)
-E SAME aaaaaa (0,6)(0,6)
-E SAME aaaaaax (0,6)(0,6)
-E ([^b]*)* a (0,1)(0,1)
-E SAME b (0,0)(0,0)
-E SAME aaaaaa (0,6)(0,6)
-E SAME aaaaaab (0,6)(0,6)
-E ([ab]*)* a (0,1)(0,1)
-E SAME aaaaaa (0,6)(0,6)
-E SAME ababab (0,6)(0,6)
-E SAME bababa (0,6)(0,6)
-E SAME b (0,1)(0,1)
-E SAME bbbbbb (0,6)(0,6)
-E SAME aaaabcde (0,5)(0,5)
-E ([^a]*)* b (0,1)(0,1)
-E SAME bbbbbb (0,6)(0,6)
-E SAME aaaaaa (0,0)(0,0)
-E ([^ab]*)* ccccxx (0,6)(0,6)
-E SAME ababab (0,0)(0,0)
-
-E ((z)+|a)* zabcde (0,2)(1,2)
-
-{E a+? aaaaaa (0,1) no *? +? mimimal match ops
-E (a) aaa (0,1)(0,1)
-E (a*?) aaa (0,0)(0,0)
-E (a)*? aaa (0,0)
-E (a*?)*? aaa (0,0)
-}
-
-B \(a*\)*\(x\) x (0,1)(0,0)(0,1)
-B \(a*\)*\(x\) ax (0,2)(0,1)(1,2)
-B \(a*\)*\(x\) axa (0,2)(0,1)(1,2)
-B \(a*\)*\(x\)\(\1\) x (0,1)(0,0)(0,1)(1,1)
-B \(a*\)*\(x\)\(\1\) ax (0,2)(1,1)(1,2)(2,2)
-B \(a*\)*\(x\)\(\1\) axa (0,3)(0,1)(1,2)(2,3)
-B \(a*\)*\(x\)\(\1\)\(x\) axax (0,4)(0,1)(1,2)(2,3)(3,4)
-B \(a*\)*\(x\)\(\1\)\(x\) axxa (0,3)(1,1)(1,2)(2,2)(2,3)
-
-E (a*)*(x) x (0,1)(0,0)(0,1)
-E (a*)*(x) ax (0,2)(0,1)(1,2)
-E (a*)*(x) axa (0,2)(0,1)(1,2)
-
-E (a*)+(x) x (0,1)(0,0)(0,1)
-E (a*)+(x) ax (0,2)(0,1)(1,2)
-E (a*)+(x) axa (0,2)(0,1)(1,2)
-
-E (a*){2}(x) x (0,1)(0,0)(0,1)
-E (a*){2}(x) ax (0,2)(1,1)(1,2)
-E (a*){2}(x) axa (0,2)(1,1)(1,2)
diff --git a/test/regex/repetition.dat b/test/regex/repetition.dat
deleted file mode 100644
index b54a2c6f4..000000000
--- a/test/regex/repetition.dat
+++ /dev/null
@@ -1,79 +0,0 @@
-NOTE implicit vs. explicit repetitions : 2002-08-01
-#
-# Glenn Fowler <gsf@research.att.com>
-# conforming matches (column 4) must match one of the following BREs
-# NOMATCH
-# (0,.)\((\(.\),\(.\))(?,?)(\2,\3)\)*
-# (0,.)\((\(.\),\(.\))(\2,\3)(?,?)\)*
-# i.e., each 3-tuple has two identical elements and one (?,?)
-#
-
-E ((..)|(.)) NULL NOMATCH
-E ((..)|(.))((..)|(.)) NULL NOMATCH
-E ((..)|(.))((..)|(.))((..)|(.)) NULL NOMATCH
-
-E ((..)|(.)){1} NULL NOMATCH
-E ((..)|(.)){2} NULL NOMATCH
-E ((..)|(.)){3} NULL NOMATCH
-
-E ((..)|(.))* NULL (0,0)
-
-E ((..)|(.)) a (0,1)(0,1)(?,?)(0,1)
-E ((..)|(.))((..)|(.)) a NOMATCH
-E ((..)|(.))((..)|(.))((..)|(.)) a NOMATCH
-
-E ((..)|(.)){1} a (0,1)(0,1)(?,?)(0,1)
-E ((..)|(.)){2} a NOMATCH
-E ((..)|(.)){3} a NOMATCH
-
-E ((..)|(.))* a (0,1)(0,1)(?,?)(0,1)
-
-E ((..)|(.)) aa (0,2)(0,2)(0,2)(?,?)
-E ((..)|(.))((..)|(.)) aa (0,2)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)
-E ((..)|(.))((..)|(.))((..)|(.)) aa NOMATCH
-
-E ((..)|(.)){1} aa (0,2)(0,2)(0,2)(?,?)
-E ((..)|(.)){2} aa (0,2)(1,2)(?,?)(1,2)
-E ((..)|(.)){3} aa NOMATCH
-
-E ((..)|(.))* aa (0,2)(0,2)(0,2)(?,?)
-
-E ((..)|(.)) aaa (0,2)(0,2)(0,2)(?,?)
-E ((..)|(.))((..)|(.)) aaa (0,3)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)
-E ((..)|(.))((..)|(.))((..)|(.)) aaa (0,3)(0,1)(?,?)(0,1)(1,2)(?,?)(1,2)(2,3)(?,?)(2,3)
-
-E ((..)|(.)){1} aaa (0,2)(0,2)(0,2)(?,?)
-E ((..)|(.)){2} aaa (0,3)(2,3)(?,?)(2,3)
-E ((..)|(.)){3} aaa (0,3)(2,3)(?,?)(2,3)
-
-E ((..)|(.))* aaa (0,3)(2,3)(?,?)(2,3)
-
-E ((..)|(.)) aaaa (0,2)(0,2)(0,2)(?,?)
-E ((..)|(.))((..)|(.)) aaaa (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)
-E ((..)|(.))((..)|(.))((..)|(.)) aaaa (0,4)(0,2)(0,2)(?,?)(2,3)(?,?)(2,3)(3,4)(?,?)(3,4)
-
-E ((..)|(.)){1} aaaa (0,2)(0,2)(0,2)(?,?)
-E ((..)|(.)){2} aaaa (0,4)(2,4)(2,4)(?,?)
-E ((..)|(.)){3} aaaa (0,4)(3,4)(?,?)(3,4)
-
-E ((..)|(.))* aaaa (0,4)(2,4)(2,4)(?,?)
-
-E ((..)|(.)) aaaaa (0,2)(0,2)(0,2)(?,?)
-E ((..)|(.))((..)|(.)) aaaaa (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)
-E ((..)|(.))((..)|(.))((..)|(.)) aaaaa (0,5)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,5)(?,?)(4,5)
-
-E ((..)|(.)){1} aaaaa (0,2)(0,2)(0,2)(?,?)
-E ((..)|(.)){2} aaaaa (0,4)(2,4)(2,4)(?,?)
-E ((..)|(.)){3} aaaaa (0,5)(4,5)(?,?)(4,5)
-
-E ((..)|(.))* aaaaa (0,5)(4,5)(?,?)(4,5)
-
-E ((..)|(.)) aaaaaa (0,2)(0,2)(0,2)(?,?)
-E ((..)|(.))((..)|(.)) aaaaaa (0,4)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)
-E ((..)|(.))((..)|(.))((..)|(.)) aaaaaa (0,6)(0,2)(0,2)(?,?)(2,4)(2,4)(?,?)(4,6)(4,6)(?,?)
-
-E ((..)|(.)){1} aaaaaa (0,2)(0,2)(0,2)(?,?)
-E ((..)|(.)){2} aaaaaa (0,4)(2,4)(2,4)(?,?)
-E ((..)|(.)){3} aaaaaa (0,6)(4,6)(4,6)(?,?)
-
-E ((..)|(.))* aaaaaa (0,6)(4,6)(4,6)(?,?)
diff --git a/test/regex/rightassoc.dat b/test/regex/rightassoc.dat
deleted file mode 100644
index ed7f28e62..000000000
--- a/test/regex/rightassoc.dat
+++ /dev/null
@@ -1,16 +0,0 @@
-NOTE left-assoc:pass-none right-assoc:pass-all : 2002-04-29
-
-E (a|ab)(c|bcd)(d*) abcd (0,4)(0,2)(2,3)(3,4)
-E (a|ab)(bcd|c)(d*) abcd (0,4)(0,2)(2,3)(3,4)
-E (ab|a)(c|bcd)(d*) abcd (0,4)(0,2)(2,3)(3,4)
-E (ab|a)(bcd|c)(d*) abcd (0,4)(0,2)(2,3)(3,4)
-
-E (a*)(b|abc)(c*) abc (0,3)(0,1)(1,2)(2,3)
-E (a*)(abc|b)(c*) abc (0,3)(0,1)(1,2)(2,3)
-E (a*)(b|abc)(c*) abc (0,3)(0,1)(1,2)(2,3)
-E (a*)(abc|b)(c*) abc (0,3)(0,1)(1,2)(2,3)
-
-E (a|ab)(c|bcd)(d|.*) abcd (0,4)(0,2)(2,3)(3,4)
-E (a|ab)(bcd|c)(d|.*) abcd (0,4)(0,2)(2,3)(3,4)
-E (ab|a)(c|bcd)(d|.*) abcd (0,4)(0,2)(2,3)(3,4)
-E (ab|a)(bcd|c)(d|.*) abcd (0,4)(0,2)(2,3)(3,4)
diff --git a/test/regex/testregex.c b/test/regex/testregex.c
deleted file mode 100644
index d18761dd3..000000000
--- a/test/regex/testregex.c
+++ /dev/null
@@ -1,2145 +0,0 @@
-/*
- * regex(3) test harness
- *
- * build: cc -o testregex testregex.c
- * help: testregex --man
- * note: REG_* features are detected by #ifdef; if REG_* are enums
- * then supply #define REG_foo REG_foo for each enum REG_foo
- *
- * Glenn Fowler <gsf@research.att.com>
- * AT&T Labs Research
- *
- * PLEASE: publish your tests so everyone can benefit
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of THIS SOFTWARE FILE (the "Software"), to deal in the Software
- * without restriction, including without limitation the rights to use,
- * copy, modify, merge, publish, distribute, and/or sell copies of the
- * Software, and to permit persons to whom the Software is furnished to do
- * so, subject to the following disclaimer:
- *
- * THIS SOFTWARE IS PROVIDED BY AT&T ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- * IN NO EVENT SHALL AT&T BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-static const char id[] = "\n@(#)$Id: testregex (AT&T Research) 2005-05-20 $\0\n";
-
-#if _PACKAGE_ast
-#include <ast.h>
-#else
-#include <sys/types.h>
-#endif
-
-#include <stdio.h>
-#include <regex.h>
-#include <ctype.h>
-#include <setjmp.h>
-#include <signal.h>
-#include <string.h>
-#include <unistd.h>
-
-#ifdef __STDC__
-#include <stdlib.h>
-#include <locale.h>
-#endif
-
-#if !_PACKAGE_ast
-#undef REG_DISCIPLINE
-#endif
-
-#ifndef REG_DELIMITED
-#undef _REG_subcomp
-#endif
-
-#define TEST_ARE 0x00000001
-#define TEST_BRE 0x00000002
-#define TEST_ERE 0x00000004
-#define TEST_KRE 0x00000008
-#define TEST_LRE 0x00000010
-#define TEST_SRE 0x00000020
-
-#define TEST_EXPAND 0x00000040
-#define TEST_LENIENT 0x00000080
-
-#define TEST_QUERY 0x00000100
-#define TEST_SUB 0x00000200
-#define TEST_UNSPECIFIED 0x00000400
-#define TEST_VERIFY 0x00000800
-#define TEST_AND 0x00001000
-#define TEST_OR 0x00002000
-
-#define TEST_DELIMIT 0x00010000
-#define TEST_OK 0x00020000
-#define TEST_SAME 0x00040000
-
-#define TEST_ACTUAL 0x00100000
-#define TEST_BASELINE 0x00200000
-#define TEST_FAIL 0x00400000
-#define TEST_PASS 0x00800000
-#define TEST_SUMMARY 0x01000000
-
-#define TEST_IGNORE_ERROR 0x02000000
-#define TEST_IGNORE_OVER 0x04000000
-#define TEST_IGNORE_POSITION 0x08000000
-
-#define TEST_CATCH 0x10000000
-#define TEST_VERBOSE 0x20000000
-
-#define TEST_GLOBAL (TEST_ACTUAL|TEST_AND|TEST_BASELINE|TEST_CATCH|TEST_FAIL|TEST_IGNORE_ERROR|TEST_IGNORE_OVER|TEST_IGNORE_POSITION|TEST_OR|TEST_PASS|TEST_SUMMARY|TEST_VERBOSE)
-
-#ifdef REG_DISCIPLINE
-
-
-#include <stk.h>
-
-typedef struct Disc_s
-{
- regdisc_t disc;
- int ordinal;
- Sfio_t* sp;
-} Disc_t;
-
-static void*
-compf(const regex_t* re, const char* xstr, size_t xlen, regdisc_t* disc)
-{
- Disc_t* dp = (Disc_t*)disc;
-
- return (void*)++dp->ordinal;
-}
-
-static int
-execf(const regex_t* re, void* data, const char* xstr, size_t xlen, const char* sstr, size_t slen, char** snxt, regdisc_t* disc)
-{
- Disc_t* dp = (Disc_t*)disc;
-
- sfprintf(dp->sp, "{%-.*s}(%d:%d)", xlen, xstr, (int)data, slen);
- return atoi(xstr);
-}
-
-static void*
-resizef(void* handle, void* data, size_t size)
-{
- if (!size)
- return 0;
- return stkalloc((Sfio_t*)handle, size);
-}
-
-#endif
-
-#ifndef NiL
-#ifdef __STDC__
-#define NiL 0
-#else
-#define NiL (char*)0
-#endif
-#endif
-
-#define H(x) do{if(html)fprintf(stderr,x);}while(0)
-#define T(x) fprintf(stderr,x)
-
-static void
-help(int html)
-{
-H("<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML//EN\">\n");
-H("<HTML>\n");
-H("<HEAD>\n");
-H("<TITLE>testregex man document</TITLE>\n");
-H("</HEAD>\n");
-H("<BODY bgcolor=white>\n");
-H("<PRE>\n");
-T("NAME\n");
-T(" testregex - regex(3) test harness\n");
-T("\n");
-T("SYNOPSIS\n");
-T(" testregex [ options ]\n");
-T("\n");
-T("DESCRIPTION\n");
-T(" testregex reads regex(3) test specifications, one per line, from the\n");
-T(" standard input and writes one output line for each failed test. A\n");
-T(" summary line is written after all tests are done. Each successful\n");
-T(" test is run again with REG_NOSUB. Unsupported features are noted\n");
-T(" before the first test, and tests requiring these features are\n");
-T(" silently ignored.\n");
-T("\n");
-T("OPTIONS\n");
-T(" -c catch signals and non-terminating calls\n");
-T(" -e ignore error return mismatches\n");
-T(" -h list help on standard error\n");
-T(" -n do not repeat successful tests with regnexec()\n");
-T(" -o ignore match[] overrun errors\n");
-T(" -p ignore negative position mismatches\n");
-T(" -s use stack instead of malloc\n");
-T(" -x do not repeat successful tests with REG_NOSUB\n");
-T(" -v list each test line\n");
-T(" -A list failed test lines with actual answers\n");
-T(" -B list all test lines with actual answers\n");
-T(" -F list failed test lines\n");
-T(" -P list passed test lines\n");
-T(" -S output one summary line\n");
-T("\n");
-T("INPUT FORMAT\n");
-T(" Input lines may be blank, a comment beginning with #, or a test\n");
-T(" specification. A specification is five fields separated by one\n");
-T(" or more tabs. NULL denotes the empty string and NIL denotes the\n");
-T(" 0 pointer.\n");
-T("\n");
-T(" Field 1: the regex(3) flags to apply, one character per REG_feature\n");
-T(" flag. The test is skipped if REG_feature is not supported by the\n");
-T(" implementation. If the first character is not [BEASKL] then the\n");
-T(" specification is a global control line. One or more of [BEASKL] may be\n");
-T(" specified; the test will be repeated for each mode.\n");
-T("\n");
-T(" B basic BRE (grep, ed, sed)\n");
-T(" E REG_EXTENDED ERE (egrep)\n");
-T(" A REG_AUGMENTED ARE (egrep with negation)\n");
-T(" S REG_SHELL SRE (sh glob)\n");
-T(" K REG_SHELL|REG_AUGMENTED KRE (ksh glob)\n");
-T(" L REG_LITERAL LRE (fgrep)\n");
-T("\n");
-T(" a REG_LEFT|REG_RIGHT implicit ^...$\n");
-T(" b REG_NOTBOL lhs does not match ^\n");
-T(" c REG_COMMENT ignore space and #...\\n\n");
-T(" d REG_SHELL_DOT explicit leading . match\n");
-T(" e REG_NOTEOL rhs does not match $\n");
-T(" f REG_MULTIPLE multiple \\n separated patterns\n");
-T(" g FNM_LEADING_DIR testfnmatch only -- match until /\n");
-T(" h REG_MULTIREF multiple digit backref\n");
-T(" i REG_ICASE ignore case\n");
-T(" j REG_SPAN . matches \\n\n");
-T(" k REG_ESCAPE \\ to ecape [...] delimiter\n");
-T(" l REG_LEFT implicit ^...\n");
-T(" m REG_MINIMAL minimal match\n");
-T(" n REG_NEWLINE explicit \\n match\n");
-T(" o REG_ENCLOSED (|&) magic inside [@|&](...)\n");
-T(" p REG_SHELL_PATH explicit / match\n");
-T(" q REG_DELIMITED delimited pattern\n");
-T(" r REG_RIGHT implicit ...$\n");
-T(" s REG_SHELL_ESCAPED \\ not special\n");
-T(" t REG_MUSTDELIM all delimiters must be specified\n");
-T(" u standard unspecified behavior -- errors not counted\n");
-T(" w REG_NOSUB no subexpression match array\n");
-T(" x REG_LENIENT let some errors slide\n");
-T(" y REG_LEFT regexec() implicit ^...\n");
-T(" z REG_NULL NULL subexpressions ok\n");
-T(" $ expand C \\c escapes in fields 2 and 3\n");
-T(" / field 2 is a regsubcomp() expression\n");
-T("\n");
-T(" Field 1 control lines:\n");
-T("\n");
-T(" C set LC_COLLATE and LC_CTYPE to locale in field 2\n");
-T("\n");
-T(" ?test ... output field 5 if passed and != EXPECTED, silent otherwise\n");
-T(" &test ... output field 5 if current and previous passed\n");
-T(" |test ... output field 5 if current passed and previous failed\n");
-T(" ; ... output field 2 if previous failed\n");
-T(" {test ... skip if failed until }\n");
-T(" } end of skip\n");
-T("\n");
-T(" : comment comment copied as output NOTE\n");
-T(" :comment:test :comment: ignored\n");
-T(" N[OTE] comment comment copied as output NOTE\n");
-T(" T[EST] comment comment\n");
-T("\n");
-T(" number use number for nmatch (20 by default)\n");
-T("\n");
-T(" Field 2: the regular expression pattern; SAME uses the pattern from\n");
-T(" the previous specification.\n");
-T("\n");
-T(" Field 3: the string to match.\n");
-T("\n");
-T(" Field 4: the test outcome. This is either one of the posix error\n");
-T(" codes (with REG_ omitted) or the match array, a list of (m,n)\n");
-T(" entries with m and n being first and last+1 positions in the\n");
-T(" field 3 string, or NULL if REG_NOSUB is in effect and success\n");
-T(" is expected. BADPAT is acceptable in place of any regcomp(3)\n");
-T(" error code. The match[] array is initialized to (-2,-2) before\n");
-T(" each test. All array elements from 0 to nmatch-1 must be specified\n");
-T(" in the outcome. Unspecified endpoints (offset -1) are denoted by ?.\n");
-T(" Unset endpoints (offset -2) are denoted by X. {x}(o:n) denotes a\n");
-T(" matched (?{...}) expression, where x is the text enclosed by {...},\n");
-T(" o is the expression ordinal counting from 1, and n is the length of\n");
-T(" the unmatched portion of the subject string. If x starts with a\n");
-T(" number then that is the return value of re_execf(), otherwise 0 is\n");
-T(" returned.\n");
-T("\n");
-T(" Field 5: optional comment appended to the report.\n");
-T("\n");
-T("CAVEAT\n");
-T(" If a regex implementation misbehaves with memory then all bets are off.\n");
-T("\n");
-T("CONTRIBUTORS\n");
-T(" Glenn Fowler gsf@research.att.com (ksh strmatch, regex extensions)\n");
-T(" David Korn dgk@research.att.com (ksh glob matcher)\n");
-T(" Doug McIlroy mcilroy@dartmouth.edu (ast regex/testre in C++)\n");
-T(" Tom Lord lord@regexps.com (rx tests)\n");
-T(" Henry Spencer henry@zoo.toronto.edu (original public regex)\n");
-T(" Andrew Hume andrew@research.att.com (gre tests)\n");
-T(" John Maddock John_Maddock@compuserve.com (regex++ tests)\n");
-T(" Philip Hazel ph10@cam.ac.uk (pcre tests)\n");
-T(" Ville Laurikari vl@iki.fi (libtre tests)\n");
-H("</PRE>\n");
-H("</BODY>\n");
-H("</HTML>\n");
-}
-
-#ifndef elementsof
-#define elementsof(x) (sizeof(x)/sizeof(x[0]))
-#endif
-
-#ifndef streq
-#define streq(a,b) (*(a)==*(b)&&!strcmp(a,b))
-#endif
-
-#define HUNG 5
-#define NOTEST (~0)
-
-#ifndef REG_TEST_DEFAULT
-#define REG_TEST_DEFAULT 0
-#endif
-
-#ifndef REG_EXEC_DEFAULT
-#define REG_EXEC_DEFAULT 0
-#endif
-
-static const char* unsupported[] =
-{
- "BASIC",
-#ifndef REG_EXTENDED
- "EXTENDED",
-#endif
-#ifndef REG_AUGMENTED
- "AUGMENTED",
-#endif
-#ifndef REG_SHELL
- "SHELL",
-#endif
-
-#ifndef REG_COMMENT
- "COMMENT",
-#endif
-#ifndef REG_DELIMITED
- "DELIMITED",
-#endif
-#ifndef REG_DISCIPLINE
- "DISCIPLINE",
-#endif
-#ifndef REG_ESCAPE
- "ESCAPE",
-#endif
-#ifndef REG_ICASE
- "ICASE",
-#endif
-#ifndef REG_LEFT
- "LEFT",
-#endif
-#ifndef REG_LENIENT
- "LENIENT",
-#endif
-#ifndef REG_LITERAL
- "LITERAL",
-#endif
-#ifndef REG_MINIMAL
- "MINIMAL",
-#endif
-#ifndef REG_MULTIPLE
- "MULTIPLE",
-#endif
-#ifndef REG_MULTIREF
- "MULTIREF",
-#endif
-#ifndef REG_MUSTDELIM
- "MUSTDELIM",
-#endif
-#ifndef REG_NEWLINE
- "NEWLINE",
-#endif
-#ifndef REG_NOTBOL
- "NOTBOL",
-#endif
-#ifndef REG_NOTEOL
- "NOTEOL",
-#endif
-#ifndef REG_NULL
- "NULL",
-#endif
-#ifndef REG_RIGHT
- "RIGHT",
-#endif
-#ifndef REG_SHELL_DOT
- "SHELL_DOT",
-#endif
-#ifndef REG_SHELL_ESCAPED
- "SHELL_ESCAPED",
-#endif
-#ifndef REG_SHELL_GROUP
- "SHELL_GROUP",
-#endif
-#ifndef REG_SHELL_PATH
- "SHELL_PATH",
-#endif
-#ifndef REG_SPAN
- "SPAN",
-#endif
-#if REG_NOSUB & REG_TEST_DEFAULT
- "SUBMATCH",
-#endif
-#if !_REG_nexec
- "regnexec",
-#endif
-#if !_REG_subcomp
- "regsubcomp",
-#endif
- 0
-};
-
-#ifndef REG_COMMENT
-#define REG_COMMENT NOTEST
-#endif
-#ifndef REG_DELIMITED
-#define REG_DELIMITED NOTEST
-#endif
-#ifndef REG_ESCAPE
-#define REG_ESCAPE NOTEST
-#endif
-#ifndef REG_ICASE
-#define REG_ICASE NOTEST
-#endif
-#ifndef REG_LEFT
-#define REG_LEFT NOTEST
-#endif
-#ifndef REG_LENIENT
-#define REG_LENIENT 0
-#endif
-#ifndef REG_MINIMAL
-#define REG_MINIMAL NOTEST
-#endif
-#ifndef REG_MULTIPLE
-#define REG_MULTIPLE NOTEST
-#endif
-#ifndef REG_MULTIREF
-#define REG_MULTIREF NOTEST
-#endif
-#ifndef REG_MUSTDELIM
-#define REG_MUSTDELIM NOTEST
-#endif
-#ifndef REG_NEWLINE
-#define REG_NEWLINE NOTEST
-#endif
-#ifndef REG_NOTBOL
-#define REG_NOTBOL NOTEST
-#endif
-#ifndef REG_NOTEOL
-#define REG_NOTEOL NOTEST
-#endif
-#ifndef REG_NULL
-#define REG_NULL NOTEST
-#endif
-#ifndef REG_RIGHT
-#define REG_RIGHT NOTEST
-#endif
-#ifndef REG_SHELL_DOT
-#define REG_SHELL_DOT NOTEST
-#endif
-#ifndef REG_SHELL_ESCAPED
-#define REG_SHELL_ESCAPED NOTEST
-#endif
-#ifndef REG_SHELL_GROUP
-#define REG_SHELL_GROUP NOTEST
-#endif
-#ifndef REG_SHELL_PATH
-#define REG_SHELL_PATH NOTEST
-#endif
-#ifndef REG_SPAN
-#define REG_SPAN NOTEST
-#endif
-
-#define REG_UNKNOWN (-1)
-
-#ifndef REG_ENEWLINE
-#define REG_ENEWLINE (REG_UNKNOWN-1)
-#endif
-#ifndef REG_ENULL
-#ifndef REG_EMPTY
-#define REG_ENULL (REG_UNKNOWN-2)
-#else
-#define REG_ENULL REG_EMPTY
-#endif
-#endif
-#ifndef REG_ECOUNT
-#define REG_ECOUNT (REG_UNKNOWN-3)
-#endif
-#ifndef REG_BADESC
-#define REG_BADESC (REG_UNKNOWN-4)
-#endif
-#ifndef REG_EMEM
-#define REG_EMEM (REG_UNKNOWN-5)
-#endif
-#ifndef REG_EHUNG
-#define REG_EHUNG (REG_UNKNOWN-6)
-#endif
-#ifndef REG_EBUS
-#define REG_EBUS (REG_UNKNOWN-7)
-#endif
-#ifndef REG_EFAULT
-#define REG_EFAULT (REG_UNKNOWN-8)
-#endif
-#ifndef REG_EFLAGS
-#define REG_EFLAGS (REG_UNKNOWN-9)
-#endif
-#ifndef REG_EDELIM
-#define REG_EDELIM (REG_UNKNOWN-9)
-#endif
-
-static const struct { int code; char* name; } codes[] =
-{
- {REG_UNKNOWN, "UNKNOWN"},
- {REG_NOMATCH, "NOMATCH"},
- {REG_BADPAT, "BADPAT"},
- {REG_ECOLLATE, "ECOLLATE"},
- {REG_ECTYPE, "ECTYPE"},
- {REG_EESCAPE, "EESCAPE"},
- {REG_ESUBREG, "ESUBREG"},
- {REG_EBRACK, "EBRACK"},
- {REG_EPAREN, "EPAREN"},
- {REG_EBRACE, "EBRACE"},
- {REG_BADBR, "BADBR"},
- {REG_ERANGE, "ERANGE"},
- {REG_ESPACE, "ESPACE"},
- {REG_BADRPT, "BADRPT"},
- {REG_ENEWLINE, "ENEWLINE"},
- {REG_ENULL, "ENULL"},
- {REG_ECOUNT, "ECOUNT"},
- {REG_BADESC, "BADESC"},
- {REG_EMEM, "EMEM"},
- {REG_EHUNG, "EHUNG"},
- {REG_EBUS, "EBUS"},
- {REG_EFAULT, "EFAULT"},
- {REG_EFLAGS, "EFLAGS"},
- {REG_EDELIM, "EDELIM"},
-};
-
-static struct
-{
- regmatch_t NOMATCH;
- int errors;
- int extracted;
- int ignored;
- int lineno;
- int passed;
- int signals;
- int unspecified;
- int verify;
- int warnings;
- char* file;
- char* stack;
- char* which;
- jmp_buf gotcha;
-#ifdef REG_DISCIPLINE
- Disc_t disc;
-#endif
-} state;
-
-static void
-quote(char* s, int len, unsigned long test)
-{
- unsigned char* u = (unsigned char*)s;
- unsigned char* e;
- int c;
-
- if (!u)
- printf("NIL");
- else if (!*u && len <= 1)
- printf("NULL");
- else if (test & TEST_EXPAND)
- {
- if (len < 0)
- len = strlen((char*)u);
- e = u + len;
- if (test & TEST_DELIMIT)
- printf("\"");
- while (u < e)
- switch (c = *u++)
- {
- case '\\':
- printf("\\\\");
- break;
- case '"':
- if (test & TEST_DELIMIT)
- printf("\\\"");
- else
- printf("\"");
- break;
- case '\a':
- printf("\\a");
- break;
- case '\b':
- printf("\\b");
- break;
- case 033:
- printf("\\e");
- break;
- case '\f':
- printf("\\f");
- break;
- case '\n':
- printf("\\n");
- break;
- case '\r':
- printf("\\r");
- break;
- case '\t':
- printf("\\t");
- break;
- case '\v':
- printf("\\v");
- break;
- default:
- if (!iscntrl(c) && isprint(c))
- putchar(c);
- else
- printf("\\x%02x", c);
- break;
- }
- if (test & TEST_DELIMIT)
- printf("\"");
- }
- else
- printf("%s", s);
-}
-
-static void
-report(char* comment, char* fun, char* re, char* s, int len, char* msg, int flags, unsigned long test)
-{
- if (state.file)
- printf("%s:", state.file);
- printf("%d:", state.lineno);
- if (re)
- {
- printf(" ");
- quote(re, -1, test|TEST_DELIMIT);
- if (s)
- {
- printf(" versus ");
- quote(s, len, test|TEST_DELIMIT);
- }
- }
- if (test & TEST_UNSPECIFIED)
- {
- state.unspecified++;
- printf(" unspecified behavior");
- }
- else
- state.errors++;
- if (state.which)
- printf(" %s", state.which);
- if (flags & REG_NOSUB)
- printf(" NOSUB");
- if (fun)
- printf(" %s", fun);
- if (comment[strlen(comment)-1] == '\n')
- printf(" %s", comment);
- else
- {
- printf(" %s: ", comment);
- if (msg)
- printf("%s: ", msg);
- }
-}
-
-static void
-error(regex_t* preg, int code)
-{
- char* msg;
- char buf[256];
-
- switch (code)
- {
- case REG_EBUS:
- msg = "bus error";
- break;
- case REG_EFAULT:
- msg = "memory fault";
- break;
- case REG_EHUNG:
- msg = "did not terminate";
- break;
- default:
- regerror(code, preg, msg = buf, sizeof buf);
- break;
- }
- printf("%s\n", msg);
-}
-
-static void
-bad(char* comment, char* re, char* s, int len, unsigned long test)
-{
- printf("bad test case ");
- report(comment, NiL, re, s, len, NiL, 0, test);
- exit(1);
-}
-
-static int
-escape(char* s)
-{
- char* b;
- char* t;
- char* q;
- char* e;
- int c;
-
- for (b = t = s; (*t = *s); s++, t++)
- if (*s == '\\')
- switch (*++s)
- {
- case '\\':
- break;
- case 'a':
- *t = '\a';
- break;
- case 'b':
- *t = '\b';
- break;
- case 'c':
- if ((*t = *++s))
- *t &= 037;
- else
- s--;
- break;
- case 'e':
- case 'E':
- *t = 033;
- break;
- case 'f':
- *t = '\f';
- break;
- case 'n':
- *t = '\n';
- break;
- case 'r':
- *t = '\r';
- break;
- case 's':
- *t = ' ';
- break;
- case 't':
- *t = '\t';
- break;
- case 'v':
- *t = '\v';
- break;
- case 'u':
- case 'x':
- c = 0;
- q = c == 'u' ? (s + 5) : (char*)0;
- e = s + 1;
- while (!e || !q || s < q)
- {
- switch (*++s)
- {
- case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
- c = (c << 4) + *s - 'a' + 10;
- continue;
- case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
- c = (c << 4) + *s - 'A' + 10;
- continue;
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7': case '8': case '9':
- c = (c << 4) + *s - '0';
- continue;
- case '{':
- case '[':
- if (s != e)
- {
- s--;
- break;
- }
- e = 0;
- continue;
- case '}':
- case ']':
- if (e)
- s--;
- break;
- default:
- s--;
- break;
- }
- break;
- }
- *t = c;
- break;
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- c = *s - '0';
- q = s + 2;
- while (s < q)
- {
- switch (*++s)
- {
- case '0': case '1': case '2': case '3':
- case '4': case '5': case '6': case '7':
- c = (c << 3) + *s - '0';
- break;
- default:
- q = --s;
- break;
- }
- }
- *t = c;
- break;
- default:
- *(s + 1) = 0;
- bad("invalid C \\ escape\n", s - 1, NiL, 0, 0);
- }
- return t - b;
-}
-
-static void
-matchoffprint(int off)
-{
- switch (off)
- {
- case -2:
- printf("X");
- break;
- case -1:
- printf("?");
- break;
- default:
- printf("%d", off);
- break;
- }
-}
-
-static void
-matchprint(regmatch_t* match, int nmatch, int nsub, char* ans, unsigned long test)
-{
- int i;
-
- for (; nmatch > nsub + 1; nmatch--)
- if ((match[nmatch-1].rm_so != -1 || match[nmatch-1].rm_eo != -1) && (!(test & TEST_IGNORE_POSITION) || (match[nmatch-1].rm_so >= 0 && match[nmatch-1].rm_eo >= 0)))
- break;
- for (i = 0; i < nmatch; i++)
- {
- printf("(");
- matchoffprint(match[i].rm_so);
- printf(",");
- matchoffprint(match[i].rm_eo);
- printf(")");
- }
- if (!(test & (TEST_ACTUAL|TEST_BASELINE)))
- {
- if (ans)
- printf(" expected: %s", ans);
- printf("\n");
- }
-}
-
-static int
-matchcheck(regmatch_t* match, int nmatch, int nsub, char* ans, char* re, char* s, int len, int flags, unsigned long test)
-{
- char* p;
- int i;
- int m;
- int n;
-
- if (streq(ans, "OK"))
- return test & (TEST_BASELINE|TEST_PASS|TEST_VERIFY);
- for (i = 0, p = ans; i < nmatch && *p; i++)
- {
- if (*p == '{')
- {
-#ifdef REG_DISCIPLINE
- char* x;
-
- x = sfstruse(state.disc.sp);
- if (strcmp(p, x))
- {
- if (test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_QUERY|TEST_SUMMARY|TEST_VERIFY))
- return 0;
- report("callout failed", NiL, re, s, len, NiL, flags, test);
- quote(p, -1, test);
- printf(" expected, ");
- quote(x, -1, test);
- printf(" returned\n");
- }
-#endif
- break;
- }
- if (*p++ != '(')
- bad("improper answer\n", re, s, -1, test);
- if (*p == '?')
- {
- m = -1;
- p++;
- }
- else
- m = strtol(p, &p, 10);
- if (*p++ != ',')
- bad("improper answer\n", re, s, -1, test);
- if (*p == '?')
- {
- n = -1;
- p++;
- }
- else
- n = strtol(p, &p, 10);
- if (*p++ != ')')
- bad("improper answer\n", re, s, -1, test);
- if (m!=match[i].rm_so || n!=match[i].rm_eo)
- {
- if (!(test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_QUERY|TEST_SUMMARY|TEST_VERIFY)))
- {
- report("failed: match was", NiL, re, s, len, NiL, flags, test);
- matchprint(match, nmatch, nsub, ans, test);
- }
- return 0;
- }
- }
- for (; i < nmatch; i++)
- {
- if (match[i].rm_so!=-1 || match[i].rm_eo!=-1)
- {
- if (!(test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_QUERY|TEST_VERIFY)))
- {
- if ((test & TEST_IGNORE_POSITION) && (match[i].rm_so<0 || match[i].rm_eo<0))
- {
- state.ignored++;
- return 0;
- }
- if (!(test & TEST_SUMMARY))
- {
- report("failed: match was", NiL, re, s, len, NiL, flags, test);
- matchprint(match, nmatch, nsub, ans, test);
- }
- }
- return 0;
- }
- }
- if (!(test & TEST_IGNORE_OVER) && match[nmatch].rm_so != state.NOMATCH.rm_so)
- {
- if (!(test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_QUERY|TEST_SUMMARY|TEST_VERIFY)))
- {
- report("failed: overran match array", NiL, re, s, len, NiL, flags, test);
- matchprint(match, nmatch + 1, nsub, NiL, test);
- }
- return 0;
- }
- return 1;
-}
-
-static void
-sigunblock(int s)
-{
-#ifdef SIG_SETMASK
- int op;
- sigset_t mask;
-
- sigemptyset(&mask);
- if (s)
- {
- sigaddset(&mask, s);
- op = SIG_UNBLOCK;
- }
- else op = SIG_SETMASK;
- sigprocmask(op, &mask, NiL);
-#else
-#ifdef sigmask
- sigsetmask(s ? (sigsetmask(0L) & ~sigmask(s)) : 0L);
-#endif
-#endif
-}
-
-static void
-gotcha(int sig)
-{
- int ret;
-
- signal(sig, gotcha);
- alarm(0);
- state.signals++;
- switch (sig)
- {
- case SIGALRM:
- ret = REG_EHUNG;
- break;
- case SIGBUS:
- ret = REG_EBUS;
- break;
- default:
- ret = REG_EFAULT;
- break;
- }
- sigunblock(sig);
- longjmp(state.gotcha, ret);
-}
-
-static char*
-my_getline(FILE* fp)
-{
- static char buf[32 * 1024];
-
- register char* s = buf;
- register char* e = &buf[sizeof(buf)];
- register char* b;
-
- for (;;)
- {
- if (!(b = fgets(s, e - s, fp)))
- return 0;
- state.lineno++;
- s += strlen(s);
- if (s == b || *--s != '\n' || s == b || *(s - 1) != '\\')
- {
- *s = 0;
- break;
- }
- s--;
- }
- return buf;
-}
-
-static unsigned long
-note(unsigned long level, char* msg, unsigned long skip, unsigned long test)
-{
- if (!(test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_SUMMARY)) && !skip)
- {
- printf("NOTE\t");
- if (msg)
- printf("%s: ", msg);
- printf("skipping lines %d", state.lineno);
- }
- return skip | level;
-}
-
-#define TABS(n) &ts[7-((n)&7)]
-
-static char ts[] = "\t\t\t\t\t\t\t";
-
-static unsigned long
-extract(int* tabs, char* spec, char* re, char* s, char* ans, char* msg, char* accept, regmatch_t* match, int nmatch, int nsub, unsigned long skip, unsigned long level, unsigned long test)
-{
- if (test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_OK|TEST_PASS|TEST_SUMMARY))
- {
- state.extracted = 1;
- if (test & TEST_OK)
- {
- state.passed++;
- if ((test & TEST_VERIFY) && !(test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_SUMMARY)))
- {
- if (msg && strcmp(msg, "EXPECTED"))
- printf("NOTE\t%s\n", msg);
- return skip;
- }
- test &= ~(TEST_PASS|TEST_QUERY);
- }
- if (test & (TEST_QUERY|TEST_VERIFY))
- {
- if (test & TEST_BASELINE)
- test &= ~(TEST_BASELINE|TEST_PASS);
- else
- test |= TEST_PASS;
- skip |= level;
- }
- if (!(test & TEST_OK))
- {
- if (test & TEST_UNSPECIFIED)
- state.unspecified++;
- else
- state.errors++;
- }
- if (test & (TEST_PASS|TEST_SUMMARY))
- return skip;
- test &= ~TEST_DELIMIT;
- printf("%s%s", spec, TABS(*tabs++));
- if ((test & (TEST_BASELINE|TEST_SAME)) == (TEST_BASELINE|TEST_SAME))
- printf("SAME");
- else
- quote(re, -1, test);
- printf("%s", TABS(*tabs++));
- quote(s, -1, test);
- printf("%s", TABS(*tabs++));
- if (!(test & (TEST_ACTUAL|TEST_BASELINE)) || (!accept && !match))
- printf("%s", ans);
- else if (accept)
- printf("%s", accept);
- else
- matchprint(match, nmatch, nsub, NiL, test);
- if (msg)
- printf("%s%s", TABS(*tabs++), msg);
- putchar('\n');
- }
- else if (test & TEST_QUERY)
- skip = note(level, msg, skip, test);
- else if (test & TEST_VERIFY)
- state.extracted = 1;
- return skip;
-}
-
-static int
-catchfree(regex_t* preg, int flags, int* tabs, char* spec, char* re, char* s, char* ans, char* msg, char* accept, regmatch_t* match, int nmatch, int nsub, unsigned long skip, unsigned long level, unsigned long test)
-{
- int eret;
-
- if (!(test & TEST_CATCH))
- {
- regfree(preg);
- eret = 0;
- }
- else if (!(eret = setjmp(state.gotcha)))
- {
- alarm(HUNG);
- regfree(preg);
- alarm(0);
- }
- else if (test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_QUERY|TEST_SUMMARY|TEST_VERIFY))
- extract(tabs, spec, re, s, ans, msg, NiL, NiL, 0, 0, skip, level, test);
- else
- {
- report("failed", "regfree", re, NiL, -1, msg, flags, test);
- error(preg, eret);
- }
- return eret;
-}
-
-int
-old_main(int unused_param_argc, char** argv)
-{
- int flags;
- int cflags;
- int eflags;
- int nmatch;
- int nexec;
- int nstr;
- int cret;
- int eret;
- int nsub;
- int i;
- int j;
- int expected;
- int got;
- int locale;
- int subunitlen = 0;
- int testno;
- unsigned long level;
- unsigned long skip;
- char* p;
- char* line;
- char* spec;
- char* re;
- char* s;
- char* ans;
- char* msg;
- char* fun;
- char* ppat = NULL;
- char* subunit = NULL;
- char* version;
- char* field[6];
- char* delim[6];
- FILE* fp;
- int tabs[6];
- char unit[64];
- regmatch_t match[100];
- regex_t preg;
-
- static char pat[32 * 1024];
-
- int nonosub = REG_NOSUB == 0;
- int nonexec = 0;
-
- unsigned long test = 0;
-
- static char* filter[] = { "-", 0 };
-
- state.NOMATCH.rm_so = state.NOMATCH.rm_eo = -2;
- p = unit;
- version = (char*)id + 10;
- while (p < &unit[sizeof(unit)-1] && (*p = *version++) && !isspace(*p))
- p++;
- *p = 0;
- while ((p = *++argv) && *p == '-')
- for (;;)
- {
- switch (*++p)
- {
- case 0:
- break;
- case 'c':
- test |= TEST_CATCH;
- continue;
- case 'e':
- test |= TEST_IGNORE_ERROR;
- continue;
- case 'h':
- case '?':
- help(0);
- return 2;
- case '-':
- help(p[1] == 'h');
- return 2;
- case 'n':
- nonexec = 1;
- continue;
- case 'o':
- test |= TEST_IGNORE_OVER;
- continue;
- case 'p':
- test |= TEST_IGNORE_POSITION;
- continue;
- case 's':
-#ifdef REG_DISCIPLINE
- if (!(state.stack = stkalloc(stkstd, 0)))
- fprintf(stderr, "%s: out of space [stack]", unit);
- state.disc.disc.re_resizef = resizef;
- state.disc.disc.re_resizehandle = (void*)stkstd;
-#endif
- continue;
- case 'x':
- nonosub = 1;
- continue;
- case 'v':
- test |= TEST_VERBOSE;
- continue;
- case 'A':
- test |= TEST_ACTUAL;
- continue;
- case 'B':
- test |= TEST_BASELINE;
- continue;
- case 'F':
- test |= TEST_FAIL;
- continue;
- case 'P':
- test |= TEST_PASS;
- continue;
- case 'S':
- test |= TEST_SUMMARY;
- continue;
- default:
- fprintf(stderr, "%s: %c: invalid option\n", unit, *p);
- return 2;
- }
- break;
- }
- if (!*argv)
- argv = filter;
- locale = 0;
- while ((state.file = *argv++))
- {
- if (streq(state.file, "-") || streq(state.file, "/dev/stdin") || streq(state.file, "/dev/fd/0"))
- {
- state.file = 0;
- fp = stdin;
- }
- else if (!(fp = fopen(state.file, "r")))
- {
- fprintf(stderr, "%s: %s: cannot read\n", unit, state.file);
- return 2;
- }
- testno = state.errors = state.ignored = state.lineno = state.passed =
- state.signals = state.unspecified = state.warnings = 0;
- skip = 0;
- level = 1;
- if (!(test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_SUMMARY)))
- {
- printf("TEST\t%s ", unit);
- if ((s = state.file))
- {
- subunit = p = 0;
- for (;;)
- {
- switch (*s++)
- {
- case 0:
- break;
- case '/':
- subunit = s;
- continue;
- case '.':
- p = s - 1;
- continue;
- default:
- continue;
- }
- break;
- }
- if (!subunit)
- subunit = state.file;
- if (p < subunit)
- p = s - 1;
- subunitlen = p - subunit;
- printf("%-.*s ", subunitlen, subunit);
- }
- else
- subunit = 0;
- for (s = version; *s && (*s != ' ' || *(s + 1) != '$'); s++)
- putchar(*s);
- if (test & TEST_CATCH)
- printf(", catch");
- if (test & TEST_IGNORE_ERROR)
- printf(", ignore error code mismatches");
- if (test & TEST_IGNORE_POSITION)
- printf(", ignore negative position mismatches");
-#ifdef REG_DISCIPLINE
- if (state.stack)
- printf(", stack");
-#endif
- if (test & TEST_VERBOSE)
- printf(", verbose");
- printf("\n");
-#ifdef REG_VERSIONID
- if (regerror(REG_VERSIONID, NiL, pat, sizeof(pat)) > 0)
- s = pat;
- else
-#endif
-#ifdef REG_TEST_VERSION
- s = REG_TEST_VERSION;
-#else
- s = "regex";
-#endif
- printf("NOTE\t%s\n", s);
- if (elementsof(unsupported) > 1)
- {
-#if (REG_TEST_DEFAULT & (REG_AUGMENTED|REG_EXTENDED|REG_SHELL)) || !defined(REG_EXTENDED)
- i = 0;
-#else
- i = REG_EXTENDED != 0;
-#endif
- for (got = 0; i < elementsof(unsupported) - 1; i++)
- {
- if (!got)
- {
- got = 1;
- printf("NOTE\tunsupported: %s", unsupported[i]);
- }
- else
- printf(",%s", unsupported[i]);
- }
- if (got)
- printf("\n");
- }
- }
-#ifdef REG_DISCIPLINE
- state.disc.disc.re_version = REG_VERSION;
- state.disc.disc.re_compf = compf;
- state.disc.disc.re_execf = execf;
- if (!(state.disc.sp = sfstropen()))
- bad("out of space [discipline string stream]\n", NiL, NiL, 0, 0);
- preg.re_disc = &state.disc.disc;
-#endif
- if (test & TEST_CATCH)
- {
- signal(SIGALRM, gotcha);
- signal(SIGBUS, gotcha);
- signal(SIGSEGV, gotcha);
- }
- while ((p = my_getline(fp)))
- {
-
- /* parse: */
-
- line = p;
- if (*p == ':' && !isspace(*(p + 1)))
- {
- while (*++p && *p != ':');
- if (!*p++)
- {
- if (test & TEST_BASELINE)
- printf("%s\n", line);
- continue;
- }
- }
- while (isspace(*p))
- p++;
- if (*p == 0 || *p == '#' || *p == 'T')
- {
- if (test & TEST_BASELINE)
- printf("%s\n", line);
- continue;
- }
- if (*p == ':' || *p == 'N')
- {
- if (test & TEST_BASELINE)
- printf("%s\n", line);
- else if (!(test & (TEST_ACTUAL|TEST_FAIL|TEST_PASS|TEST_SUMMARY)))
- {
- while (*++p && !isspace(*p));
- while (isspace(*p))
- p++;
- printf("NOTE %s\n", p);
- }
- continue;
- }
- j = 0;
- i = 0;
- field[i++] = p;
- for (;;)
- {
- switch (*p++)
- {
- case 0:
- p--;
- j = 0;
- goto checkfield;
- case '\t':
- *(delim[i] = p - 1) = 0;
- j = 1;
- checkfield:
- s = field[i - 1];
- if (streq(s, "NIL"))
- field[i - 1] = 0;
- else if (streq(s, "NULL"))
- *s = 0;
- while (*p == '\t')
- {
- p++;
- j++;
- }
- tabs[i - 1] = j;
- if (!*p)
- break;
- if (i >= elementsof(field))
- bad("too many fields\n", NiL, NiL, 0, 0);
- field[i++] = p;
- /*FALLTHROUGH*/
- default:
- continue;
- }
- break;
- }
- if (!(spec = field[0]))
- bad("NIL spec\n", NiL, NiL, 0, 0);
-
- /* interpret: */
-
- cflags = REG_TEST_DEFAULT;
- eflags = REG_EXEC_DEFAULT;
- test &= TEST_GLOBAL;
- state.extracted = 0;
- nmatch = 20;
- nsub = -1;
- for (p = spec; *p; p++)
- {
- if (isdigit(*p))
- {
- nmatch = strtol(p, &p, 10);
- if (nmatch >= elementsof(match))
- bad("nmatch must be < 100\n", NiL, NiL, 0, 0);
- p--;
- continue;
- }
- switch (*p)
- {
- case 'A':
- test |= TEST_ARE;
- continue;
- case 'B':
- test |= TEST_BRE;
- continue;
- case 'C':
- if (!(test & TEST_QUERY) && !(skip & level))
- bad("locale must be nested\n", NiL, NiL, 0, 0);
- test &= ~TEST_QUERY;
- if (locale)
- bad("locale nesting not supported\n", NiL, NiL, 0, 0);
- if (i != 2)
- bad("locale field expected\n", NiL, NiL, 0, 0);
- if (!(skip & level))
- {
-#if defined(LC_COLLATE) && defined(LC_CTYPE)
- s = field[1];
- if (!s || streq(s, "POSIX"))
- s = "C";
- if (!(ans = setlocale(LC_COLLATE, s)) || streq(ans, "C") || streq(ans, "POSIX") || !(ans = setlocale(LC_CTYPE, s)) || streq(ans, "C") || streq(ans, "POSIX"))
- skip = note(level, s, skip, test);
- else
- {
- if (!(test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_SUMMARY)))
- printf("NOTE \"%s\" locale\n", s);
- locale = level;
- }
-#else
- skip = note(level, skip, test, "locales not supported");
-#endif
- }
- cflags = NOTEST;
- continue;
- case 'E':
- test |= TEST_ERE;
- continue;
- case 'K':
- test |= TEST_KRE;
- continue;
- case 'L':
- test |= TEST_LRE;
- continue;
- case 'S':
- test |= TEST_SRE;
- continue;
-
- case 'a':
- cflags |= REG_LEFT|REG_RIGHT;
- continue;
- case 'b':
- eflags |= REG_NOTBOL;
- continue;
- case 'c':
- cflags |= REG_COMMENT;
- continue;
- case 'd':
- cflags |= REG_SHELL_DOT;
- continue;
- case 'e':
- eflags |= REG_NOTEOL;
- continue;
- case 'f':
- cflags |= REG_MULTIPLE;
- continue;
- case 'g':
- cflags |= NOTEST;
- continue;
- case 'h':
- cflags |= REG_MULTIREF;
- continue;
- case 'i':
- cflags |= REG_ICASE;
- continue;
- case 'j':
- cflags |= REG_SPAN;
- continue;
- case 'k':
- cflags |= REG_ESCAPE;
- continue;
- case 'l':
- cflags |= REG_LEFT;
- continue;
- case 'm':
- cflags |= REG_MINIMAL;
- continue;
- case 'n':
- cflags |= REG_NEWLINE;
- continue;
- case 'o':
- cflags |= REG_SHELL_GROUP;
- continue;
- case 'p':
- cflags |= REG_SHELL_PATH;
- continue;
- case 'q':
- cflags |= REG_DELIMITED;
- continue;
- case 'r':
- cflags |= REG_RIGHT;
- continue;
- case 's':
- cflags |= REG_SHELL_ESCAPED;
- continue;
- case 't':
- cflags |= REG_MUSTDELIM;
- continue;
- case 'u':
- test |= TEST_UNSPECIFIED;
- continue;
- case 'w':
- cflags |= REG_NOSUB;
- continue;
- case 'x':
- if (REG_LENIENT)
- cflags |= REG_LENIENT;
- else
- test |= TEST_LENIENT;
- continue;
- case 'y':
- eflags |= REG_LEFT;
- continue;
- case 'z':
- cflags |= REG_NULL;
- continue;
-
- case '$':
- test |= TEST_EXPAND;
- continue;
-
- case '/':
- test |= TEST_SUB;
- continue;
-
- case '?':
- test |= TEST_VERIFY;
- test &= ~(TEST_AND|TEST_OR);
- state.verify = state.passed;
- continue;
- case '&':
- test |= TEST_VERIFY|TEST_AND;
- test &= ~TEST_OR;
- continue;
- case '|':
- test |= TEST_VERIFY|TEST_OR;
- test &= ~TEST_AND;
- continue;
- case ';':
- test |= TEST_OR;
- test &= ~TEST_AND;
- continue;
-
- case '{':
- level <<= 1;
- if (skip & (level >> 1))
- {
- skip |= level;
- cflags = NOTEST;
- }
- else
- {
- skip &= ~level;
- test |= TEST_QUERY;
- }
- continue;
- case '}':
- if (level == 1)
- bad("invalid {...} nesting\n", NiL, NiL, 0, 0);
- if ((skip & level) && !(skip & (level>>1)))
- {
- if (!(test & (TEST_BASELINE|TEST_SUMMARY)))
- {
- if (test & (TEST_ACTUAL|TEST_FAIL))
- printf("}\n");
- else if (!(test & TEST_PASS))
- printf("-%d\n", state.lineno);
- }
- }
-#if defined(LC_COLLATE) && defined(LC_CTYPE)
- else if (locale & level)
- {
- locale = 0;
- if (!(skip & level))
- {
- s = "C";
- setlocale(LC_COLLATE, s);
- setlocale(LC_CTYPE, s);
- if (!(test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_SUMMARY)))
- printf("NOTE \"%s\" locale\n", s);
- else if (test & (TEST_ACTUAL|TEST_BASELINE|TEST_PASS))
- printf("}\n");
- }
- else if (test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL))
- printf("}\n");
- }
-#endif
- level >>= 1;
- cflags = NOTEST;
- continue;
-
- default:
- bad("bad spec\n", spec, NiL, 0, test);
- break;
-
- }
- break;
- }
- if ((cflags|eflags) == NOTEST || ((skip & level) && (test & TEST_BASELINE)))
- {
- if (test & TEST_BASELINE)
- {
- while (i > 1)
- *delim[--i] = '\t';
- printf("%s\n", line);
- }
- continue;
- }
- if (test & TEST_OR)
- {
- if (!(test & TEST_VERIFY))
- {
- test &= ~TEST_OR;
- if (state.passed == state.verify && i > 1)
- printf("NOTE\t%s\n", field[1]);
- continue;
- }
- else if (state.passed > state.verify)
- continue;
- }
- else if (test & TEST_AND)
- {
- if (state.passed == state.verify)
- continue;
- state.passed = state.verify;
- }
- if (i < 4)
- bad("too few fields\n", NiL, NiL, 0, test);
- while (i < elementsof(field))
- field[i++] = 0;
- if ((re = field[1]))
- {
- if (streq(re, "SAME"))
- {
- re = ppat;
- test |= TEST_SAME;
- }
- else
- {
- if (test & TEST_EXPAND)
- escape(re);
- strcpy(ppat = pat, re);
- }
- }
- else
- ppat = 0;
- nstr = -1;
- if ((s = field[2]) && (test & TEST_EXPAND))
- {
- nstr = escape(s);
-#if _REG_nexec
- if (nstr != strlen(s))
- nexec = nstr;
-#endif
- }
- if (!(ans = field[3]))
- bad("NIL answer\n", NiL, NiL, 0, test);
- msg = field[4];
- fflush(stdout);
- if (test & TEST_SUB)
-#if _REG_subcomp
- cflags |= REG_DELIMITED;
-#else
- continue;
-#endif
-
- compile:
-
- if (state.extracted || (skip & level))
- continue;
-#if !(REG_TEST_DEFAULT & (REG_AUGMENTED|REG_EXTENDED|REG_SHELL))
-#ifdef REG_EXTENDED
- if (REG_EXTENDED != 0 && (test & TEST_BRE))
-#else
- if (test & TEST_BRE)
-#endif
- {
- test &= ~TEST_BRE;
- flags = cflags;
- state.which = "BRE";
- }
- else
-#endif
-#ifdef REG_EXTENDED
- if (test & TEST_ERE)
- {
- test &= ~TEST_ERE;
- flags = cflags | REG_EXTENDED;
- state.which = "ERE";
- }
- else
-#endif
-#ifdef REG_AUGMENTED
- if (test & TEST_ARE)
- {
- test &= ~TEST_ARE;
- flags = cflags | REG_AUGMENTED;
- state.which = "ARE";
- }
- else
-#endif
-#ifdef REG_LITERAL
- if (test & TEST_LRE)
- {
- test &= ~TEST_LRE;
- flags = cflags | REG_LITERAL;
- state.which = "LRE";
- }
- else
-#endif
-#ifdef REG_SHELL
- if (test & TEST_SRE)
- {
- test &= ~TEST_SRE;
- flags = cflags | REG_SHELL;
- state.which = "SRE";
- }
- else
-#ifdef REG_AUGMENTED
- if (test & TEST_KRE)
- {
- test &= ~TEST_KRE;
- flags = cflags | REG_SHELL | REG_AUGMENTED;
- state.which = "KRE";
- }
- else
-#endif
-#endif
- {
- if (test & (TEST_BASELINE|TEST_PASS|TEST_VERIFY))
- extract(tabs, line, re, s, ans, msg, NiL, NiL, 0, 0, skip, level, test|TEST_OK);
- continue;
- }
- if ((test & (TEST_QUERY|TEST_VERBOSE|TEST_VERIFY)) == TEST_VERBOSE)
- {
- printf("test %-3d %s ", state.lineno, state.which);
- quote(re, -1, test|TEST_DELIMIT);
- printf(" ");
- quote(s, nstr, test|TEST_DELIMIT);
- printf("\n");
- }
-
- nosub:
- fun = "regcomp";
-#if _REG_nexec
- if (nstr >= 0 && nstr != strlen(s))
- nexec = nstr;
-
- else
-#endif
- nexec = -1;
- if (state.extracted || (skip & level))
- continue;
- if (!(test & TEST_QUERY))
- testno++;
-#ifdef REG_DISCIPLINE
- if (state.stack)
- stkset(stkstd, state.stack, 0);
- flags |= REG_DISCIPLINE;
- state.disc.ordinal = 0;
- sfstrseek(state.disc.sp, 0, SEEK_SET);
-#endif
- if (!(test & TEST_CATCH))
- cret = regcomp(&preg, re, flags);
- else if (!(cret = setjmp(state.gotcha)))
- {
- alarm(HUNG);
- cret = regcomp(&preg, re, flags);
- alarm(0);
- }
-#if _REG_subcomp
- if (!cret && (test & TEST_SUB))
- {
- fun = "regsubcomp";
- p = re + preg.re_npat;
- if (!(test & TEST_CATCH))
- cret = regsubcomp(&preg, p, NiL, 0, 0);
- else if (!(cret = setjmp(state.gotcha)))
- {
- alarm(HUNG);
- cret = regsubcomp(&preg, p, NiL, 0, 0);
- alarm(0);
- }
- if (!cret && *(p += preg.re_npat) && !(preg.re_sub->re_flags & REG_SUB_LAST))
- {
- if (catchfree(&preg, flags, tabs, line, re, s, ans, msg, NiL, NiL, 0, 0, skip, level, test))
- continue;
- cret = REG_EFLAGS;
- }
- }
-#endif
- if (!cret)
- {
- if (!(flags & REG_NOSUB) && nsub < 0 && *ans == '(')
- {
- for (p = ans; *p; p++)
- if (*p == '(')
- nsub++;
- else if (*p == '{')
- nsub--;
- if (nsub >= 0)
- {
- if (test & TEST_IGNORE_OVER)
- {
- if (nmatch > nsub)
- nmatch = nsub + 1;
- }
- else if (nsub != preg.re_nsub)
- {
- if (nsub > preg.re_nsub)
- {
- if (test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_QUERY|TEST_SUMMARY|TEST_VERIFY))
- skip = extract(tabs, line, re, s, ans, msg, "OK", NiL, 0, 0, skip, level, test|TEST_DELIMIT);
- else
- {
- report("re_nsub incorrect", fun, re, NiL, -1, msg, flags, test);
- printf("at least %d expected, %zd returned\n", nsub, preg.re_nsub);
- state.errors++;
- }
- }
- else
- nsub = preg.re_nsub;
- }
- }
- }
- if (!(test & TEST_SUB) && *ans && *ans != '(' && !streq(ans, "OK") && !streq(ans, "NOMATCH"))
- {
- if (test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_QUERY|TEST_SUMMARY|TEST_VERIFY))
- skip = extract(tabs, line, re, s, ans, msg, "OK", NiL, 0, 0, skip, level, test|TEST_DELIMIT);
- else if (!(test & TEST_LENIENT))
- {
- report("failed", fun, re, NiL, -1, msg, flags, test);
- printf("%s expected, OK returned\n", ans);
- }
- catchfree(&preg, flags, tabs, line, re, s, ans, msg, NiL, NiL, 0, 0, skip, level, test);
- continue;
- }
- }
- else
- {
- if (test & TEST_LENIENT)
- /* we'll let it go this time */;
- else if (!*ans || ans[0]=='(' || (cret == REG_BADPAT && streq(ans, "NOMATCH")))
- {
- got = 0;
- for (i = 1; i < elementsof(codes); i++)
- if (cret==codes[i].code)
- got = i;
- if (test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_QUERY|TEST_SUMMARY|TEST_VERIFY))
- skip = extract(tabs, line, re, s, ans, msg, codes[got].name, NiL, 0, 0, skip, level, test|TEST_DELIMIT);
- else
- {
- report("failed", fun, re, NiL, -1, msg, flags, test);
- printf("%s returned: ", codes[got].name);
- error(&preg, cret);
- }
- }
- else
- {
- expected = got = 0;
- for (i = 1; i < elementsof(codes); i++)
- {
- if (streq(ans, codes[i].name))
- expected = i;
- if (cret==codes[i].code)
- got = i;
- }
- if (!expected)
- {
- if (test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_QUERY|TEST_SUMMARY|TEST_VERIFY))
- skip = extract(tabs, line, re, s, ans, msg, codes[got].name, NiL, 0, 0, skip, level, test|TEST_DELIMIT);
- else
- {
- report("failed: invalid error code", NiL, re, NiL, -1, msg, flags, test);
- printf("%s expected, %s returned\n", ans, codes[got].name);
- }
- }
- else if (cret != codes[expected].code && cret != REG_BADPAT)
- {
- if (test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_QUERY|TEST_SUMMARY|TEST_VERIFY))
- skip = extract(tabs, line, re, s, ans, msg, codes[got].name, NiL, 0, 0, skip, level, test|TEST_DELIMIT);
- else if (test & TEST_IGNORE_ERROR)
- state.ignored++;
- else
- {
- report("should fail and did", fun, re, NiL, -1, msg, flags, test);
- printf("%s expected, %s returned: ", ans, codes[got].name);
- state.errors--;
- state.warnings++;
- error(&preg, cret);
- }
- }
- }
- goto compile;
- }
-
-#if _REG_nexec
- execute:
- if (nexec >= 0)
- fun = "regnexec";
- else
-#endif
- fun = "regexec";
-
- for (i = 0; i < elementsof(match); i++)
- match[i] = state.NOMATCH;
-
-#if _REG_nexec
- if (nexec >= 0)
- {
- eret = regnexec(&preg, s, nexec, nmatch, match, eflags);
- s[nexec] = 0;
- }
- else
-#endif
- {
- if (!(test & TEST_CATCH))
- eret = regexec(&preg, s, nmatch, match, eflags);
- else if (!(eret = setjmp(state.gotcha)))
- {
- alarm(HUNG);
- eret = regexec(&preg, s, nmatch, match, eflags);
- alarm(0);
- }
- }
-#if _REG_subcomp
- if ((test & TEST_SUB) && !eret)
- {
- fun = "regsubexec";
- if (!(test & TEST_CATCH))
- eret = regsubexec(&preg, s, nmatch, match);
- else if (!(eret = setjmp(state.gotcha)))
- {
- alarm(HUNG);
- eret = regsubexec(&preg, s, nmatch, match);
- alarm(0);
- }
- }
-#endif
- if (flags & REG_NOSUB)
- {
- if (eret)
- {
- if (eret != REG_NOMATCH || !streq(ans, "NOMATCH"))
- {
- if (test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_QUERY|TEST_SUMMARY|TEST_VERIFY))
- skip = extract(tabs, line, re, s, ans, msg, "NOMATCH", NiL, 0, 0, skip, level, test|TEST_DELIMIT);
- else
- {
- report("REG_NOSUB failed", fun, re, s, nstr, msg, flags, test);
- error(&preg, eret);
- }
- }
- }
- else if (streq(ans, "NOMATCH"))
- {
- if (test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_QUERY|TEST_SUMMARY|TEST_VERIFY))
- skip = extract(tabs, line, re, s, ans, msg, NiL, match, nmatch, nsub, skip, level, test|TEST_DELIMIT);
- else
- {
- report("should fail and didn't", fun, re, s, nstr, msg, flags, test);
- error(&preg, eret);
- }
- }
- }
- else if (eret)
- {
- if (eret != REG_NOMATCH || !streq(ans, "NOMATCH"))
- {
- if (test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_QUERY|TEST_SUMMARY|TEST_VERIFY))
- skip = extract(tabs, line, re, s, ans, msg, "NOMATCH", NiL, 0, nsub, skip, level, test|TEST_DELIMIT);
- else
- {
- report("failed", fun, re, s, nstr, msg, flags, test);
- if (eret != REG_NOMATCH)
- error(&preg, eret);
- else if (*ans)
- printf("expected: %s\n", ans);
- else
- printf("\n");
- }
- }
- }
- else if (streq(ans, "NOMATCH"))
- {
- if (test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_QUERY|TEST_SUMMARY|TEST_VERIFY))
- skip = extract(tabs, line, re, s, ans, msg, NiL, match, nmatch, nsub, skip, level, test|TEST_DELIMIT);
- else
- {
- report("should fail and didn't", fun, re, s, nstr, msg, flags, test);
- matchprint(match, nmatch, nsub, NiL, test);
- }
- }
-#if _REG_subcomp
- else if (test & TEST_SUB)
- {
- p = preg.re_sub->re_buf;
- if (strcmp(p, ans))
- {
- report("failed", fun, re, s, nstr, msg, flags, test);
- quote(ans, -1, test|TEST_DELIMIT);
- printf(" expected, ");
- quote(p, -1, test|TEST_DELIMIT);
- printf(" returned\n");
- }
- }
-#endif
- else if (!*ans)
- {
- if (match[0].rm_so != state.NOMATCH.rm_so)
- {
- if (test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_QUERY|TEST_SUMMARY|TEST_VERIFY))
- skip = extract(tabs, line, re, s, ans, msg, NiL, NiL, 0, 0, skip, level, test);
- else
- {
- report("failed: no match but match array assigned", NiL, re, s, nstr, msg, flags, test);
- matchprint(match, nmatch, nsub, NiL, test);
- }
- }
- }
- else if (matchcheck(match, nmatch, nsub, ans, re, s, nstr, flags, test))
- {
-#if _REG_nexec
- if (nexec < 0 && !nonexec)
- {
- nexec = nstr >= 0 ? nstr : strlen(s);
- s[nexec] = '\n';
- testno++;
- goto execute;
- }
-#endif
- if (!(test & (TEST_SUB|TEST_VERIFY)) && !nonosub)
- {
- if (catchfree(&preg, flags, tabs, line, re, s, ans, msg, NiL, NiL, 0, 0, skip, level, test))
- continue;
- flags |= REG_NOSUB;
- goto nosub;
- }
- if (test & (TEST_BASELINE|TEST_PASS|TEST_VERIFY))
- skip = extract(tabs, line, re, s, ans, msg, NiL, match, nmatch, nsub, skip, level, test|TEST_OK);
- }
- else if (test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS|TEST_QUERY|TEST_SUMMARY|TEST_VERIFY))
- skip = extract(tabs, line, re, s, ans, msg, NiL, match, nmatch, nsub, skip, level, test|TEST_DELIMIT);
- if (catchfree(&preg, flags, tabs, line, re, s, ans, msg, NiL, NiL, 0, 0, skip, level, test))
- continue;
- goto compile;
- }
- if (test & TEST_SUMMARY)
- printf("tests=%-4d errors=%-4d warnings=%-2d ignored=%-2d unspecified=%-2d signals=%d\n", testno, state.errors, state.warnings, state.ignored, state.unspecified, state.signals);
- else if (!(test & (TEST_ACTUAL|TEST_BASELINE|TEST_FAIL|TEST_PASS)))
- {
- printf("TEST\t%s", unit);
- if (subunit)
- printf(" %-.*s", subunitlen, subunit);
- printf(", %d test%s", testno, testno == 1 ? "" : "s");
- if (state.ignored)
- printf(", %d ignored mismatch%s", state.ignored, state.ignored == 1 ? "" : "es");
- if (state.warnings)
- printf(", %d warning%s", state.warnings, state.warnings == 1 ? "" : "s");
- if (state.unspecified)
- printf(", %d unspecified difference%s", state.unspecified, state.unspecified == 1 ? "" : "s");
- if (state.signals)
- printf(", %d signal%s", state.signals, state.signals == 1 ? "" : "s");
- printf(", %d error%s\n", state.errors, state.errors == 1 ? "" : "s");
- }
- if (fp != stdin)
- fclose(fp);
- }
- return state.errors;
-}
-
-int main(int argc, char **argv)
-{
- static char *param[][4] = {
- { NULL, "basic.dat" , NULL },
- { NULL, "categorize.dat" , NULL },
- { NULL, "forcedassoc.dat" , NULL },
- { NULL, "-c", "interpretation.dat", NULL },
- { NULL, "leftassoc.dat" , NULL },
- { NULL, "-c", "nullsubexpr.dat" , NULL },
- { NULL, "repetition.dat" , NULL },
- { NULL, "rightassoc.dat" , NULL },
- };
- int r, i;
-
- if (argv[1])
- return old_main(argc, argv);
-
- r = 0;
- for (i = 0; i < sizeof(param) / sizeof(param[0]); i++) {
- param[i][0] = argv[0];
- printf("Testing %s\n", param[i][1][0] != '-' ? param[i][1] : param[i][2]);
- r |= old_main(3 /* not used */, param[i]);
- }
- return r;
-}
diff --git a/test/regex/tst-regex2.c b/test/regex/tst-regex2.c
deleted file mode 100644
index bb47d6467..000000000
--- a/test/regex/tst-regex2.c
+++ /dev/null
@@ -1,250 +0,0 @@
-#define _GNU_SOURCE 1
-
-#include <fcntl.h>
-#include <locale.h>
-#include <regex.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <time.h>
-#include <unistd.h>
-#include <errno.h>
-
-static int
-do_test(void)
-{
- static const char *pat[] = {
- ".?.?.?.?.?.?.?Log\\.13",
- "(.?)(.?)(.?)(.?)(.?)(.?)(.?)Log\\.13",
- "((((((((((.?))))))))))((((((((((.?))))))))))((((((((((.?))))))))))"
- "((((((((((.?))))))))))((((((((((.?))))))))))((((((((((.?))))))))))"
- "((((((((((.?))))))))))Log\\.13"
- };
- char *buf, *string;
- const char *fname = "tst-regex2.dat";
- struct stat st;
- unsigned len;
- int testno;
- int exitcode = 0;
-
- int fd = open(fname, O_RDONLY);
- if (fd < 0) {
- printf("Couldn't open %s: %s\n", fname, strerror(errno));
- return 1;
- }
- if (fstat(fd, &st) < 0) {
- printf("Couldn't fstat %s: %s\n", fname, strerror(errno));
- return 1;
- }
- len = st.st_size;
- string = buf = malloc(len + 1);
- if (buf == NULL) {
- printf("Couldn't allocate %u bytes\n", len + 1);
- return 1;
- }
- if (read(fd, buf, st.st_size) != (ssize_t) st.st_size) {
- printf("Couldn't read %s\n", fname);
- return 1;
- }
-
- close(fd);
- buf[len] = '\0';
-
-#if defined __UCLIBC_HAS_XLOCALE__ || !defined __UCLIBC__
- setlocale(LC_ALL, "de_DE.UTF-8");
-#endif
-
- for (testno = 0; testno < 2; ++testno) {
- int i;
- for (i = 0; i < sizeof(pat) / sizeof(pat[0]); ++i) {
- struct timeval start, stop;
- regex_t rbuf;
- int err;
-
- printf("test %d pattern %d '%s'\n", testno, i, pat[i]);
- gettimeofday(&start, NULL);
-
- err = regcomp(&rbuf, pat[i],
- REG_EXTENDED | (testno ? REG_NOSUB : 0));
- if (err != 0) {
- char errstr[300];
- regerror(err, &rbuf, errstr, sizeof(errstr));
- puts(errstr);
- exitcode = 1;
- goto contin1;
- }
-
- regmatch_t pmatch[71];
- err = regexec(&rbuf, string, 71, pmatch, 0);
- if (err == REG_NOMATCH) {
- puts("regexec failed");
- exitcode = 1;
- goto contin1;
- }
-
- if (testno == 0) {
- if (pmatch[0].rm_eo != pmatch[0].rm_so + 13
- || pmatch[0].rm_eo > len
- || pmatch[0].rm_so < len - 100
- || strncmp(string + pmatch[0].rm_so,
- " ChangeLog.13 for earlier changes",
- sizeof " ChangeLog.13 for earlier changes" - 1
- ) != 0
- ) {
- puts("regexec without REG_NOSUB did not find the correct match");
- exitcode = 1;
- goto contin1;
- }
-
- if (i > 0) {
- int j, k, l;
- for (j = 0, l = 1; j < 7; ++j) {
- for (k = 0; k < (i == 1 ? 1 : 10); ++k, ++l) {
- if (pmatch[l].rm_so != pmatch[0].rm_so + j
- || pmatch[l].rm_eo != pmatch[l].rm_so + 1
- ) {
- printf("pmatch[%d] incorrect\n", l);
- exitcode = 1;
- goto contin1;
- }
- }
- }
- }
- }
-
- gettimeofday(&stop, NULL);
- stop.tv_sec -= start.tv_sec;
- if (stop.tv_usec < start.tv_usec) {
- stop.tv_sec--;
- stop.tv_usec += 1000000;
- }
- stop.tv_usec -= start.tv_usec;
- printf(" %lu.%06lus\n", (unsigned long) stop.tv_sec,
- (unsigned long) stop.tv_usec);
- contin1:
- regfree(&rbuf);
- }
- }
-
- for (testno = 2; testno < 4; ++testno) {
- int i;
- for (i = 0; i < sizeof(pat) / sizeof(pat[0]); ++i) {
- struct timeval start, stop;
- struct re_pattern_buffer rpbuf;
- struct re_registers regs;
- const char *s;
- int match;
-
- printf("test %d pattern %d '%s'\n", testno, i, pat[i]);
- gettimeofday(&start, NULL);
-
- re_set_syntax(RE_SYNTAX_POSIX_EGREP
- | (testno == 3 ? RE_NO_SUB : 0));
- memset(&rpbuf, 0, sizeof(rpbuf));
- s = re_compile_pattern(pat[i], strlen(pat[i]), &rpbuf);
- if (s != NULL) {
- printf("%s\n", s);
- exitcode = 1;
- goto contin2;
- }
-
- memset(&regs, 0, sizeof(regs));
- match = re_search(&rpbuf, string, len, 0, len, &regs);
- if (match < 0) {
- printf("re_search failed (err:%d)\n", match);
- exitcode = 1;
- goto contin2;
- }
- if (match + 13 > len) {
- printf("re_search: match+13 > len (%d > %d)\n", match + 13, len);
- exitcode = 1;
- goto contin2;
- }
- if (match < len - 100) {
- printf("re_search: match < len-100 (%d < %d)\n", match, len - 100);
- exitcode = 1;
- goto contin2;
- }
- if (strncmp(string + match, " ChangeLog.13 for earlier changes",
- sizeof(" ChangeLog.13 for earlier changes") - 1
- ) != 0
- ) {
- printf("re_search did not find the correct match"
- "(found '%s' instead)\n", string + match);
- exitcode = 1;
- goto contin2;
- }
-
- if (testno == 2) {
- int expected = 72;
- if (i == 0)
- expected = 2;
- if (i == 1)
- expected = 9;
- if (regs.num_regs != expected) {
- printf("incorrect num_regs %d, expected %d\n", regs.num_regs, expected);
- exitcode = 1;
- goto contin2;
- }
- if (regs.start[0] != match || regs.end[0] != match + 13) {
- printf("incorrect regs.{start,end}[0] = { %d, %d },"
- " expected { %d, %d }\n",
- regs.start[0], regs.end[0],
- match, match + 13
- );
- exitcode = 1;
- goto contin2;
- }
- if (regs.start[regs.num_regs - 1] != -1
- || regs.end[regs.num_regs - 1] != -1
- ) {
- printf("incorrect regs.{start,end}[num_regs - 1] = { %d, %d },"
- " expected { -1, -1 }\n",
- regs.start[regs.num_regs - 1], regs.end[regs.num_regs - 1]
- );
- exitcode = 1;
- goto contin2;
- }
-
- if (i > 0) {
- int j, k, l;
- for (j = 0, l = 1; j < 7; ++j) {
- for (k = 0; k < (i == 1 ? 1 : 10); ++k, ++l) {
- if (regs.start[l] != match + j
- || regs.end[l] != match + j + 1
- ) {
- printf("incorrect regs.{start,end}[%d] = { %d, %d },"
- " expected { %d, %d }\n",
- l,
- regs.start[l], regs.end[l],
- match + j, match + j + 1
- );
- exitcode = 1;
- goto contin2;
- }
- }
- }
- }
- }
-
- gettimeofday(&stop, NULL);
- stop.tv_sec -= start.tv_sec;
- if (stop.tv_usec < start.tv_usec) {
- stop.tv_sec--;
- stop.tv_usec += 1000000;
- }
- stop.tv_usec -= start.tv_usec;
- printf(" %lu.%06lus\n", (unsigned long) stop.tv_sec,
- (unsigned long) stop.tv_usec);
- contin2:
- regfree(&rpbuf);
- }
- }
- return exitcode;
-}
-
-#define TIMEOUT 100
-#define TEST_FUNCTION do_test()
-#include "../test-skeleton.c"
diff --git a/test/regex/tst-regex2.dat b/test/regex/tst-regex2.dat
deleted file mode 100644
index ace9f3b66..000000000
--- a/test/regex/tst-regex2.dat
+++ /dev/null
@@ -1,2176 +0,0 @@
-2002-11-19 Ulrich Drepper <drepper@redhat.com>
-
- * intl/localealias.c (read_alias_file): Use only about 400 bytes
- of stack space instead of 16k.
-
-2002-11-18 Wolfram Gloger <wg@malloc.de>
-
- * malloc/arena.c
- (ptmalloc_lock_all, ptmalloc_unlock_all, ptmalloc_unlock_all2): Do
- nothing if not initialized. Bug report from Marcus Brinkmann
- <Marcus.Brinkmann@ruhr-uni-bochum.de>.
-
-2002-11-19 Roland McGrath <roland@redhat.com>
-
- * posix/Versions (libc: GLIBC_2.3.2): Add sched_getaffinity and
- sched_setaffinity.
-
- * configure.in (libc_cv_gcc_dwarf2_unwind_info check): Use libraries
- `-lgcc -lgcc_eh -lgcc', not just `-lgcc -lgcc_eh' in link commands for
- test leading to libc_cv_gcc_dwarf2_unwind_info=no_registry_needed.
- * configure: Regenerated.
-
-2002-11-19 Ulrich Drepper <drepper@redhat.com>
-
- * include/dlfcn.h: __libc_dlopen is now a macro calling
- __libc_dlopen_mode with the extra parameter RTLD_LAZY.
- (__libc_dlopen_mode): New prototype.
- * elf/dl-libc.c (__libc_dlopen_mode): Renamed from __libc_dlopen. Add
- new parameter. Store new parameter in mode field of structure passed
- to do_dlopen.
- (struct do_dlopen_args): Add new field mode.
- (do_dlopen): Pass mode from parameter structure to _dl_open.
-
-2002-11-11 Randolf Chung <tausq@debian.org>
-
- * sysdeps/unix/sysv/linux/hppa/bits/fcntl.h [__USE_FILE_OFFSET64]
- (F_GETLK, F_SETLK, F_SETLKW): Define to F_*64 versions.
- * sysdeps/unix/sysv/linux/hppa/fcntl.c: New file.
-
- * sysdeps/hppa/fpu/libm-test-ulps: New file (generated).
-
- * sysdeps/hppa/Makefile (CFLAGS-rtld.c): New variable.
- Set -mdisable-fpregs for this file.
-
-2002-11-11 Carlos O'Donell <carlos@baldric.uwo.ca>
-
- * sysdeps/unix/sysv/linux/configure.in:
- Make 2.4.19 minimum linux kernel for hppa, and add unwind symbols
- from gcc-3.0 era for backwards compatibility.
- * sysdeps/unix/sysv/linux/configure: Regenerate.
-
- * sysdeps/unix/sysv/linux/hppa/sys/ucontext.h:
- Define mcontext_t as a sigcontext.
-
-2002-11-18 Roland McGrath <roland@redhat.com>
-
- * dlfcn/dlerror.c (fini): New function, __attribute__ ((destructor)).
- Free memory in `last_result' if it was used.
-
- * resolv/nss_dns/dns-network.c (getanswer_r): In BYNAME case, search
- all aliases for one that matches the "<dotted-quad>.IN-ADDR.ARPA" form.
- Do the parsing inline instead of copying strings and calling
- inet_network, and properly skip all alias names not matching the form.
-
- * manual/pattern.texi (Variable Substitution): Fix # and ## examples.
-
-2002-11-17 Ulrich Drepper <drepper@redhat.com>
-
- * manual/pattern.texi (Wordexp Example): Fix sample code.
-
- * sysdeps/unix/sysv/linux/i386/clone.S: Initialize word in the
- childs stack which will be loaded into the %esi register.
-
-2002-11-14 Paul Eggert <eggert@twinsun.com>
-
- * resolv/nss_dns/dns-network.c (getanswer_r): Check for buffer
- overflow when skipping the question part and when unpacking aliases.
-
-2002-11-15 Roland McGrath <roland@redhat.com>
-
- * math/Makefile (libm-calls): Remove s_copysign, s_isinf, s_isnan,
- s_finite, s_modf, s_scalbn, s_frexp, m_ldexp, s_signbit.
- Instead add $(calls:s_%=m_%) to get m_* versions of them all.
-
-2002-11-15 Jakub Jelinek <jakub@redhat.com>
-
- * sysdeps/i386/dl-machine.h (elf_machine_rela): Handle R_386_COPY.
- * sysdeps/arm/dl-machine.h (elf_machine_rela): Handle R_ARM_COPY.
-
-2002-11-15 Roland McGrath <roland@redhat.com>
-
- * math/Makefile (libm-calls): Change s_ldexp to m_ldexp.
- * Makerules ($(+sysdir_pfx)sysd-rules): Emit pattern rules for m_%.[Sc]
- from sysdeps/.../s_%.[Sc] with commands $(+make-include-of-dep).
- (+make-include-of-dep): New canned sequence.
-
- * stdlib/canonicalize.c (__realpath): Check for malloc failure.
- From Dmitry V. Levin <ldv@altlinux.org>.
-
-2002-11-14 Roland McGrath <roland@redhat.com>
-
- * sysdeps/generic/errno.c (__libc_errno): Remove alias.
- * inet/herrno.c (__libc_h_errno): Likewise.
- * resolv/res_libc.c (__libc_res): Likewise.
- [USE___THREAD]: Use this in place of [USE_TLS && HAVE___THREAD].
- (__res_state) [! USE___THREAD]: Don't define as weak.
- * csu/Versions: Revert last change.
- * resolv/Versions: Revert last change.
-
- * Makerules ($(common-objpfx)%.make): New pattern rule.
- * tls.make.c: New file.
- * Makefile (distribute): Add it.
-
- * sysdeps/generic/errno.c [! USE___THREAD]
- [HAVE_ELF && SHARED && DO_VERSIONING] (errno, _errno): Declare these
- with compat_symbol so they are not link-time visible.
- [! USE___THREAD] (__libc_errno): New alias for errno.
- * csu/Versions [!(USE_TLS && HAVE___THREAD)] (libc: GLIBC_PRIVATE):
- Add __libc_errno here.
- * inet/herrno.c [USE___THREAD]: Use this conditional
- in place of [USE_TLS && HAVE___THREAD].
- [! USE___THREAD] [HAVE_ELF && SHARED && DO_VERSIONING]
- (h_errno, _h_errno): Declare these with compat_symbol so they are not
- link-time visible.
- [! USE___THREAD] (__libc_h_errno): New alias for h_errno.
- * resolv/res_libc.c [! USE___THREAD]
- [HAVE_ELF && SHARED && DO_VERSIONING] (_res): Likewise.
- (_res): Use __attribute__ ((section (".bss"))) so we can have an alias.
- (__libc_res): Define as alias for _res.
- * resolv/Versions [!(USE_TLS && HAVE___THREAD)] (libc: GLIBC_PRIVATE):
- Add __libc_h_errno and __libc_res here.
-
-2002-11-14 Jakub Jelinek <jakub@redhat.com>
-
- * csu/Versions (errno): Move STT_TLS symbol to GLIBC_PRIVATE for now.
- * resolv/Versions (h_errno, _res): Likewise.
-
-2002-11-14 Roland McGrath <roland@redhat.com>
-
- * Makerules (%.dynsym): Remove $(objpfx) from target and dep.
- (%.symlist): Likewise.
-
-2002-11-13 Roland McGrath <roland@redhat.com>
-
- * scripts/abilist.awk: New file.
- * Makefile (distribute): Add it.
- * Makerules ($(objpfx)%.dynsym, $(objpfx)%.symlist): New rules.
- (tests): Depend on .symlist file for each $(install-lib.so-versioned).
- [$(subdir) = elf] (tests): Depend on libc.symlist.
- (generated, common-generated): Add those files.
-
- * aclocal.m4 (LIBC_PROG_BINUTILS): Check for objdump, set OBJDUMP.
- * configure: Regenerated.
- * config.make.in (OBJDUMP): New variable, substituted by configure.
-
- * malloc/mcheck.c (struct hdr): New members `block' and `magic2'.
- (mallochook, reallochook): Set them up.
- (checkhdr): Check HDR->magic2 value.
- (freehook): Reset HDR->magic2.
- (memalignhook): New static function.
- (old_memalign_hook): New static variable.
- (mcheck, reallochook): Set __memalign_hook to memalignhook.
-
- * sysdeps/generic/dl-tls.c (_dl_allocate_tls_storage): Zero the space
- for the new TCB.
-
-2002-11-13 Andreas Jaeger <aj@suse.de>
-
- * sysdeps/unix/sysv/linux/x86_64/sigaction.c: Check for visibility
- attribute.
- * sysdeps/unix/sysv/linux/i386/sigaction.c: Likewise.
-
-2002-11-11 Paul Eggert <eggert@twinsun.com>
-
- * manual/crypt.texi (Cryptographic Functions): Mention that
- the MD5 one-way algorithm is compatible with BSD's.
-
-2002-11-11 Isamu Hasegawa <isamu@yamato.ibm.com>
-
- * posix/regex_internal.c (re_string_skip_chars): Also return the last
- wide character.
- (re_string_reconstruct): Calculate the context by itself when the
- offset points out of the valid range.
- (re_string_context_at): Use wide character when MB_CUR_MAX > 1.
- * posix/regex_internal.h (WIDE_NEWLINE_CHAR): New macro.
- (IS_WIDE_WORD_CHAR): New macro.
- (IS_WIDE_NEWLINE): New macro.
-
-2002-11-12 Andreas Jaeger <aj@suse.de>
-
- * sysdeps/x86_64/strchr.S: Don't use one register for two
- purposes, this fixes a bug noticed by test-strchr.c.
-
- * sysdeps/x86_64/strcat.S: Fix algorithm to align source pointer
- correctly.
-
-2002-11-12 Roland McGrath <roland@redhat.com>
-
- * libio/libioP.h [_LIBC && !SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)]
- (_G_IO_NO_BACKWARD_COMPAT): Define it.
-
- * sysdeps/ia64/dl-fptr.c [_LIBC_REENTRANT]: Include <ia64intrin.h>
- instead of <pt-machine.h>.
- [_LIBC_REENTRANT] (lock, unlock): Use __sync_lock_* macros instead of
- testandset.
- From Ian Wienand <ianw@gelato.unsw.edu.au>.
-
-2002-11-10 Roland McGrath <roland@redhat.com>
-
- * libio/bug-wfflush.c (do_test): Call rewind instead of fsetpos.
- Call fputs instead of fwprintf (simpler to follow in debugger).
-
- * crypt/md5-crypt.c: Doc fix.
-
- * sysdeps/unix/make-syscalls.sh: Insert $(make-target-directory) at
- the beginning of generated target commands.
-
- * csu/Makefile ($(objpfx)crti.o, $(objpfx)crtn.o): Add explicit
- dependencies for these in case implicit rule search skipped the
- nonexistent source directory.
- * sysdeps/gnu/Makefile ($(objpfx)errlist.d): Give this rule all the
- files with $(object-suffixes) as targets too.
- * Makerules [no_deps && objpfx] (before-compile): Add $(objpfx).
- and a target for it using $(make-target-directory).
-
- * Rules (before-compile): Add $(common-objpfx)bits/stdio-lim.h.
-
-2002-11-10 Roland McGrath <roland@frob.com>
-
- * sysdeps/unix/sysv/linux/bits/pthreadtypes.h: Moved to ...
- * sysdeps/generic/bits/pthreadtypes.h: ... here.
-
- * sysdeps/mach/hurd/fcntl.c (__libc_fcntl): Treat a struct flock with
- l_start == 0 and l_len == 1 as we do l_len == 0.
-
-2002-11-10 Ulrich Drepper <drepper@redhat.com>
-
- * po/da.po: Update from translation team.
-
-2002-11-10 Roland McGrath <roland@redhat.com>
-
- * config.make.in (includedir): New variable, substituted by configure.
- Reported missing by Jocelyn Fournier <joc@presence-pc.com>.
- * Makeconfig (includedir): Use $(prefix), not $(exec_prefix).
-
-2002-11-10 Andreas Jaeger <aj@suse.de>
-
- * sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h (enum): Add
- REG_OLDMASK and REG_CR2 to synch with kernel header.
- (NGREG): Increase.
-
- * nss/getXXent.c (GETFUNC_NAME): Use union type to avoid strict
- aliasing problem.
- * nss/getXXbyYY_r.c (INTERNAL): Likewise.
- * nss/getnssent_r.c (__nss_getent_r): Likewise.
- (__nss_setent): Likewise.
- (__nss_getent_r): Likewise.
- * inet/getnetgrent_r.c (innetgr): Likewise.
- (__internal_setnetgrent_reuse): Likewise.
- (internal_getnetgrent_r): Likewise.
- * inet/ether_hton.c (ether_hostton): Likewise.
- * inet/ether_ntoh.c (ether_ntohost): Likewise.
- * sunrpc/netname.c (netname2user): Likewise.
- * sunrpc/publickey.c (getpublickey): Likewise.
- (getsecretkey): Likewise.
-
-2002-11-09 Marcus Brinkmann <marcus@gnu.org>
-
- * sysdeps/mach/hurd/i386/ioperm.c (ioperm): Correct off by one
- error in range calculation.
-
-2002-10-09 Jakub Jelinek <jakub@redhat.com>
-
- * string/test-strspn.c (do_test): Ensure zero termination.
- * string/test-strpbrk.c (do_test): Likewise.
- * string/test-strncmp.c (stupid_strncmp): Use strnlen, not strlen.
- * string/test-strncpy.c (stupid_strncpy): Likewise.
- * string/test-stpncpy.c (stupid_stpncpy): Likewise.
-
-2002-10-08 Roland McGrath <roland@redhat.com>
-
- * string/test-string.h (test_init): Fill BUF1 and BUF2 with
- nonzero characters.
-
-2002-09-22 H.J. Lu <hjl@gnu.org>
-
- * sysdeps/unix/sysv/linux/mmap64.c (MMAP2_PAGE_SHIFT): Renamed
- from PAGE_SHIFT. Define if not defined. Check MMAP2_PAGE_SHIFT
- only if __NR_mmap2 is defined.
-
- * sysdeps/unix/sysv/linux/powerpc/mmap64.c: Moved to ...
- * sysdeps/unix/sysv/linux/mmap64.c: ... here.
- * sysdeps/unix/sysv/linux/hppa/mmap64.c: File removed.
- * sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c: FIle removed,
-
-2002-11-08 Jakub Jelinek <jakub@redhat.com>
-
- * posix/bug-regex13.c (tests): Add new test.
-
- * string/test-strchr.c (stupid_strchr): New function.
- (do_random_tests): Make sure the string is zero terminated.
- * string/test-strpbrk.c (stupid_strpbrk): New function.
- (do_random_tests): Make sure the string is zero terminated.
- * string/test-strcmp.c (stupid_strcmp): New function.
- (do_random_tests): Make sure the strings are zero terminated.
- * string/test-strspn.c (stupid_strspn): New function.
- (simple_strspn): Rename rej argument to acc.
- (do_random_tests): Make sure the string is zero terminated.
- * string/test-strcspn.c (stupid_strcspn): New function.
- * string/test-strncpy.c (stupid_strncpy): New function.
- * string/test-stpncpy.c (stupid_stpncpy): New function.
- * string/test-strncmp.c (stupid_strncmp): New function.
- (do_random_tests): Make sure the strings are zero terminated.
- * string/test-string.h (impl_t): Change test into long.
- (IMPL): Add __attribute__((aligned (sizeof (void *)))).
-
-2002-11-08 Roland McGrath <roland@redhat.com>
-
- * sysdeps/ia64/elf/configure.in: Add TLS check.
- From Ian Wienand <ianw@cse.unsw.edu.au>.
- * sysdeps/ia64/elf/configure: Regenerated.
-
-2002-11-07 Roland McGrath <roland@redhat.com>
-
- * libio/fileops.c (_IO_new_file_overflow): Use INTUSE(_IO_do_write) in
- place of _IO_new_do_write.
- [_LIBC] (_IO_do_write): Define as macro for _IO_new_do_write and
- #undef before versioned_symbol use.
-
-2002-11-07 Richard Henderson <rth@redhat.com>
-
- * configure.in (ASM_ALPHA_NG_SYMBOL_PREFIX): Remove test.
- * configure: Regenerated.
- * config.h.in (ASM_ALPHA_NG_SYMBOL_PREFIX): Remove #undef.
- * sysdeps/alpha/dl-machine.h (TRAMPOLINE_TEMPLATE): Use !samegp.
- (RTLD_START): Likewise. Access _dl_skip_args, _rtld_local, and
- _dl_fini via gp-relative relocations.
- * sysdeps/alpha/fpu/e_sqrt.c: Use !samegp.
-
- * elf/tls-macros.h: Add alpha versions.
- * sysdeps/alpha/dl-machine.h (elf_machine_rela): Handle TLS relocs.
- * sysdeps/unix/alpha/sysdep.S: Support USE___THREAD.
- * sysdeps/unix/alpha/sysdep.h: Likewise. Add SYSCALL_ERROR_HANDLER.
- * sysdeps/unix/sysv/linux/alpha/brk.S: Use it.
- * sysdeps/unix/sysv/linux/alpha/clone.S: Likewise.
- * sysdeps/unix/sysv/linux/alpha/getitimer.S: Likewise.
- * sysdeps/unix/sysv/linux/alpha/getrusage.S: Likewise.
- * sysdeps/unix/sysv/linux/alpha/gettimeofday.S: Likewise.
- * sysdeps/unix/sysv/linux/alpha/ieee_get_fp_control.S: Likewise.
- * sysdeps/unix/sysv/linux/alpha/ieee_set_fp_control.S: Likewise.
- * sysdeps/unix/sysv/linux/alpha/rt_sigaction.S: Likewise.
- * sysdeps/unix/sysv/linux/alpha/select.S: Likewise.
- * sysdeps/unix/sysv/linux/alpha/setitimer.S: Likewise.
- * sysdeps/unix/sysv/linux/alpha/settimeofday.S: Likewise.
- * sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Likewise.
- * sysdeps/unix/sysv/linux/alpha/syscall.S: Likewise.
- * sysdeps/unix/sysv/linux/alpha/utimes.S: Likewise.
- * sysdeps/unix/sysv/linux/alpha/wait4.S: Likewise.
-
- * sysdeps/unix/sysv/linux/alpha/sysdep.h: Re-include protect.
- Kill argument registers across the inline syscall.
-
- * sysdeps/unix/sysv/linux/alpha/clone.S: Add user_tid and tls args.
-
- * linuxthreads/sysdeps/alpha/tls.h: New file.
- * sysdeps/alpha/dl-tls.h: New file.
-
-2002-10-29 David Mosberger <davidm@hpl.hp.com>
-
- * sysdeps/ia64/elf/initfini.c [HAVE_INITFINI_ARRAY]
- (gmon_initializer): New function.
- (.init prologue): If HAVE_INITFINI_ARRAY is true, don't call
- __gmon_start__ here. Call it from gmon_initializer() instead.
-
-2002-03-12 H.J. Lu <hjl@gnu.org>
-
- * elf/Makefile [$(have-initfini-array) = yes] (tests): Add tst-array1,
- tst-array2, and tst-array3.
- [$(have-initfini-array) = yes] (tests-static): Add tst-array3.
- [$(have-initfini-array) = yes] (modules-names): Add tst-array2dep.
- ($(objpfx)tst-array1.out): New target.
- ($(objpfx)tst-array2): Likewise.
- ($(objpfx)tst-array2.out): Likewise.
- ($(objpfx)tst-array3.out): Likewise.
- * elf/tst-array1.c: New file.
- * elf/tst-array1.exp: Likewise.
- * elf/tst-array2.c: Likewise.
- * elf/tst-array2dep.c: Likewise.
- * elf/tst-array2.exp: Likewise.
- * elf/tst-array3.c: Likewise.
-
-2002-10-28 David Mosberger <davidm@hpl.hp.com>
-
- * elf/dl-fini.c (_dl_fini): Invoke fini_array in _reverse_ order.
- Don't add L->l_addr to array entry values.
-
-2002-11-07 Jakub Jelinek <jakub@redhat.com>
-
- * string/test-string.h: New file.
- * string/test-strlen.c: New file.
- * string/test-string.h: New file.
- * string/test-strcmp.c: New file.
- * string/test-strchr.c: New file.
- * string/test-strrchr.c: New file.
- * string/test-strcpy.c: New file.
- * string/test-stpcpy.c: New file.
- * string/test-strncpy.c: New file.
- * string/test-stpncpy.c: New file.
- * string/test-strpbrk.c: New file.
- * string/test-strcspn.c: New file.
- * string/test-strspn.c: New file.
- * string/test-strcat.c: New file.
- * string/test-strncmp.c: New file.
- * string/test-memchr.c: New file.
- * string/test-memcmp.c: New file.
- * string/test-memset.c: New file.
- * string/test-memcpy.c: New file.
- * string/test-mempcpy.c: New file.
- * string/test-memmove.c: New file.
- * string/Makefile (strop-tests): New variable.
- (tests): Add strop-tests.
- (distribute): Add test-string.h.
-
-2002-11-06 Ulrich Drepper <drepper@redhat.com>
-
- * posix/regcomp.c: Use tabs instead of spaces.
- * posix/regexec.c: Likewise.
- * posix/regex_internal.h: Likewise.
-
- * posix/regcomp.c (re_compile_fastmap_iter): Use __wcrtomb not wctomb.
-
-2002-11-06 Jakub Jelinek <jakub@redhat.com>
-
- * posix/regcomp.c (re_compile_pattern): Don't set regs_allocated
- here.
- (regcomp): Don't set can_be_null here.
- (re_comp): Clear whole re_comp_buf with the exception of fastmap.
- (re_compile_internal): Clear can_be_null, set regs_allocated.
-
- * posix/regcomp.c (re_set_fastmap): New function.
- (re_compile_fastmap_iter): Use it. Remove redundant type ==
- COMPLEX_BRACKET check.
- * posix/regexec.c (re_search_internal): Optimize searching with
- fastmap. Call re_string_reconstruct even if match_first is
- smaller than raw_mbs_idx.
-
-2002-11-06 Isamu Hasegawa <isamu@yamato.ibm.com>
-
- * posix/regcomp (free_dfa_content): Use free_state.
- * posix/regex_internal.c (re_string_realloc_buffers): Don't edit
- pointers in case that realloc failed.
- (re_node_set_merge): Likewise.
- (register_state): Likewise.
- (create_newstate_common): Invoke memory release functions in case of
- error conditions.
- (create_ci_newstate): Likewise.
- (create_cd_newstate): Likewise.
- (free_state): New function.
- * posix/regexec.c (re_search_internal): Invoke memory release
- functions in case of error conditions.
- (sift_states_backward): Likewise.
- (merge_state_array): Likewise.
- (add_epsilon_src_nodes): Likewise.
- (sub_epsilon_src_nodes): Likewise.
- (search_subexp): Likewise.
- (sift_states_bkref): Likewise.
- (transit_state_sb): Likewise.
- (transit_state_mb): Likewise.
- (transit_state_bkref_loop): Likewise.
- (group_nodes_into_DFAstates): Likewise.
- (push_fail_stack): Don't edit pointers in case that realloc failed.
- (extend_buffers): Likewise.
- (match_ctx_add_entry): Likewise.
-
-2002-11-06 Roland McGrath <roland@redhat.com>
-
- * sysdeps/unix/sysv/linux/mips/configure.in: File removed.
- * sysdeps/unix/sysv/linux/mips/configure: Likewise.
-
- * configure.in: Add checks on as and ld for binutils 2.13 or later.
- * configure: Regenerated.
-
-2002-11-06 Ulrich Drepper <drepper@redhat.com>
-
- * posix/regcomp.c (regcomp): __re_compile_fastmap can never fail.
- If re_compile_internal failed free fastmap buffer.
- (free_dfa_content): Broken out of regfree function. Frees all dfa
- related data.
- (regfree): Add free_dfa_content.
- (re_compile_internal): If any of the called functions fails free
- all dfa related memory.
-
-2002-11-05 Ulrich Drepper <drepper@redhat.com>
-
- * sysdeps/unix/sysv/linux/sys/sysctl.h: Add ugly hacks to prevent
- warnings from the kernel headers.
-
-2002-11-05 Roland McGrath <roland@redhat.com>
-
- * sysdeps/unix/mips/sysdep.h [! __PIC__] (PSEUDO): Add nop after jump.
- From Johannes Stezenbach <js@convergence.de>.
-
- * sysdeps/unix/sysv/linux/mips/Versions (libc: GLIBC_2.0): Change
- #errlist-compat magic comment to give 123 as size.
- (libc: GLIBC_2.1): Remove this set, moving #errlist-compat magic to ...
- (libc: GLIBC_2.2): ... here.
- (libc: GLIBC_2.3): Likewise.
-
-2002-11-05 Ulrich Drepper <drepper@redhat.com>
-
- * elf/dl-fini.c (_dl_fini): Correct the increment of l_opencount
- which happens at the beginning so that we can unload modules in
- __libc_freeres.
-
-2002-11-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
-
- * sysdeps/sh/bits/setjmp.h (JB_SIZE): Define only
- under [__USE_MISC || _ASM].
-
- * elf/elf.h: Remove the obsolete SH TLS relocations.
-
-2002-11-05 Ulrich Drepper <drepper@redhat.com>
-
- * posix/regcomp.c (regcomp): Initialize preg->can_be_null to zero.
-
-2002-11-05 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
-
- * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h: Handle
- __NR_pread64 and __NR_pwrite64.
- * sysdeps/unix/sysv/linux/powerpc/powerpc64/sysdep.h: Likewise.
- * sysdeps/unix/sysv/linux/powerpc/pread.c: Remove __NR_pread64
- and __NR_pwrite64.
- Revert change to use INLINE_SYSCALL.
- * sysdeps/unix/sysv/linux/powerpc/pread64.c: Likewise.
- * sysdeps/unix/sysv/linux/powerpc/pwrite.c: Likewise.
- * sysdeps/unix/sysv/linux/powerpc/pwrite64.c: Likewise.
- * sysdeps/unix/sysv/linux/powerpc/ftruncate64.c: Revert change to use
- INLINE_SYSCALL.
- * sysdeps/unix/sysv/linux/powerpc/truncate64.c: Likewise.
-
- * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (INLINE_SYSCALL):
- Update clobber list and add a comment about the syscall ABI.
-
- * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list (s_pread64,
- s_pwrite64, s_ftruncate, s_truncate): Re-add.
-
-2002-11-05 Jakub Jelinek <jakub@redhat.com>
-
- * iconv/gconv_dl.c (free_mem): Clear loaded.
- * locale/loadarchive.c (_nl_archive_subfreeres): Call locale_data's
- cleanup if any.
-
-2002-11-05 Ulrich Drepper <drepper@redhat.com>
-
- * sysdeps/unix/sysv/linux/fexecve.c: Include <stdio.h>.
-
- * libio/ioseekoff.c: Remove INTDEF. Define _IO_seekoff_unlocked. Same
- as old code without locking. _IO_seekoff calls this function after
- locking the stream.
- * libio/ioseekpos.c: Likewise for _IO_seekpos.
- * libio/libioP.h: Replace _IO_seekoff_internal and _IO_seekpos_internal
- prototypes with _IO_seekoff_unlocked and _IO_seekpos_unlocked
- prototypes.
- * libio/iolibio.h (_IO_fseek): Call _IO_seekoff_unlocked instead
- of _IO_seekoff_internal.
- (_IO_rewind): Likewise.
- * libio/ioftell.c: Likewise.
- * libio/ftello.c: Likewise.
- * libio/ftello64.c: Likewise.
- * libio/iofgetpos.c: Likewise.
- * libio/iofgetpos64.c: Likewise.
- * libio/oldiofgetpos.c: Likewise.
- * libio/oldiofgetpos64.c: Likewise.
- * libio/iofsetpos.c: Call _IO_seekpos_unlocked instead of
- _IO_seekpos_internal.
- * libio/iofsetpos64.c: Likewise.
- * libio/oldiofsetpos.c: Likewise.
- * libio/oldiofsetpos64.c: Likewise.
-
-2002-11-04 Roland McGrath <roland@redhat.com>
-
- * sysdeps/unix/sysv/linux/powerpc/chown.c: Use INLINE_SYSCALL macro.
- * sysdeps/unix/sysv/linux/powerpc/ftruncate64.c: Likewise.
- * sysdeps/unix/sysv/linux/powerpc/ioctl.c: Likewise.
- * sysdeps/unix/sysv/linux/powerpc/pread.c: Likewise.
- * sysdeps/unix/sysv/linux/powerpc/pread64.c: Likewise.
- * sysdeps/unix/sysv/linux/powerpc/pwrite.c: Likewise.
- * sysdeps/unix/sysv/linux/powerpc/pwrite64.c: Likewise.
- * sysdeps/unix/sysv/linux/powerpc/tcgetattr.c: Likewise.
- * sysdeps/unix/sysv/linux/powerpc/tcsetattr.c: Likewise.
- * sysdeps/unix/sysv/linux/powerpc/truncate64.c: Likewise.
- * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list (s_ioctl,
- s_chown, s_ftruncate64, s_mmap2, s_pread64, s_pwrite64, s_truncate64,
- sys_fstat, sys_lstat, sys_mknod, sys_readv, sys_stat, sys_writev):
- Remove these, no longer used.
-
-2002-11-04 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
-
- * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list (s_ipc,
- s_llseek, s_readahead, s_execve, s_fcntl, s_fcntl64, s_fstat64,
- s_getcwd, s_getdents, s_getdents64, s_getpmsg, s_getpriority,
- s_getrlimit, s_lstat64, s_poll, s_ptrace, s_putpmsg, s_reboot,
- s_setrlimit, s_sigaction, s_sigpending, s_sigprocmask, s_sigsuspend,
- s_stat64, s_sysctl, s_ugetrlimit, s_ustat, s_vfork): Remove now unused
- syscall stubs.
-
- * sysdeps/unix/sysv/linux/pwrite.c: Fix typo.
- * sysdeps/unix/sysv/linux/pwrite64.c: Likewise.
- * sysdeps/unix/sysv/linux/powerpc/pread.c: Handle both __NR_pread64
- and __NR_pread.
- * sysdeps/unix/sysv/linux/powerpc/pread64.c: Likewise.
- * sysdeps/unix/sysv/linux/powerpc/pwrite.c: Handle both __NR_pwrite64
- and __NR_pwrite.
- * sysdeps/unix/sysv/linux/powerpc/pwrite64.c: Likewise.
-
-2002-11-03 Roland McGrath <roland@redhat.com>
-
- * sysdeps/generic/ldsodefs.h (struct rtld_global): New member
- `_dl_tls_static_used'.
- * sysdeps/generic/libc-tls.c (_dl_tls_static_used): New variable.
- (__libc_setup_tls): Initialize it. Let the initial value of
- _dl_tls_static_size indicate some surplus space in the computed value.
- * elf/dl-open.c (_dl_tls_static_size): New variable.
- * sysdeps/generic/dl-tls.c (_dl_determine_tlsoffset): Initialize
- _dl_tls_static_used. Add some surplus space into _dl_tls_static_size.
- * elf/dl-reloc.c [USE_TLS] (allocate_static_tls): New function.
- (CHECK_STATIC_TLS): Use it.
- * elf/dl-close.c (_dl_close): Adjust _dl_tls_static_used when the
- closed objects occupied a trailing contiguous chunk of static TLS area.
-
-2002-10-18 Bruno Haible <bruno@clisp.org>
-
- * charmaps/ISO_5428: Use Greek characters introduced in Unicode 3.0.
-
-2002-11-04 Ulrich Drepper <drepper@redhat.com>
-
- * libio/wfileops.c (_IO_wfile_seekoff): Don't modify _offset and
- _wide_data->_IO_read_end if adjustment can be made in the current
- buffer.
-
- * sysdeps/unix/sysv/linux/fexecve.c: New file.
-
- * libio/bug-wfflush.c (do_test): Using fseek is not allowed when
- wide oriented streams are used.
-
- * nss/getXXent_r.c (ENDFUNC_NAME): Don't do anything if the
- service hasn't been used [PR libc/4744].
-
- * include/features.h: Use __STDC_VERSION__ not __STDC_VERSION.
- Reported by Miloslav Trmac <mitr@volny.cz> [PR libc/4766].
-
- * manual/examples/dir.c: Don't include <stddef.h>.
- * manual/examples/select.c: Include <errno.h> for TEMP_FAILURE_RETRY.
- Reported by Frédéric Delanoy <delanoy_f@yahoo.com>.
-
-2002-11-02 H.J. Lu <hjl@gnu.org>
-
- * stdio-common/reg-printf.c: Include <stddef.h>.
-
-2002-11-03 Ulrich Drepper <drepper@redhat.com>
-
- * sysdeps/generic/libc-tls.c: Define _dl_tls_static_used.
-
- * po/ca.po: Update from translation team.
- * po/es.po: Likewise.
-
- * sysdeps/generic/segfault.c (catch_segfault): If HAVE_PROC_SELF
- is defined write out memory map.
- * sysdeps/unix/sysv/linux/segfault.c: New file.
-
-2002-11-02 Roland McGrath <roland@redhat.com>
-
- * sysdeps/unix/sysv/linux/getdents.c (__GETDENTS): Use union type for
- pointers that can alias.
- Reported by Daniel Jacobowitz <drow@mvista.com>.
-
- * sysdeps/unix/bsd/bsd4.4/freebsd/bits/typesizes.h: New file.
-
-2002-11-02 Roland McGrath <roland@redhat.com>
-
- * manual/filesys.texi (Reading/Closing Directory): Rewrite readdir_r
- description to be clearer and to say that *RESULT is set to ENTRY.
-
-2002-10-30 Jakub Jelinek <jakub@redhat.com>
-
- * posix/regexec.c (build_trtable): Alloca or malloc dests_node and
- dests_ch arrays together. Alloca or malloc dest_states,
- dest_states_word and dest_states_nl arrays together. Free memory on
- error exit.
-
-2002-10-29 Daniel Jacobowitz <drow@mvista.com>
-
- * crypt/crypt_util.c (__init_des_r): Initialize current_salt
- and current_saltbits.
-
-2002-11-02 Roland McGrath <roland@redhat.com>
-
- * stdio-common/reg-printf.c: Include <stdlib.h>.
-
-2002-11-02 H.J. Lu <hjl@gnu.org>
-
- * sysdeps/unix/sysv/linux/mips/syscalls.list (s_execve): Set
- caller to EXTRA instead of execve.
-
-2002-11-01 Roland McGrath <roland@redhat.com>
-
- * sysdeps/generic/errno-loc.c [! USE___THREAD]: Use this conditional
- in place of [!(USE_TLS && HAVE___THREAD)].
- (__errno_location) [! USE___THREAD]: Define as strong, not weak.
-
-2002-10-31 Roger Sayle <roger@eyesopen.com>
-
- * sysdeps/i386/soft-fp/sfp-machine.h (_FP_NANFRAC_Q, _FP_NANSIGN_Q):
- New macros.
- * sysdeps/x86_64/soft-fp/sfp-machine.h: Likewise.
-
- * soft-fp/soft-fp.h: Allow sfp-machine.h to define FP_RND_NEAREST
- without defining FP_ROUNDMODE.
-
-2002-10-29 Jakub Jelinek <jakub@redhat.com>
-
- * sysdeps/gnu/siglist.c (PTR_SIZE_STR): Remove.
- (__old_sys_siglist, __old_sys_sigabbrev): Use strong_alias and
- declare_symbol.
- * sysdeps/mach/hurd/siglist.h (OLD_SIGLIST_SIZE_STR): Remove.
- (OLD_SIGLIST_SIZE): Define.
- * sysdeps/unix/sysv/linux/siglist.h (OLD_SIGLIST_SIZE_STR): Remove.
- (OLD_SIGLIST_SIZE): Define.
- * sysdeps/unix/sysv/linux/arm/siglist.c: Remove.
-
-2002-11-01 Jakub Jelinek <jakub@redhat.com>
-
- * sysdeps/ia64/strncpy.S: Fix recovery code.
-
-2002-10-30 Jakub Jelinek <jakub@redhat.com>
-
- * include/libc-symbols.h (__libc_freeres_fn_section, libc_freeres_fn):
- New macros.
- * elf/dl-close.c (free_mem): Use libc_freeres_fn macro, remove
- text_set_element.
- * elf/dl-libc.c (free_mem): Likewise.
- * iconv/gconv_conf.c (free_mem): Likewise.
- * iconv/gconv_db.c (free_mem): Likewise.
- * iconv/gconv_dl.c (free_mem): Likewise.
- * iconv/gconv_cache.c (free_mem): Likewise.
- * intl/finddomain.c (free_mem): Likewise.
- * intl/dcigettext.c (free_mem): Likewise.
- * locale/setlocale.c (free_mem): Likewise.
- * misc/fstab.c (fstab_free): Likewise.
- * nss/nsswitch.c (free_mem): Likewise.
- * posix/regcomp.c (free_mem): Likewise.
- * resolv/gai_misc.c (free_res): Likewise.
- * stdlib/fmtmsg.c (free_mem): Likewise.
- * sunrpc/clnt_perr.c (free_mem): Likewise.
- * sysdeps/generic/setenv.c (free_mem): Likewise.
- * sysdeps/unix/sysv/linux/shm_open.c (freeit): Likewise.
- * sysdeps/pthread/aio_misc.c (free_res): Likewise.
- * time/tzset.c (free_mem): Likewise.
- * malloc/mtrace.c (release_libc_mem): Add __libc_freeres_fn_section.
- * locale/loadarchive.c (_nl_archive_subfreeres): Likewise.
- * malloc/set-freeres.c (__libc_freeres): Likewise.
-
- * login/getutent.c: Include stdlib.h instead of stddef.h.
- (buffer): Change into pointer to utmp, add libc_freeres_ptr.
- (__getutent): Allocate buffer the first time it is run.
- * login/getutid.c: Include stdlib.h instead of stddef.h.
- (buffer): Change into pointer to utmp, add libc_freeres_ptr.
- (__getutid): Allocate buffer the first time it is run.
- * login/getutline.c: Include stdlib.h instead of stddef.h.
- (buffer): Change into pointer to utmp, add libc_freeres_ptr.
- (__getutline): Allocate buffer the first time it is run.
- * malloc/mtrace.c (malloc_trace_buffer): Change into char *.
- (mtrace): Allocate malloc_trace_buffer.
- * resolv/nsap_addr.c (inet_nsap_ntoa): Decrease size of tmpbuf.
- * resolv/ns_print.c (ns_sprintrrf): Decrease size of t.
- * string/strerror.c: Include libintl.h and errno.h.
- (buf): New variable.
- (strerror): Only allocate buffer if actually needed (unknown error).
- * time/tzfile.c (transitions): Add libc_freeres_ptr.
- (freeres): Remove.
-
-2002-10-25 Jakub Jelinek <jakub@redhat.com>
-
- * include/libc-symbols.h (libc_freeres_ptr): New macro.
- * malloc/set-freeres.c (__libc_freeres_ptrs): Define using
- symbol_set_define.
- (__libc_freeres): Free all pointers in that section.
- * Makerules (build-shlib): Add $(LDSEDCMD-$(@F:lib%.so=%).so) to sed
- commands when creating .lds script.
- (LDSEDCMD-c.so): New variable.
- * inet/rcmd.c (ahostbuf): Change into char *. Add libc_freeres_ptr.
- (rcmd_af): Use strdup to allocate ahostbuf.
- * inet/rexec.c (ahostbuf): Change into char *. Add libc_freeres_ptr.
- (rexec_af): Use strdup to allocate ahostbuf.
- * stdio-common/reg-printf.c (printf_funcs): Remove.
- (__printf_arginfo_table): Change into printf_arginfo_function **.
- Add libc_freeres_ptr.
- (__register_printf_function): Allocate __printf_arginfo_table
- and __printf_function_table the first time it is called.
- * stdio-common/printf-parse.h (__printf_arginfo_table): Change into
- printf_arginfo_function **.
- (parse_one_spec): Add __builtin_expect.
- * grp/fgetgrent.c (buffer): Add libc_freeres_ptr.
- (free_mem): Remove.
- * inet/getnetgrent.c (buffer): Add libc_freeres_ptr.
- (free_mem): Remove.
- * intl/localealias.c (libc_freeres_ptr): Define if !_LIBC.
- (string_space, map): Add libc_freeres_ptr.
- (free_mem): Remove.
- * misc/efgcvt.c (FCVT_BUFPTR): Add libc_freeres_ptr.
- (free_mem): Remove.
- * misc/mntent.c (getmntent_buffer): Add libc_freeres_ptr.
- (free_mem): Remove.
- * crypt/md5-crypt.c (libc_freeres_ptr): Define if !_LIBC.
- (buffer): Add libc_freeres_ptr.
- (free_mem): Remove for _LIBC.
- * nss/getXXbyYY.c (buffer): Add libc_freeres_ptr.
- (free_mem): Remove.
- * nss/getXXent.c (buffer): Add libc_freeres_ptr.
- (free_mem): Remove.
- * pwd/fgetpwent.c (buffer): Add libc_freeres_ptr.
- (free_mem): Remove.
- * resolv/res_hconf.c (ifaddrs): Add libc_freeres_ptr.
- (free_mem): Remove.
- * shadow/fgetspent.c (buffer): Add libc_freeres_ptr.
- (free_mem): Remove.
- * sysdeps/posix/ttyname.c (getttyname_name): Add libc_freeres_ptr.
- (free_mem): Remove.
- * sysdeps/unix/sysv/linux/getsysstats.c (mount_proc): Add
- libc_freeres_ptr.
- (free_mem): Remove.
- * sysdeps/unix/sysv/linux/ttyname.c (getttyname_name, ttyname_buf): Add
- libc_freeres_ptr.
- (free_mem): Remove.
-
-2002-10-30 Jakub Jelinek <jakub@redhat.com>
-
- * malloc/obstack.c [_LIBC] (obstack_free): Change into strong_alias
- instead of duplicating the whole function in libc.
-
-2002-10-31 Roland McGrath <roland@redhat.com>
-
- * sysdeps/i386/bits/byteswap.h [__GNUC__ < 2] (__bswap_32):
- Renamed from __bswap_16 (typo fix). Reported by <dens@stl.sarov.ru>.
-
-2002-10-30 Jakub Jelinek <jakub@redhat.com>
-
- * sysdeps/unix/sysv/linux/Makefile (syscall-%.h): Add -D for each
- 32bit-predefine when creating .new32 list and -U for each
- 32bit-predefine when creating .new64 list.
- * sysdeps/unix/sysv/linux/x86_64/Makefile (32bit-predefine): New.
-
-2002-10-29 Andreas Schwab <schwab@suse.de>
-
- * sysdeps/generic/allocrtsig.c: Include <testrtsig.h>, not
- "testrtsig.h". Reported by Daniel Jacobowitz <dan@debian.org>.
-
-2002-10-25 Roland McGrath <roland@redhat.com>
-
- * sysdeps/unix/sysv/linux/configure.in: Fix typo in last change.
- * sysdeps/unix/sysv/linux/configure: Regenerated.
-
- * sysdeps/generic/ldsodefs.h: Remove [! SHARED] conditional from
- _dl_starting_up decl.
-
-2002-10-20 H.J. Lu <hjl@gnu.org>
-
- * sysdeps/unix/sysv/linux/configure.in: Don't check
- /lib/modules/`uname -r`/build/include for kernel headers if
- cross compiling.
- * sysdeps/unix/sysv/linux/configure: Regenerated.
-
-2002-10-25 Roland McGrath <roland@redhat.com>
-
- * math/math.h (M_LOG2El): Correct the value.
- From Stephen L Moshier <steve@moshier.net>.
-
- * sysdeps/unix/sysv/linux/init-first.c (init): Remove [! SHARED]
- conditional from __libc_multiple_libcs access. Remove kludge for weak
- symbol access with old compilers we no longer support.
- * sysdeps/unix/sysv/aix/init-first.c (init): Likewise.
- * sysdeps/generic/libc-start.c (__libc_start_main): Likewise.
-
-2002-10-25 Roland McGrath <roland@redhat.com>
-
- * sysdeps/posix/sigvec.c [SA_RESETHAND]: Disable wrapper hacks and
- implement SV_RESETHAND by translating it to SA_RESETHAND.
-
-2002-10-23 Alexandre Oliva <aoliva@redhat.com>
-
- * elf/dl-reloc.c (_dl_reloc_bad_use): Print the full 32-bit relocation
- type on ELF64 platforms.
-
-2002-10-24 Ulrich Drepper <drepper@redhat.com>
-
- * elf/elf.h (R_X86_64_GOTTPOFF): Renamed from r_x86_64_GOTTPOFF.
-
- * elf/elf.h: Define ELF_NOTE_OS_FREEBSD and NT_TASKSTRUCT.
-
-2002-10-24 Jakub Jelinek <jakub@redhat.com>
-
- * elf/dl-misc.c: Include <sysdep.h>.
- (_dl_debug_vdprintf): Only take dl_load_lock if not _dl_starting_up.
-
- * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h (INTERNAL_SYSCALL,
- INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO): New macros.
- (INLINE_SYSCALL): Use that.
- * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h (INTERNAL_SYSCALL,
- INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO): New macros.
- (INLINE_SYSCALL): Use that.
- * sysdeps/unix/sysv/linux/x86_64/sysdep.h (INTERNAL_SYSCALL,
- INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO): New macros.
- (INLINE_SYSCALL): Use that.
- * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Include
- dl-sysdep.h.
- (SYSCALL_ERROR_HANDLER): Define RTLD_PRIVATE_ERRNO variant.
- (__INTERNAL_SYSCALL_STRING): Define.
- * sysdeps/unix/sysv/linux/sparc/sparc64/sysdep.h: Include
- dl-sysdep.h.
- (SYSCALL_ERROR_HANDLER): Define RTLD_PRIVATE_ERRNO variant.
- (__INTERNAL_SYSCALL_STRING): Define.
- * sysdeps/unix/sysv/linux/sparc/sysdep.h (INLINE_SYSCALL): Pass
- __SYSCALL_STRING to inline_syscall*.
- (INTERNAL_SYSCALL, INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO):
- New macros.
- (inline_syscall0, inline_syscall1, inline_syscall2, inline_syscall3,
- inline_syscall4, inline_syscall5, inline_syscall6): Add string
- argument.
-
-2002-10-24 Roland McGrath <roland@redhat.com>
-
- * sysdeps/generic/ldsodefs.h (_dl_starting_up): Declare it here.
- * sysdeps/unix/sysv/linux/init-first.c: Not here.
- * sysdeps/powerpc/elf/libc-start.c: Or here.
- * sysdeps/unix/sysv/aix/libc-start.c: Or here.
- * sysdeps/unix/sysv/aix/start-libc.c: Or here.
- * sysdeps/unix/sysv/aix/init-first.c: Or here.
- * sysdeps/generic/libc-start.c: Or here.
- * sysdeps/unix/sysv/linux/init-first.c (init): Protect _dl_starting_up
- access with [! SHARED].
- * sysdeps/unix/sysv/aix/init-first.c (init): Likewise.
-
- * libio/bug-wfflush.c: New file.
- * libio/Makefile (tests): Add bug-wfflush.
-
-2002-10-23 Roland McGrath <roland@redhat.com>
-
- * stdio-common/tst-fphex.c: New file.
- * stdio-common/Makefile (tests): Add tst-fphex.
- * sysdeps/generic/printf_fphex.c (__printf_fphex): Fix initialization
- of WNUMEND. Fix counting of decimal point in WIDTH. Print '0' pad
- chars always before the value digits.
- Reported by James Antill <james.antill@redhat.com>.
-
-2002-10-24 Jakub Jelinek <jakub@redhat.com>
-
- * posix/regcomp.c (re_comp): Call __regfree on re_comp_buf.
- (free_mem): New function.
- * posix/Makefile (tests): Add bug-regex14. Add bug-regex14-mem
- if not cross compiling.
- (generated): Add bug-regex14-mem and bug-regex14.mtrace.
- (bug-regex14-ENV): Set.
- (bug-regex14-mem): New target.
- * posix/bug-regex14.c: New file.
-
-2002-10-23 Roland McGrath <roland@redhat.com>
-
- * elf/Makefile ($(objpfx)librtld.map): Use temporary file for output
- target, so we don't touch it when the link fails.
-
- * libio/ftello.c (ftello): Use _IO_off64_t for type of POS.
- Check for the result overflowing off_t and fail with EOVERFLOW.
- * libio/ioftell.c (_IO_ftell): Likewise.
- * libio/iofgetpos.c (_IO_new_fgetpos): Likewise.
-
- * login/logwtmp.c (logwtmp): If sizeof ut_tv != sizeof struct timeval,
- use a temporary timeval on the stack for gettimeofday and copy it.
- * login/logout.c (logout): Likewise.
- Reported by Steven Munroe <sjmunroe@us.ibm.com>.
-
- * sysdeps/unix/sysv/linux/bits/statfs.h (struct statfs):
- Use __SWORD_TYPE instead of int for member types.
- (struct statfs64): Likewise.
- * sysdeps/unix/sysv/linux/alpha/bits/statfs.h: New file.
- * sysdeps/unix/sysv/linux/s390/bits/statfs.h: New file.
- * sysdeps/unix/sysv/linux/ia64/bits/statfs.h: File removed.
- * sysdeps/unix/sysv/linux/sparc/bits/statfs.h: File removed.
- * sysdeps/unix/sysv/linux/x86_64/bits/statfs.h: File removed.
-
- * sysdeps/unix/sysv/linux/sparc/bits/statvfs.h: Moved to ...
- * sysdeps/unix/sysv/linux/bits/statvfs.h: ... here.
- (ST_NODIRATIME): Restore fixed value of 2048.
- * sysdeps/unix/sysv/linux/alpha/bits/statvfs.h: File removed.
- * sysdeps/unix/sysv/linux/ia64/bits/statvfs.h: File removed.
-
- Rearranged <bits/types.h> definitions to reduce duplication.
- * sysdeps/generic/bits/types.h: Rewritten, using macros from
- <bits/wordsize.h> and new header <bits/typesizes.h>.
- * posix/Makefile (headers): Add bits/typesizes.h here.
- * sysdeps/generic/bits/typesizes.h: New file.
- * sysdeps/unix/sysv/linux/alpha/bits/typesizes.h: New file.
- * sysdeps/unix/sysv/linux/sparc/bits/typesizes.h: New file.
- * sysdeps/mach/hurd/bits/typesizes.h: New file.
- * sysdeps/unix/sysv/linux/alpha/bits/types.h: File removed.
- * sysdeps/unix/sysv/linux/bits/types.h: File removed.
- * sysdeps/unix/sysv/linux/ia64/bits/types.h: File removed.
- * sysdeps/unix/sysv/linux/mips/bits/types.h: File removed.
- * sysdeps/unix/sysv/linux/s390/bits/types.h: File removed.
- * sysdeps/unix/sysv/linux/sparc/bits/types.h: File removed.
- * sysdeps/unix/sysv/linux/x86_64/bits/types.h: File removed.
- * posix/sys/types.h [__USE_POSIX199506 || __USE_UNIX98]: Include
- <bits/pthreadtypes.h> here, not in <bits/types.h>.
- * signal/signal.h: Likewise.
-
- * streams/stropts.h: Include <bits/xtitypes.h>.
- * streams/Makefile (headers): Add bits/xtitypes.h here.
- * sysdeps/generic/bits/xtitypes.h: New file.
- * sysdeps/s390/bits/xtitypes.h: New file.
- * sysdeps/ia64/bits/xtitypes.h: New file.
- * sysdeps/x86_64/bits/xtitypes.h: New file.
-
- * sysvipc/Makefile (headers): Add bits/ipctypes.h here.
- * sysdeps/generic/bits/ipctypes.h: New file.
- * sysdeps/mips/bits/ipctypes.h: New file.
- * sysdeps/gnu/bits/shm.h: Include <bits/ipctypes.h>.
- * sysdeps/gnu/bits/msq.h: Likewise.
- * sysvipc/sys/ipc.h: Likewise.
-
-2002-10-22 Ulrich Drepper <drepper@redhat.com>
-
- * elf/dl-load.c (struct filebuf): For buf element to have the
- alignment of ElfXX_Ehdr since this is what will be stored in it.
-
-2002-10-22 Jakub Jelinek <jakub@redhat.com>
-
- * locale/programs/locarchive.c (add_alias): Change locrec_offset arg
- into pointer to locrec_offset.
- (add_locale_to_archive): Adjust callers. Free normalized_name right
- before returning, not immediately after add_locale, pass it to
- add_alias if not NULL instead of name. Rename second normalized_name
- occurence to nnormalized_codeset_name.
-
- * locale/programs/locarchive.c (enlarge_archive): Make sure
- string_size is always a multiple of 4.
- Reported by Andreas Schwab <schwab@suse.de>.
-
-2002-10-21 Andreas Schwab <schwab@suse.de>
-
- * sysdeps/unix/sysv/linux/ia64/syscalls.list (s_execve): Set
- caller to EXTRA instead of execve, since the latter has a
- higher-priority implementation in linuxthreads.
-
-2002-10-21 Roland McGrath <roland@redhat.com>
-
- * sysdeps/generic/libc-tls.c (__libc_setup_tls): Initialize the static
- slotinfo list's len member to the proper size, not just 1.
- Initialize static_map.l_tls_initimage.
-
- * elf/dl-open.c (dl_open_worker): Fix loop searching for
- dtv_slotinfo_list element containing new modules' l_tls_modid.
-
- * elf/tst-tls9.c, elf/tst-tls9-static.c: New files.
- * elf/tst-tlsmod5.c, elf/tst-tlsmod6.c: New files.
- * elf/Makefile (tests): Add tst-tls9.
- (tests-static): Add tst-tls9-static.
- (tst-tls9-static-ENV): New variable.
- ($(objpfx)tst-tls9-static, $(objpfx)tst-tls9-static.out): New targets.
-
- * elf/dl-close.c (remove_slotinfo): Remove an assert; the number of
- modids used by partially loaded modules being closed can't be known.
-
-2002-10-21 Isamu Hasegawa <isamu@yamato.ibm.com>
-
- * posix/Makefile: Add a test case for the bug reported by Aharon
- Robbins <arnold@skeeve.com>.
- * posix/bug-regex13.c: New file.
- * posix/regcomp.c (peek_token_bracket): Skip the byte already read.
-
-2002-10-21 Ulrich Drepper <drepper@redhat.com>
-
- * csu/gmon-start.c: Pretty printing.
-
-2002-10-19 Art Haas <ahaas@neosoft.com>
-
- * configure.in: Replace AC_CONFIG_HEADER with AC_CONFIG_HEADERS,
- add AC_HELP_STRING to all AC_ARG_WITH and AC_ARG_ENABLE macros,
- add autoconf quotes to the AC_CONFIG_AUX_DIR macro.
- * configure: Regenerated.
-
-2002-10-19 Roland McGrath <roland@redhat.com>
-
- * configure.in: Call AC_CONFIG_SUBDIRS with empty argument
- and then set $subdirs directly, because the new Autoconf breaks
- compatibility in every way imaginable and insists on whining
- about usage that worked since the dawn of time.
- * configure: Regenerated.
-
- * configure: Regenerated (using Autoconf 2.54).
- * sysdeps/alpha/elf/configure: Likewise.
- * sysdeps/generic/configure: Likewise.
- * sysdeps/i386/elf/configure: Likewise.
- * sysdeps/ia64/elf/configure: Likewise.
- * sysdeps/mach/hurd/configure: Likewise.
- * sysdeps/mach/configure: Likewise.
- * sysdeps/unix/configure: Likewise.
- * sysdeps/unix/common/configure: Likewise.
- * sysdeps/unix/sysv/aix/configure: Likewise.
- * sysdeps/unix/sysv/linux/configure: Likewise.
- * sysdeps/unix/sysv/linux/mips/configure: Likewise.
- * sysdeps/x86_64/elf/configure: Likewise.
-
- * config.make.in: Nix completely-soft nonsense.
- * configure.in: Likewise. Under --without-fp, use nofpu subdirectory
- of machine directories instead of fpu subdirectory.
- * sysdeps/powerpc/soft-fp/Makefile: Remove cruft added in last change.
- * sysdeps/powerpc/nofpu/Makefile: Put it in this new file instead.
- * sysdeps/powerpc/soft-fp/sim-full.c: Moved to ...
- * sysdeps/powerpc/nofpu/sim-full.c: ... here.
- * sysdeps/powerpc/soft-fp/fraiseexcpt.c: Moved to ...
- * sysdeps/powerpc/nofpu/fraiseexcpt.c: ... here.
- * sysdeps/powerpc/soft-fp/fegetexcept.c: Moved to ...
- * sysdeps/powerpc/nofpu/fegetexcept.c: ... here.
- * sysdeps/powerpc/soft-fp/fclrexcpt.c: Moved to ...
- * sysdeps/powerpc/nofpu/fclrexcpt.c: ... here.
- * sysdeps/powerpc/soft-fp/ftestexcept.c: Moved to ...
- * sysdeps/powerpc/nofpu/ftestexcept.c: ... here.
- * sysdeps/powerpc/soft-fp/fgetexcptflg.c: Moved to ...
- * sysdeps/powerpc/nofpu/fgetexcptflg.c: ... here.
- * sysdeps/powerpc/soft-fp/fsetexcptflg.c: Moved to ...
- * sysdeps/powerpc/nofpu/fsetexcptflg.c: ... here.
- * sysdeps/powerpc/soft-fp/fedisblxcpt.c: Moved to ...
- * sysdeps/powerpc/nofpu/fedisblxcpt.c: ... here.
- * sysdeps/powerpc/soft-fp/feenablxcpt.c: Moved to ...
- * sysdeps/powerpc/nofpu/feenablxcpt.c: ... here.
- * sysdeps/powerpc/soft-fp/fegetenv.c: Moved to ...
- * sysdeps/powerpc/nofpu/fegetenv.c: ... here.
- * sysdeps/powerpc/soft-fp/fesetenv.c: Moved to ...
- * sysdeps/powerpc/nofpu/fesetenv.c: ... here.
- * sysdeps/powerpc/soft-fp/fegetround.c: Moved to ...
- * sysdeps/powerpc/nofpu/fegetround.c: ... here.
- * sysdeps/powerpc/soft-fp/fesetround.c: Moved to ...
- * sysdeps/powerpc/nofpu/fesetround.c: ... here.
- * sysdeps/powerpc/soft-fp/feupdateenv.c: Moved to ...
- * sysdeps/powerpc/nofpu/feupdateenv.c: ... here.
- * sysdeps/powerpc/soft-fp/feholdexcpt.c: Moved to ...
- * sysdeps/powerpc/nofpu/feholdexcpt.c: ... here.
- * sysdeps/powerpc/soft-fp/fenv_const.c: Moved to ...
- * sysdeps/powerpc/nofpu/fenv_const.c: ... here.
- * sysdeps/powerpc/soft-fp/libm-test-ulps: Moved to ...
- * sysdeps/powerpc/nofpu/libm-test-ulps: ... here.
- * sysdeps/powerpc/soft-fp/soft-supp.h: Moved to ...
- * sysdeps/powerpc/nofpu/soft-supp.h: ... here.
- * sysdeps/powerpc/soft-fp/Versions (libc: GLIBC_2.3.2): Moved to ...
- * sysdeps/powerpc/nofpu/Versions: ... here, new file.
-
-2002-10-19 Bruno Haible <bruno@clisp.org>
-
- * sysdeps/unix/bsd/bsd4.4/freebsd/sys/sysmacros.h: New file.
-
-2002-10-18 Roland McGrath <roland@redhat.com>
-
- * io/Makefile (routines): Add lchmod.
- * io/sys/stat.h [__USE_BSD] (lchmod): Declare it.
- * sysdeps/generic/lchmod.c: New file.
- * sysdeps/mach/hurd/lchmod.c: New file.
- * io/Versions (libc: GLIBC_2.3.2): New set, add lchmod.
-
-2002-10-18 Art Haas <ahaas@neosoft.com>
-
- * configure.in: Remove remaining AC_FD_CC macros, and replace
- AC_FD_MSG with AS_MESSAGE_FD.
-
-2002-10-18 Roland McGrath <roland@redhat.com>
-
- * sysdeps/powerpc/powerpc32/dl-machine.c (__process_machine_rela): Fix
- typos: VALUE -> FINALADDR.
-
- * sysdeps/unix/alpha/sysdep.h (INLINE_SYSCALL, INLINE_SYSCALL1)
- (inline_syscall_clobbers, inline_syscall0, inline_syscall1)
- (inline_syscall2, inline_syscall3, inline_syscall4, inline_syscall5)
- (inline_syscall6): Move these macros ...
- * sysdeps/unix/sysv/linux/alpha/sysdep.h: ... to here.
-
- * configure.in (libc_link_dests, libc_link_sources): Remove these
- variables and the AC_LINK_FILES call.
-
- * sysdeps/powerpc/soft-fp/Versions (libc: GLIBC_2.3.2): Fix last
- change to put new symbols here instead of in GLIBC_2.2.
- * sysdeps/powerpc/Subdirs: Move this file ...
- * sysdeps/powerpc/soft-fp/Subdirs: ... here.
-
-2002-10-07 Roland McGrath <roland@redhat.com>
-
- * sysdeps/generic/bits/time.h: Replaced with contents of the
- sysdeps/unix/sysv/linux/i386/bits/time.h file. All the following
- files were identical except for the absence of CLOCK_THREAD_CPUTIME_ID
- and CLOCK_PROCESS_CPUTIME_ID in .../linux/bits/time.h; adding these
- macros is ok even for architectures that don't now implement them.
- * sysdeps/mach/hurd/bits/time.h: File removed.
- * sysdeps/unix/sysv/linux/bits/time.h: File removed.
- * sysdeps/unix/sysv/linux/i386/bits/time.h: File removed.
- * sysdeps/unix/sysv/linux/ia64/bits/time.h: File removed.
- * sysdeps/unix/sysv/linux/sparc/bits/time.h: File removed.
- * sysdeps/unix/sysv/linux/x86_64/bits/time.h: File removed.
-
-2002-10-18 Jeff Bailey <jbailey@gnu.org>
-
- * configure.in: Replace obsolete AC_OUTPUT syntax with
- AC_CONFIG_FILES, AC_CONFIG_COMMANDS, and new-type AC_OUTPUT trio.
-
- * aclocal.m4 (GLIBC_PROVIDES): Add AC_PROVIDEs for
- _AS_PATH_SEPARATOR_PREPARE and _AS_TEST_PREPARE.
-
- * configure.in: Replace AC_FD_CC with AS_MESSAGE_LOG_FD.
- * sysdeps/alpha/elf/configure.in: Likewise.
- * sysdeps/i386/elf/configure.in: Likewise.
- * sysdeps/mach/hurd/configure.in: Likewise.
- * sysdeps/x86_64/elf/configure.in: Likewise.
-
- * configure.in: Use AC_CONFIG_SRCDIR and new AC_INIT syntax.
-
- * sysdeps/alpha/elf/configure.in: Remove unneeded sinclude statement.
- * sysdeps/generic/configure.in: Likewise.
- * sysdeps/i386/elf/configure.in: Likewise.
- * sysdeps/ia64/elf/configure.in: Likewise.
- * sysdeps/mach/configure.in: Likewise.
- * sysdeps/mach/hurd/configure.in: Likewise.
- * sysdeps/unix/configure.in: Likewise.
- * sysdeps/unix/common/configure.in: Likewise.
- * sysdeps/unix/sysv/aix/configure.in: Likewise.
- * sysdeps/unix/sysv/linux/configure.in: Likewise.
- * sysdeps/unix/sysv/linux/mips/configure.in: Likewise.
- * sysdeps/x86_64/elf/configure.in: Likewise.
-
- * aclocal.m4: Use just the bits from AS_INIT that are needed for the
- GLIBC_PROVIDES. Use plain comment instead of HEADER-COMMENT so
- that it's obvious when extra autoconf machinery is being dragged in.
-
-2002-10-18 Roland McGrath <roland@redhat.com>
-
- * configure.in: Remove bogus echo included in
- 2002-10-08 Aldy Hernandez <aldyh@redhat.com> change.
- * configure: Regenerated.
-
-2002-10-18 Jakub Jelinek <jakub@redhat.com>
-
- * sysdeps/unix/sysv/linux/pathconf.h (statfs_link_max): Add inline.
- (statfs_filesize_max): New function.
- * sysdeps/unix/sysv/linux/linux_fsinfo.h (JFFS_SUPER_MAGIC,
- JFFS2_SUPER_MAGIC, JFS_SUPER_MAGIC, NTFS_SUPER_MAGIC,
- ROMFS_SUPER_MAGIC, UDF_SUPER_MAGIC): Define.
- * sysdeps/unix/sysv/linux/fpathconf.c (__fpathconf): Use
- statfs_filesize_max.
- * sysdeps/unix/sysv/linux/pathconf.c (__pathconf): Likewise.
- * sysdeps/unix/sysv/linux/alpha/fpathconf.c: Removed.
- * sysdeps/unix/sysv/linux/alpha/pathconf.c: Removed.
-
-2002-10-17 Roland McGrath <roland@redhat.com>
-
- * configure.in (MIG): Just AC_SUBST it here.
- * configure: Regenerated.
- * sysdeps/mach/configure.in (MIG): Do the AC_CHECK_TOOL here.
- Adding final - argument to all AC_CHECK_HEADER uses for .defs files.
- * sysdeps/mach/configure: Regenerated.
-
- * aclocal.m4 (GLIBC_PROVIDES): Add AC_PROVIDE([_AS_TR_SH_PREPARE])
- and AC_PROVIDE([_AS_CR_PREPARE]).
-
- * aclocal.m4 (GLIBC_PROVIDES): Add AC_PROVIDE([_AS_ECHO_N_PREPARE]).
- Remove AC_LANG(C) call, instead just define([_AC_LANG], [C]).
-
- * elf/dl-support.c: Move _dl_tls_* variables to ...
- * sysdeps/generic/libc-tls.c: ... here.
-
- * elf/dl-close.c (remove_slotinfo): Take new argument. If false,
- allow IDX to be one past the current last slotinfo entry.
- (_dl_close): Pass IMAP->l_init_called for that parameter.
-
-2002-10-07 Andreas Schwab <schwab@suse.de>
-
- * aclocal.m4: Fix for autoconf 2.53.
- * configure.in: Likewise. Require autoconf 2.53.
-
-2002-10-08 Richard Henderson <rth@redhat.com>
-
- * soft-fp/op-4.h: Handle carry correctly in
- __FP_FRAC_ADD_3, __FP_FRAC_ADD_4, __FP_FRAC_SUB_3,
- __FP_FRAC_SUB_4, __FP_FRAC_DEC_3, __FP_FRAC_DEC_4.
- * soft-fp/op-common.h: New macros _FP_DIV_MEAT_N_loop.
-
-2002-10-08 Aldy Hernandez <aldyh@redhat.com>
-
- * configure.in: Compute completely-soft.
- * config.make.in: Make completely-soft available to sub-makes.
- * sysdeps/powerpc/soft-fp/Makefile: Add gcc-single-routines and
- gcc-double-routines. Add sim-full.c. Add fenv_const and
- fe_nomask to libm-support.
- * sysdeps/powerpc/soft-fp/sim-full.c: New file.
- * sysdeps/powerpc/soft-fp/fraiseexcpt.c: New file.
- * sysdeps/powerpc/soft-fp/fegetexcept.c: New file.
- * sysdeps/powerpc/soft-fp/fclrexcpt.c: New file.
- * sysdeps/powerpc/soft-fp/ftestexcept.c: New file.
- * sysdeps/powerpc/soft-fp/fgetexcptflg.c: New file.
- * sysdeps/powerpc/soft-fp/fsetexcptflg.c: New file.
- * sysdeps/powerpc/soft-fp/fedisblxcpt.c: New file.
- * sysdeps/powerpc/soft-fp/feenablxcpt.c: New file.
- * sysdeps/powerpc/soft-fp/fegetenv.c: New file.
- * sysdeps/powerpc/soft-fp/fesetenv.c: New file.
- * sysdeps/powerpc/soft-fp/fegetround.c: New file.
- * sysdeps/powerpc/soft-fp/fesetround.c: New file.
- * sysdeps/powerpc/soft-fp/feupdateenv.c: New file.
- * sysdeps/powerpc/soft-fp/feholdexcpt.c: New file.
- * sysdeps/powerpc/soft-fp/fenv_const.c: New file.
- * sysdeps/powerpc/soft-fp/libm-test-ulps: New file.
- * sysdeps/powerpc/soft-fp/soft-supp.h: New file.
- * sysdeps/powerpc/soft-fp/Versions: Add libgcc soft-float
- symbols. Add __sim_disabled_exceptions, __sim_exceptions,
- __sim_round_mode.
- * sysdeps/powerpc/soft-float/Dist: Add sim-full.c, fenv_const.c.
- * sysdeps/powerpc/soft-float/sfp-machine.h: Define
- FP_HANDLE_EXCEPTIONS.
- Define FP_ROUNDMODE.
- Redefine FP_* macros to correspond to the FE_* bit positions.
- Define FP_DIV_MEAT_S to _FP_DIV_MEAT_1_loop.
- Define externs for __sim_exceptions, __sim_disabled_exceptions,
- __sim_round_mode, __simulate_exceptions.
- * sysdeps/powerpc/fpu/bits/fenv.h: Move file from here...
- * sysdeps/powerpc/bits/fenv.h: ...to here.
-
-2002-10-06 Jakub Jelinek <jakub@redhat.com>
-
- * sysdeps/powerpc/powerpc32/dl-machine.c (__process_machine_rela):
- Store R_PPC_UADDR32 and R_PPC_UADDR16 one byte at a time.
- Use __builtin_expect for R_PPC_ADDR24 overflow check. Fix
- R_PPC_ADDR16, R_PPC_UADDR16 and R_PPC_ADDR14* overflow check, use
- __builtin_expect.
-
-2002-10-15 Jakub Jelinek <jakub@redhat.com>
-
- * include/resolv.h (__libc_res_nquery, __libc_res_nsearch,
- __libc_res_nsend): New prototypes.
- * resolv/res_query.c (QUERYSIZE): Define.
- (__libc_res_nquery): Renamed from res_nquery. Added answerp
- argument. Allocate only QUERYSIZE bytes first, if res_nmkquery
- fails use MAXPACKET buffer. Call __libc_res_nsend instead of
- res_nsend, pass answerp.
- (res_nquery): Changed into wrapper around __libc_res_nquery.
- (__libc_res_nsearch): Renamed from res_nsearch. Added answerp
- argument. Call __libc_res_nquerydomain and __libc_res_nquery
- instead of the non-__libc_ variants, pass them answerp.
- (res_nsearch): Changed into wrapper around __libc_res_nsearch.
- (__libc_res_nquerydomain): Renamed from res_nquerydomain.
- Added answerp argument. Call __libc_res_nquery instead of
- res_nquery, pass answerp.
- (res_nquerydomain): Changed into wrapper around
- __libc_res_nquerydomain.
- * resolv/res_send.c: Include sys/ioctl.h.
- (MAXPACKET): Define.
- (send_vc): Change arguments. Reallocate answer buffer if it is
- too small.
- (send_dg): Likewise.
- (__libc_res_nsend): Renamed from res_nsend. Added ansp argument.
- Reallocate answer buffer if it is too small and hooks are in use.
- Adjust calls to send_vc and send_dg.
- (res_nsend): Changed into wrapper around __libc_res_nsend.
- * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname2_r): Allocate
- just 1K answer buffer on the stack, use __libc_res_nsearch instead
- of res_nsearch.
- (_nss_dns_gethostbyaddr_r): Similarly with __libc_res_nquery.
- * resolv/nss_dns/dns-network.c (_nss_dns_getnetbyaddr_r): Likewise.
- (_nss_dns_getnetbyname_r): Similarly with __libc_res_nsearch.
- * resolv/gethnamaddr.c (gethostbyname2): Likewise.
- (gethostbyaddr): Similarly with __libc_res_nquery.
- * resolv/Versions (libresolv): Export __libc_res_nquery and
- __libc_res_nsearch at GLIBC_PRIVATE.
-
-2002-10-17 Roland McGrath <roland@redhat.com>
-
- * configure.in: Grok --without-__thread and disable HAVE___THREAD.
- * configure: Regenerated.
-
- * sysdeps/x86_64/dl-machine.h (elf_machine_rela): Do CHECK_STATIC_TLS
- before performing the reloc, not after.
- * sysdeps/i386/dl-machine.h (elf_machine_rel): Likewise.
-
-2002-10-17 Ulrich Drepper <drepper@redhat.com>
-
- * locale/programs/locale.c (write_locales): Use 'm' flag in fopen call.
- * locale/programs/linereader.c (lr_open): Likewise.
- * locale/programs/charmap-dir.c (charmap_open): Likewise.
- * locale/programs/locarchive.c (add_locale_to_archive): Likewise.
-
-2002-10-17 Isamu Hasegawa <isamu@yamato.ibm.com>
-
- * posix/bug-regex11.c: Add a test case for the bug reported by
- Paolo Bonzini <bonzini@gnu.org>.
- * posix/regexec.c (sift_states_bkref): Use correct destination of
- the back reference.
-
-2002-10-17 Roland McGrath <roland@redhat.com>
-
- * elf/dl-load.c (_dl_map_object_from_fd): Don't check DF_STATIC_TLS.
- * elf/dl-reloc.c (_dl_relocate_object: CHECK_STATIC_TLS): New macro
- to signal error if an IE-model TLS reloc resolved to a dlopen'd module.
- * sysdeps/i386/dl-machine.h (elf_machine_rel, elf_machine_rela):
- Call it after performing TPOFF relocs.
- * sysdeps/x86_64/dl-machine.h (elf_machine_rela): Likewise.
- * sysdeps/sh/dl-machine.h (elf_machine_rela): Likewise.
- * elf/dl-conflict.c (CHECK_STATIC_TLS): New macro (no-op).
-
- * elf/dl-close.c (remove_slotinfo): Change asserts so as not to crash
- when closing a partially-initialized object.
-
- * elf/dl-load.c (_dl_map_object_from_fd) [! USE_TLS]: Call lose
- instead of _dl_fatal_printf when we see PT_TLS.
-
- * Makeconfig (CPPFLAGS): Fix last change to use $(libof-$(<F))
- instead of $(libof-$<).
-
-2002-10-16 Roland McGrath <roland@redhat.com>
-
- * cppflags-iterator.mk (CPPFLAGS-$(cpp-src)): Variable removed.
- instead of += to append, to be sure $(lib) gets expanded at defn time.
- (libof-$(cpp-src)): New variable, define this instead.
- * extra-lib.mk (cpp-srcs-left): Reduce duplication in include setup.
- (lib): Don't use override.
- (CPPFLAGS-$(lib)): New variable, put -D's here.
- * Makeconfig (CPPFLAGS): Use basename fn for CPPFLAGS-basename.
- Also add $(CPPFLAGS-LIB) before the file-specific flags, for each
- LIB found by $(libof-*) for basename, target, or source.
- * Makerules (CPPFLAGS-nonlib): New variable.
- * nscd/Makefile (lib): Set to nonlib when using cppflags-iterator.mk.
- * locale/Makefile (lib): Likewise.
- * sunrpc/Makefile (lib): Likewise.
-
- * sysdeps/unix/sysv/linux/fpathconf.c (LINUX_LINK_MAX): Move macro ...
- * sysdeps/unix/sysv/linux/linux_fsinfo.h (LINUX_LINK_MAX): ... here.
- * sysdeps/unix/sysv/linux/pathconf.h: New file.
- (statfs_link_max): New function, guts from fpathconf.c.
- * sysdeps/unix/sysv/linux/fpathconf.c: Rewritten using that.
- * sysdeps/unix/sysv/linux/pathconf.c (__pathconf): Likewise.
- * sysdeps/unix/sysv/linux/alpha/pathconf.c (__pathconf): Rewritten
- to use the linux/pathconf.c code by #include rather than duplication.
- * sysdeps/unix/sysv/linux/alpha/fpathconf.c (__pathconf): Likewise.
-
-2002-10-16 Jakub Jelinek <jakub@redhat.com>
-
- * sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_ERROR_HANDLER):
- Use __libc_errno only for libc itself.
-
-2002-10-16 Andreas Jaeger <aj@suse.de>
-
- * sysdeps/x86_64/_mcount.S: Fix off-by-1 error in argument access.
-
-2002-10-16 Ulrich Drepper <drepper@redhat.com>
-
- * sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER):
- Use __libc_errno only for libc itself.
-
-2002-10-15 Roland McGrath <roland@redhat.com>
- Jakub Jelinek <jakub@redhat.com>
-
- * sysdeps/unix/sysv/linux/Makefile
- ($(objpfx)syscall-%.h $(objpfx)syscall-%.d): Take code from
- sparc/Makefile to produce a bi-arch file as needed.
- That's now parameterized by the variable $(64bit-predefine).
- Use LC_ALL=C for `comm' commands in that rule.
- No longer conditional on [$(no_syscall_list_h)].
- * sysdeps/unix/sysv/linux/sparc/Makefile: Remove replacement rules.
- (64bit-predefine): New variable.
- * sysdeps/unix/sysv/linux/x86_64/Makefile: Likewise.
- * sysdeps/unix/sysv/linux/s390/Makefile: New file.
- * sysdeps/unix/sysv/linux/powerpc/Makefile
- (64bit-predefine): New variable.
-
-2002-10-15 Roland McGrath <roland@redhat.com>
-
- * sysdeps/unix/sysv/linux/Makefile
- ($(objpfx)syscall-%.h $(objpfx)syscall-%.d)
-
- * login/utmp-private.h: Declare __libc_utmp_lock.
- * sysdeps/unix/getlogin_r.c (getlogin_r): Take __libc_utmp_lock once
- and call __libc_utmp_jump_table functions directly, instead of using
- __setutent et al.
-
- * sysdeps/unix/sysv/linux/configure.in: Use case instead of if.
- * sysdeps/unix/sysv/linux/configure: Regenerated.
-
- * sysdeps/gnu/bits/utmp.h: Include <bits/wordsize.h>.
- (struct lastlog) [__WORDSIZE == 64 && __WORDSIZE_COMPAT32]:
- Use int32_t for ll_time.
- (struct utmp) [__WORDSIZE == 64 && __WORDSIZE_COMPAT32]:
- Use int32_t instead of long int for ut_session.
- Use an anonymous struct with 32-bit fields for ut_tv.
- * sysdeps/gnu/bits/utmpx.h: Include <bits/wordsize.h>.
- (struct utmpx) [__WORDSIZE == 64 && __WORDSIZE_COMPAT32]: Do the same
- here as in utmp.h for `struct utmp'.
- * sysdeps/unix/sysv/linux/powerpc/bits/utmp.h: File removed.
- * sysdeps/unix/sysv/linux/powerpc/bits/utmpx.h: File removed.
- * sysdeps/unix/sysv/linux/sparc/bits/utmp.h: File removed.
- * sysdeps/unix/sysv/linux/sparc/bits/utmpx.h: File removed.
- * sysdeps/unix/sysv/linux/x86_64/bits/utmp.h: File removed.
- * sysdeps/unix/sysv/linux/x86_64/bits/utmpx.h: File removed.
-
- * sysdeps/unix/sysv/linux/bits/resource.h: Replaced with the contents
- of the sysdeps/unix/sysv/linux/i386/bits/resource.h file.
- All the following files were identical or equivalent to it.
- * sysdeps/unix/sysv/linux/i386/bits/resource.h: File removed.
- * sysdeps/unix/sysv/linux/arm/bits/resource.h: File removed.
- * sysdeps/unix/sysv/linux/cris/bits/resource.h: File removed.
- * sysdeps/unix/sysv/linux/hppa/bits/resource.h: File removed.
- * sysdeps/unix/sysv/linux/ia64/bits/resource.h: File removed.
- * sysdeps/unix/sysv/linux/m68k/bits/resource.h: File removed.
- * sysdeps/unix/sysv/linux/powerpc/bits/resource.h: File removed.
- * sysdeps/unix/sysv/linux/s390/bits/resource.h: File removed.
- * sysdeps/unix/sysv/linux/sh/bits/resource.h: File removed.
- * sysdeps/unix/sysv/linux/x86_64/bits/resource.h: File removed.
-
- * sysdeps/unix/sysv/linux/bits/socket.h (struct msghdr): Use size_t
- instead of int for msg_iovlen, instead of socklen_t for msg_controllen.
- Other than the previously incorrect sign of msg_iovlen, this is a
- no-op on 32-bit platforms. On 64-bit platforms it makes this header
- match their layouts as well, so the following are now identical to it.
- * sysdeps/unix/sysv/linux/s390/bits/socket.h: File removed.
- * sysdeps/unix/sysv/linux/sparc/bits/socket.h: File removed.
- * sysdeps/unix/sysv/linux/x86_64/bits/socket.h: File removed.
- * sysdeps/unix/sysv/linux/ia64/bits/socket.h: File removed.
- * sysdeps/unix/sysv/linux/alpha/bits/socket.h: File removed.
-
-2002-10-15 Ulrich Drepper <drepper@redhat.com>
-
- * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_VFORK_SYSCALL):
- Define for 2.4+ kernels.
-
- * sysdeps/unix/sysv/linux/i386/vfork.S: Optimize for kernels which
- are known to have the vfork syscall. Don't confuse the CPUs
- branch prediction unit by jumping to the return address.
-
- * sysdeps/unix/sysv/linux/alpha/fpathconf.c (__fpathconf): Add
- support for reiserfs and xfs.
-
- * sysdeps/unix/sysv/linux/fpathconf.c (__fpathconf): Add case for
- XFS link count.
- * sysdeps/unix/sysv/linux/linux_fsinfo.h: Define XFS_SUPER_MAGIC
- and XFS_LINK_MAX.
- Patch by Eric Sandeen <sandeen@sgi.com> [PR libc/4706].
-
-2002-10-16 Jakub Jelinek <jakub@redhat.com>
-
- * include/libc-symbols.h (attribute_tls_model_ie): Define.
- * include/errno.h (errno): Define to __libc_errno in libc.so.
- Add attribute_tls_model_ie.
- * include/netdb.h (h_errno): Define to __libc_h_errno in libc.so.
- Add attribute_tls_model_ie.
- * include/resolv.h (_res): Define to __libc_res in libc.so. Add
- attribute_tls_model_ie.
- * inet/herrno.c (__libc_h_errno): Add hidden alias to h_errno.
- (h_errno): Define.
- * resolv/res_libc.c (__libc_res): Add hidden alias to _res.
- (_res): Define.
- * sysdeps/generic/bits/libc-tsd.h (__libc_tsd_define): Add
- attribute_tls_model_ie.
- * sysdeps/generic/errno-loc.c (errno): Only undefine if not using
- __thread.
- * sysdeps/generic/errno.c (__libc_errno): Add hidden alias to errno.
- * sysdeps/unix/sysv/linux/i386/sysdep.h (SYSCALL_ERROR_HANDLER): Use
- __libc_errno in USE___THREAD case.
- * sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_ERROR_HANDLER):
- Likewise.
- * configure.in (HAVE_TLS_MODEL_ATTRIBUTE): Check for
- __attribute__((tls_model (""))).
- * configure: Rebuilt.
- * config.h.in (HAVE_TLS_MODEL_ATTRIBUTE): Add.
-
-2002-10-15 Ulrich Drepper <drepper@redhat.com>
-
- * timezone/asia: Update from tzdata2002d.
- * timezone/australasia: Likewise.
- * timezone/iso3166.tab: Likewise.
- * timezone/southamerica: Likewise.
- * timezone/zone-tab: Likewise.
-
-2002-10-15 Roland McGrath <roland@redhat.com>
-
- * sysdeps/generic/dl-tls.c (_dl_deallocate_tls) [TLS_TCB_AT_TP]:
- Adjust TCB pointer before calling free, so we get the whole block.
-
-2002-10-14 Roland McGrath <roland@redhat.com>
-
- * sysdeps/unix/sysv/linux/x86_64/sigaction.c
- [HAVE_HIDDEN && !HAVE_BROKEN_VISIBILITY_ATTRIBUTE]: Declare restore_rt
- extern using attribute_hidden instead of static, avoids warning.
-
-2002-10-09 Jakub Jelinek <jakub@redhat.com>
-
- * sysdeps/unix/sysv/linux/configure.in: Use */lib64 for s390x too.
- * sysdeps/unix/sysv/linux/configure: Rebuilt.
-
-2002-10-14 Ulrich Drepper <drepper@redhat.com>
-
- * po/sv.po: Update from translation team.
-
-2002-10-12 H.J. Lu <hjl@gnu.org>
-
- * sunrpc/thrsvc.c (PROCQUIT): New.
- (struct rpc_arg): New.
- (dispatch): Call exit (0) if request->rq_proc == PROCQUIT.
- (test_one_call): Take struct rpc_arg * instead of CLIENT *c.
- (thread_wrapper): Modified for struct rpc_arg * and call PROCQUIT.
- (main): Modified for struct rpc_arg *.
-
-2002-10-14 Ulrich Drepper <drepper@redhat.com>
-
- * dirent/scandir.c: Rearrange code a bit to reduce binary size.
-
-2002-10-14 Jakub Jelinek <jakub@redhat.com>
-
- * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Include tls.h.
- (SYSCALL_ERROR_HANDLER): Use RTLD_PRIVATE_ERRNO sequence
- in ld.so even if __thread is supported.
-
-2002-10-13 Jakub Jelinek <jakub@redhat.com>
-
- * sysdeps/unix/sysv/linux/arm/profil-counter.h (profil_counter):
- Add hack to prevent the compiler from clobbering the signal context.
- * sysdeps/unix/sysv/linux/sh/profil-counter.h (profil_counter):
- Likewise.
- * sysdeps/unix/sysv/linux/x86_64/profil-counter.h (profil_counter):
- Likewise.
-
-2002-10-14 Andreas Jaeger <aj@suse.de>
-
- * sysdeps/mips/fpu/libm-test-ulps: Regenerated by
- Guido Guenther <agx@sigxcpu.org>.
-
-2002-10-14 Ulrich Drepper <drepper@redhat.com>
-
- * po/sk.po: Update from translation team.
-
-2002-09-26 Roland McGrath <roland@redhat.com>
-
- * elf/dl-load.c (_dl_dst_count, _dl_dst_substitute): Handle $LIB
- dynamic string tag.
- * elf/Makefile ($(objpfx)trusted-dirs.st): Make the output define
- DL_DST_LIB based on $(slibdir).
-
-2002-10-13 Roland McGrath <roland@frob.com>
-
- * elf/rtld-Rules ($(objpfx)rtld-libc.a): Use $(verbose) in ar command.
-
- * sysdeps/mach/hurd/getresuid.c: New file.
- * sysdeps/mach/hurd/getresgid.c: New file.
- * sysdeps/mach/hurd/setresuid.c: New file.
- * sysdeps/mach/hurd/setresgid.c: New file.
-
- * posix/unistd.h [__USE_GNU] (getresuid, getresgid, setresuid,
- setresgid): Declare them.
- * NEWS: Mention it.
- * include/unistd.h
- (__getresuid, __getresgid, __setresuid, __setresgid): Declare them,
- add libc_hidden_proto.
- * posix/Versions (libc: GLIBC_2.3.2): New set. Add
- getresuid, getresgid, setresuid, setresgid here.
- * Versions.def (libc): Define GLIBC_2.3.2 set.
- * sysdeps/generic/getresuid.c (__getresuid): Fix argument types.
- Add libc_hidden_def.
- * sysdeps/generic/getresgid.c (__getresgid): Likewise.
- * sysdeps/generic/setresgid.c: New file.
- * sysdeps/generic/setresuid.c: New file.
- * sysdeps/unix/sysv/linux/Makefile [$(subdir) = misc]
- (sysdep_routines): Don't add getresuid and getresgid here.
- * sysdeps/unix/sysv/linux/arm/Makefile [$(subdir) = misc]
- (sysdep_routines): Don't add setresuid and setresgid here.
- * sysdeps/unix/sysv/linux/cris/Makefile: Likewise.
- * sysdeps/unix/sysv/linux/sh/Makefile: Likewise.
- * sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Likewise.
- * sysdeps/unix/sysv/linux/s390/s390-64/Makefile: Likewise.
- * sysdeps/unix/sysv/linux/i386/Makefile: Likewise.
- * sysdeps/unix/sysv/linux/m68k/Makefile: Likewise.
- * posix/Makefile (routines): Add them all here instead.
- * sysdeps/unix/sysv/linux/i386/getresuid.c (getresuid): Renamed to
- __getresuid. Add libc_hidden_def for that, and weak alias to old name.
- * sysdeps/unix/sysv/linux/i386/getresgid.c (getresgid): Renamed to
- __getresgid. Add libc_hidden_def for that, and weak alias to old name.
- * sysdeps/unix/sysv/linux/i386/setresuid.c: Add libc_hidden_def.
- [! __NR_setresuid]: Include generic file.
- * sysdeps/unix/sysv/linux/i386/setresgid.c (setresgid): Renamed to
- __setresgid. Add libc_hidden_def for that, and weak alias to old name.
- [! __NR_setresuid]: Include generic file.
- * sysdeps/unix/sysv/linux/syscalls.list (setresuid, setresgid):
- Caller is - now, not EXTRA.
- * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list
- (setresuid, setresgid, getresuid, getresgid): Likewise.
- * sysdeps/unix/sysv/linux/syscalls.list (getresuid, getresgid):
- Add these calls here.
- * sysdeps/unix/sysv/linux/alpha/syscalls.list: Remove them here.
- * sysdeps/unix/sysv/linux/hppa/syscalls.list: Likewise.
- * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
- * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise.
- * sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise.
- * sysdeps/unix/sysv/linux/powerpc/powerpc32/syscalls.list: Likewise.
- * sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: Likewise.
- * sysdeps/unix/sysv/linux/mips/syscalls.list: Likewise.
- * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
-
- * sysdeps/unix/sysv/linux/Makefile [$(subdir) = misc]
- (sysdep_routines): Add setfsuid and setfsgid here.
- * sysdeps/unix/sysv/linux/arm/Makefile: Not here.
- * sysdeps/unix/sysv/linux/sparc/sparc32/Makefile: Likewise.
- * sysdeps/unix/sysv/linux/cris/Makefile: Likewise.
- * sysdeps/unix/sysv/linux/sh/Makefile: Likewise.
- * sysdeps/unix/sysv/linux/s390/s390-32/Makefile: Likewise.
- * sysdeps/unix/sysv/linux/s390/s390-64/Makefile: Likewise.
- * sysdeps/unix/sysv/linux/i386/Makefile: Likewise.
- * sysdeps/unix/sysv/linux/m68k/Makefile: Likewise.
-
- * hurd/errno.c: Renamed to ...
- * hurd/errno-loc.c: ... this.
- * hurd/Makefile (routines): errno -> errno-loc
-
-2002-10-13 Ulrich Drepper <drepper@redhat.com>
-
- * po/de.po: Update from translation team.
-
- * MakeTAGS: Add -E flag to xgettext runs.
-
-2002-10-12 Ulrich Drepper <drepper@redhat.com>
-
- * po/fr.po: Update from translation team.
-
- * sysdeps/posix/system.c: Remove support for old and buggy SCO systems.
- Optimize a bit for use in glibc.
-
-2002-10-12 Roland McGrath <roland@redhat.com>
-
- * stdio-common/tst-rndseek.c (TIMEOUT): Increase to 10 seconds.
- Some machines are slow. Guido Guenther <agx@sigxcpu.org> has one.
-
-2002-10-12 Ulrich Drepper <drepper@redhat.com>
-
- * po/sv.po: Update from translation team.
-
-2002-10-11 Isamu Hasegawa <isamu@yamato.ibm.com>
-
- * posix/regcomp.c (re_compile_fastmap_iter): Remove the handling
- OP_CONTEXT_NODE.
- (regfree): Likewise.
- (create_initial_state): Likewise.
- (analyze): Remove the substitutions which became useless.
- (calc_first): Likewise.
- (calc_epsdest): Use edests of OP_BACK_REF in case that it has
- epsilon destination.
- (duplicate_node_closure): New function.
- (duplicate_node): Remove the handling OP_CONTEXT_NODE.
- (calc_inveclosure): Likewise.
- (calc_eclosure): Likewise.
- (calc_eclosure_iter): Invoke duplicate_node_closure instead of
- direct invocation of duplicate_node.
- (parse): Don't use comma operator in the return to avoid compiler
- warning.
- (parse_reg_exp): Likewise.
- (parse_branch): Likewise.
- (parse_expression): Likewise.
- (parse_sub_exp): Likewise.
- (parse_dup_op): Likewise.
- * posix/regex_internal.c (re_dfa_add_node): Remove the substitutions
- which became useless.
- (create_ci_newstate): Remove the handling OP_CONTEXT_NODE.
- (create_cd_newstate): Likewise.
- * posix/regex_internal.h (re_token_type_t): Remove the obsolete type.
- (re_token_t): Likewise.
- (re_dfa_t): Likewise.
- (re_node_set_remove): New macro.
- * posix/regexec.c (check_matching): Remove the handling
- OP_CONTEXT_NODE.
- (check_halt_node_context): Likewise.
- (proceed_next_node): Likewise.
- (pop_fail_stack): Fix the memory leak.
- (set_regs): Likewise.
- (free_fail_stack_return): New function.
- (sift_states_backward): Fix the memory leak. Remove the handling
- OP_CONTEXT_NODE.
- (update_cur_sifted_state): Append some if clause to avoid redundant
- call.
- (sub_epsilon_src_nodes): Use IS_EPSILON_NODE since it might be a
- back reference.
- (check_dst_limits): Remove the handling OP_CONTEXT_NODE.
- (check_subexp_limits): Likewise.
- (search_subexp): Likewise.
- (sift_states_bkref): Likewise.
- (transit_state_mb): Likewise.
- (transit_state_bkref_loop): Likewise.
- (transit_state_bkref_loop): Likewise.
- (group_nodes_into_DFAstates): Likewise.
- (check_node_accept): Likewise.
- (sift_ctx_init): Add initializing.
-
-2002-10-12 Ulrich Drepper <drepper@redhat.com>
-
- * sysdeps/unix/sysv/linux/i386/sysdep.h (INLINE_SYSCALL): Use
- __builtin_expect.
-
-2002-10-11 Ulrich Drepper <drepper@redhat.com>
-
- * elf/dl-load.c (_dl_map_object_from_fd): Remove unnecessarily
- duplicated variable c.
-
- * sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Use INTERNAL_SYSCALL
- if possible.
-
- * sysdeps/unix/sysv/linux/i386/sysdep.h
- (INTERNAL_SYSCALL_ERROR_P): New define.
- (INTERNAL_SYSCALL_ERRNO): Likewise.
-
- * sysdeps/unix/sysv/linux/i386/profil-counter.h (profil_counter):
- Add hack to prevent the compiler from clobbering the signal context.
-
-2002-10-11 Roland McGrath <roland@redhat.com>
-
- * sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_ERROR_HANDLER):
- Fix typos.
-
- * sysdeps/generic/dl-lookupcfg.h: Include <tls.h>.
- * sysdeps/sh/dl-lookupcfg.h: File removed.
- * sysdeps/i386/dl-lookupcfg.h: File removed.
-
- * sysdeps/unix/sysv/linux/x86_64/sysdep.h (SYSCALL_ERROR_HANDLER): Add
- missing labels and ; from last change.
-
- * stdio-common/tst-sscanf.c (val_double): Append .0 to large whole
- number literals, so they are doubles instead of ints.
-
-2002-10-09 Roland McGrath <roland@redhat.com>
-
- * sysdeps/generic/bits/libc-tsd.h [USE___THREAD]: Conditional
- changed from [USE_TLS && HAVE___THREAD].
-
- * sysdeps/i386/dl-machine.h (elf_machine_type_class, elf_machine_rel):
- Disable TLS relocs if [RTLD_BOOTSTRAP && !USE___THREAD].
- * sysdeps/x86_64/dl-machine.h
- (elf_machine_type_class, elf_machine_rela): Likewise.
- * sysdeps/sh/dl-machine.h (elf_machine_type_class, elf_machine_rela):
- Likewise.
-
- * include/link.h (struct link_map): Remove member l_tls_tp_initialized.
- * elf/rtld.c (_dl_start_final, dl_main): Don't use it.
- (_dl_start): Conditionalize PT_TLS check on [USE___THREAD].
-
- * sysdeps/i386/dl-tls.h (__TLS_GET_ADDR): Use ___tls_get_addr_internal
- instead of ___tls_get_addr.
- (___tls_get_addr_internal): Add attribute_hidden to decl.
-
- * sysdeps/generic/ldsodefs.h (struct rtld_global): New variable
- _dl_error_catch_tsd.
- * elf/rtld.c (startup_error_tsd): New function.
- (dl_main): Point _dl_error_catch_tsd at that.
- * elf/dl-error.c: Don't use libc-tsd.h for DL_ERROR,
- use new function pointer instead.
- * elf/dl-tsd.c: New file.
- * elf/Makefile (routines): Add it.
-
-2002-10-07 Roland McGrath <roland@redhat.com>
-
- * elf/dl-misc.c (_dl_debug_vdprintf): Use INTERNAL_SYSCALL macro for
- writev if it's available. Otherwise if [RTLD_PRIVATE_ERRNO] then
- take _dl_load_lock around calling __writev.
-
- * sysdeps/unix/sysv/linux/i386/sysdep.h (INTERNAL_SYSCALL): New macro.
- (INLINE_SYSCALL): Use that.
-
- * sysdeps/generic/dl-sysdep.h: New file.
- * sysdeps/mach/hurd/dl-sysdep.h: New file.
- * sysdeps/generic/ldsodefs.h: Include <dl-sysdep.h>.
- * include/errno.h [IS_IN_rtld]: Include <dl-sysdep.h> to define ...
- [RTLD_PRIVATE_ERRNO]: Use a hidden global variable for errno and
- access it directly.
- * elf/dl-minimal.c (__errno_location): Removed.
- * sysdeps/unix/i386/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
- Use GOTOFF access for errno.
- * sysdeps/unix/sysv/linux/i386/sysdep.h
- [RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
-
- * sysdeps/unix/x86_64/sysdep.S (__syscall_errno) [RTLD_PRIVATE_ERRNO]:
- Use PC-relative access for errno.
- * sysdeps/unix/sysv/linux/x86_64/sysdep.h
- [RTLD_PRIVATE_ERRNO] (SYSCALL_ERROR_HANDLER): Likewise.
-
- * include/tls.h: New file.
- (USE___THREAD): New macro.
- Define to 1 under [USE_TLS && HAVE___THREAD] and only when compiling
- libc or libpthread.
- * sysdeps/unix/sysv/linux/i386/sysdep.h [USE___THREAD]: Conditional
- changed from [USE_TLS && HAVE___THREAD].
- * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise.
- * sysdeps/unix/i386/sysdep.S: Likewise.
- * sysdeps/unix/x86_64/sysdep.S: Likewise.
- * include/errno.h: Likewise.
- * include/netdb.h: Likewise.
- * include/resolv.h: Likewise.
-
- * sysdeps/generic/errno.c: New file.
- * csu/Makefile (aux): New variable, list errno.
- * sysdeps/unix/sysv/linux/i386/sysdep.S (errno, _errno): Remove defns.
- * sysdeps/unix/sysv/linux/m68k/sysdep.S: Likewise.
- * sysdeps/unix/sysv/linux/x86_64/sysdep.S: Likewise.
- * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise.
- * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise.
- * sysdeps/unix/sysv/linux/arm/sysdep.S: Likewise.
- * sysdeps/unix/sysv/linux/cris/sysdep.S: Likewise.
- * sysdeps/unix/sysv/linux/hppa/sysdep.c: Likewise.
- * sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise.
- * sysdeps/unix/sysv/linux/powerpc/sysdep.c: Likewise.
- * sysdeps/unix/sysv/linux/sparc/sysdep.S: Likewise.
- * sysdeps/unix/sysv/linux/sh/sysdep.S: Likewise.
- * sysdeps/unix/alpha/sysdep.S: Likewise.
- * sysdeps/generic/start.c: Likewise.
- * sysdeps/unix/start.c: Likewise.
- * sysdeps/unix/arm/start.c: Likewise.
- * sysdeps/unix/bsd/ultrix4/mips/start.S: Likewise.
- * sysdeps/unix/sparc/start.c: Likewise.
- * sysdeps/unix/sysv/irix4/start.c: Likewise.
- * sysdeps/unix/sysv/linux/mips/sysdep.S: File removed.
-
- * manual/search.texi (Tree Search Function, Hash Search Function):
- Mention search.h clearly.
-
-2002-10-05 Roland McGrath <roland@redhat.com>
-
- * elf/dl-fxstat64.c: File removed.
- * elf/dl-xstat64.c: File removed.
- * elf/Makefile (rtld-routines): Remove them.
- * sysdeps/unix/sysv/linux/xstat64.c: Remove RTLD_STAT64 conditionals.
- Instead, use strong_alias instead of versioned_symbol in the
- !SHLIB_COMPAT case.
- * sysdeps/unix/sysv/linux/fxstat64.c: Likewise.
- * sysdeps/unix/sysv/linux/lxstat64.c: Likewise.
-
- * include/shlib-compat.h
- (SHLIB_COMPAT): Require that IS_IN_##lib be defined nonzero.
- [! NOT_IN_libc] (IS_IN_libc): Define it.
- * cppflags-iterator.mk (CPPFLAGS-$(cpp-src)): Use -Dx=1 not just -Dx.
- * elf/Makefile (CPPFLAGS-.os): Likewise.
-
- * sunrpc/rpc_main.c (main): Don't declare with noreturn attribute.
- Return the status instead of calling exit.
-
- * Makeconfig (CFLAGS): Prepend -std=gnu99.
- * Makerules (+make-deps): Use $(CFLAGS) only for .c sources.
- Remove superfluous rm command, whose @ plus make bugs hid
- all these commands from the make output.
-
- * include/stubs-prologue.h: New file. Give #error under #ifdef _LIBC.
- * Makefile ($(inst_includedir)/gnu/stubs.h): Depend on it.
- Use that file's contents instead of literal echo's for the prologue.
- * include/features.h: Include <gnu/stubs.h> unconditionally.
- * include/gnu/stubs.h: New file.
-
-2002-09-30 Roland McGrath <roland@redhat.com>
-
- * elf/rtld-Rules: New file.
- * elf/Makefile ($(objpfx)librtld.map, $(objpfx)librtld.mk,
- $(objpfx)rtld-libc.a): New targets.
- (generated): Add them.
- (reloc-link): Remove -o $@ from the variable.
- ($(objpfx)dl-allobjs.os): Add -o $@ after $(reloc-link).
- (distribute): Add rtld-Rules.
- (CPPFLAGS-.os): Define this instead of CFLAGS-.os.
- * Makerules ($(+sysdir_pfx)sysd-rules): Emit rules for rtld-% targets.
- (common-mostlyclean, common-clean): Clean up rtld-* files.
- * sysdeps/unix/make-syscalls.sh: Add rtld-*.os target name to rules.
-
-2003-05-20 Jakub Jelinek <jakub@redhat.com>
-
- * elf/dynamic-link.h (elf_get_dynamic_info): Add temp argument.
- If temp != NULL, copy dynamic entries which need relocation to temp
- array before relocating.
- (DL_RO_DYN_TEMP_CNT): Define.
- * elf/dl-load.c (_dl_map_object_from_fd): Adjust caller.
- * elf/rtld.c (_dl_start): Likewise.
- (dl_main): Likewise. Add dyn_temp static variable.
-
-2002-10-11 Roland McGrath <roland@redhat.com>
-
- * sysdeps/generic/dl-tls.c (__tls_get_addr): After freeing block in
- now-unused dtv slot, reset the slot to TLS_DTV_UNALLOCATED.
-
- * elf/tls-macros.h [__x86_64__] (TLS_GD): Fix the sequence with the
- proper set of no-op insn prefixes.
-
- * elf/tst-tls8.c (do_test): Use %zd format for l_tls_modid members.
-
-2002-10-11 Ulrich Drepper <drepper@redhat.com>
-
- * sysdeps/unix/sysv/linux/execve.c: Don't try calling
- __pthread_kill_other_threads_np.
-
- * sysdeps/generic/pselect.c: Avoid unnecessary sigprocmask calls.
-
-2002-10-08 Roland McGrath <roland@redhat.com>
-
- * locale/newlocale.c (__newlocale): If setting all categories to "C",
- just return &_nl_C_locobj instead of copying it.
- * locale/freelocale.c (__freelocale): Check for &_nl_C_locobj.
- * locale/duplocale.c (__duplocale): Likewise.
-
-2002-10-07 Roland McGrath <roland@frob.com>
-
- * config.h.in (HAVE_I386_SET_GDT): New #undef.
- * sysdeps/mach/configure.in: Define it with new check for i386_set_gdt.
- * sysdeps/mach/configure: Regenerated.
-
-2002-10-06 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
-
- * sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h (INLINE_SYSCALL):
- Add all necessary register outputs for syscall-clobbered registers.
-
-2002-10-02 David Mosberger <davidm@hpl.hp.com>
-
- * sysdeps/ia64/bzero.S: Rewritten by Sverre Jarp to tune for
- Itanium 2 (and Itanium).
- Fix unwind directives and make it fit in 80 columns.
- * sysdeps/ia64/memset.S: Likewise.
- * sysdeps/ia64/memcpy.S: Likewise.
- Move jump table to .rodata section.
-
-2002-10-03 Roland McGrath <roland@frob.com>
-
- * sysdeps/mach/hurd/i386/init-first.c (_hurd_stack_setup): Add
- clobbers to asm.
-
-2002-10-10 Andreas Jaeger <aj@suse.de>
-
- * sysdeps/x86_64/_mcount.S: Restore correct registers.
-
-2002-10-10 Ulrich Drepper <drepper@redhat.com>
-
- * posix/Versions (libc) [GLIBC_PRIVATE]: Add __pselect.
-
-2002-10-09 Ulrich Drepper <drepper@redhat.com>
-
- * sysdeps/generic/ldsodefs.h: Remove attribute_hidden from
- _dl_allocate_tls_init. Add rtld_hidden_proto.
- * sysdeps/generic/dl-tls.c (_dl_allocate_tls_init): Add
- rtld_hidden_def.
- * elf/Versions (ld) [GLIBC_PRIVATE]: Add _dl_allocate_tls_init.
-
- * version.h (VERSION): Bump to 2.3.1.
-
- * Make-dist: Add back one of the tar invocations removed before.
-
- * stdlib/Makefile (distribute): Add allocalim.h.
-
- * sysdeps/generic/bits/libc-tsd.h [!(USE_TLS && HAVE___THREAD)]
- (__libc_tsd_address): Use correct variable name.
- Patch by Stefan Jones <stefan.jones@multigig.com>.
-
- * sysdeps/unix/sysv/linux/ia64/getcontext.S: Add missing ;;.
- Reported by edwardsg@sgi.com [PR libc/4678].
-
- * Versions.def (libc): Add GLIBC_2.3.1.
- (libpthread): Add GLIBC_2.3.1.
-
- * include/signal.h: Add libc_hidden_proto for __sigwait, __sigwaitinfo,
- and __sigtimedwait.
- * signal/Versions: Add __sigtimedwait, __sigwait, and __sigwaitinfo.
- * sysdeps/unix/sysv/linux/sigtimedwait.c (__sigtimedwait): Add
- libc_hidden_def.
- * sysdeps/unix/sysv/linux/sigwait.c (__sigwait): Likewise.
- * sysdeps/unix/sysv/linux/sigwaitinfo.c (__sigwaitinfo): Likewise.
-
- * include/sys/msg.h: Declare __libc_msgrcv and __libc_msgsnd.
- * sysdeps/unix/sysv/linux/msgrcv.c (__msgrcv): Rename to __libc_msgrcv
- and make old name an alias.
- * sysdeps/unix/sysv/linux/msgsnd.c (__msgsnd): Rename to __libc_msgsnd
- and make old name an alias.
- * sysvipc/Versions (libc) [GLIBC_PRIVATE]: Add __libc_msgrcv and
- __libc_msgsnd.
-
- * include/sys/uio.h: Declare __libc_readv and __libc_writev.
- * misc/Versions (libc) [GLIBC_PRIVATE]: Add __libc_readv and
- __libc_writev.
- * sysdeps/generic/readv.c (__readv): Rename to __libc_readv and make
- old name an alias.
- * sysdeps/posix/readv.c: Likewise
- * sysdeps/unix/sysv/aix/readv.c: Likewise.
- * sysdeps/unix/sysv/linux/readv.c: Likewise.
- * sysdeps/generic/writev.c (__writev): Rename to __libc_writev and make
- old name an alias.
- * sysdeps/posix/writev.c: Likewise
- * sysdeps/unix/sysv/aix/writev.c: Likewise.
- * sysdeps/unix/sysv/linux/writev.c: Likewise.
-
- * include/sys/wait.h: Declare __waitid.
- * posix/Versions (libc) [GLIBC_PRIVATE]: Add __waitid.
- * sysdeps/generic/waitid.c (waitid): Rename to __waitid and make old
- name an alias.
- * sysdeps/posix/waitid.c: Likewise.
- * sysdeps/unix/sysv/aix/waitid.c: Likewise.
-
- * sysdeps/unix/sysv/linux/syscalls.list: Add creat syscall.
-
-2002-10-07 Jakub Jelinek <jakub@redhat.com>
-
- * include/alloca.h (__libc_use_alloca, __libc_alloca_cutoff): New
- prototypes.
- (__MAX_ALLOCA_CUTOFF): Define.
- Include allocalim.h.
- * resolv/nss_dns/dns-host.c (_nss_dns_gethostbyname2_r,
- _nss_dns_gethostbyaddr_r): Use alloca or malloc to allocate
- host_buffer depending on __libc_use_alloca.
- * resolv/nss_dns/dns-network.c (_nss_dns_getnetbyname_r,
- _nss_dns_getnetbyaddr_r): Use alloca or malloc to allocate
- net_buffer depending on __libc_use_alloca.
- * resolv/res_query.c (res_nquery): Use alloca or malloc to allocate
- buf depending on __libc_use_alloca.
- * resolv/gethnamaddr.c (gethostbyname2, gethostbyaddr): Likewise.
- * stdio-common/vfprintf.c (vfprintf): Use __libc_use_alloca
- instead of hardcoded constants.
- Pass proper size argument to alloca and compute end for wide char
- version.
- * stdio-common/printf_fp.c (__printf_fp): Use __libc_use_alloca
- instead of hardcoded constants.
- * string/strcoll.c (strcoll): Likewise.
- * string/strxfrm.c (strxfrm): Likewise.
- * sysdeps/posix/readv.c (__readv): Likewise.
- * sysdeps/posix/writev.c (__writev): Likewise.
- * sysdeps/generic/allocalim.h: New file.
-
-2002-10-08 Roland McGrath <roland@redhat.com>
-
- * configure.in (aux_missing warning): Change "too old" to
- "incompatible versions", since for autoconf it's "too new" right now.
- * configure: Regenerated.
-
- * configure.in (AUTOCONF): New check to set it. Set to "no" if the
- one found doesn't work on our configure.in.
- * configure: Regenerated.
- * config.make.in (AUTOCONF): New substituted variable.
- * Makefile (autoconf-it-cvs): New canned sequence, broken out of ...
- (autoconf-it): ... here, use that instead of defining conditionally.
- Use $(AUTOCONF) instead of literal autoconf.
- [$(AUTOCONF) != no] (configure, %/configure): Protect these rules
- with this condition.
- * Make-dist (autoconf-it, configure, %/configure): Copy those changes.
-
-2002-10-08 Ulrich Drepper <drepper@redhat.com>
-
- * Make-dist (dist): Cleanup a bit. We are not interested in the
- 14 char filename limit anymore. Remove intermediate files and
- symlinks.
-
-2002-10-05 Ulrich Drepper <drepper@redhat.com>
-
- * po/sk.po: Update from translation team.
- * po/tr.po: Likewise.
- * po/gl.po: Likewise.
-
-2002-10-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
-
- * elf/tls-macros.h: Fix SH version of macros so as to match ABI syntax.
-
-2002-10-03 Ulrich Drepper <drepper@redhat.com>
-
- * version.h (RELEASE): Change to stable.
-
-2002-10-03 Jakub Jelinek <jakub@redhat.com>
-
- * sysdeps/unix/sysv/linux/_exit.c (__syscall_exit,
- __syscall_exit_group): New prototypes.
-
-2002-10-03 Ulrich Drepper <drepper@redhat.com>
-
- * glibc 2.3 released.
-
-
-See ChangeLog.13 for earlier changes.
diff --git a/test/regex/tst-regexloc.c b/test/regex/tst-regexloc.c
deleted file mode 100644
index d862678e5..000000000
--- a/test/regex/tst-regexloc.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
- This file is part of the GNU C Library.
-
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
-
- The GNU C Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
-
-#include <sys/types.h>
-#include <regex.h>
-#include <locale.h>
-#include <stdio.h>
-
-int
-main (int argc, char *argv[])
-{
-/* If uclibc has extended locale, or if it's a host build
- * (assuming host libc always has locale): */
-#if defined __UCLIBC_HAS_XLOCALE__ || !defined __UCLIBC__
- regex_t re;
- regmatch_t mat[1];
- int exitcode = 1;
-
- if (setlocale (LC_ALL, "de_DE.ISO-8859-1") == NULL)
- puts ("cannot set locale");
- else if (regcomp (&re, "[a-f]*", 0) != REG_NOERROR)
- puts ("cannot compile expression \"[a-f]*\"");
- else if (regexec (&re, "abcdefCDEF", 1, mat, 0) == REG_NOMATCH)
- puts ("no match");
- else
- {
- exitcode = mat[0].rm_so != 0 || mat[0].rm_eo != 6;
- printf ("match from %d to %d - %s\n",
- mat[0].rm_so, mat[0].rm_eo,
- exitcode ? "WRONG!" : "ok"
- );
- }
-
- return exitcode;
-#else
- puts("Test requires locale; skipping");
- return 0;
-#endif
-}