X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:to:from:subject:message-id:date:mime-version
	:content-type; q=dns; s=default; b=UZr/W0YbS6WcXEjcmhW9A8yA2bJP/
	P23Rww8Avig8q6rnlY3A/XSAYjkQ36S6YwyiGWHapRrD2vcPRvykDS3nDnZ+dC/V
	GDNnSmEZRLzL6luY9ue1GkTAJp8/lSslXnI95TZ8VF/MlvwRLNXiedA7ioBlFHjE
	0eLNgqiyrws0+8=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:to:from:subject:message-id:date:mime-version
	:content-type; s=default; bh=xZCwTptQC2g/28LFqTLwPHAx4RY=; b=Re/
	Z3uVF1BOmXBTK+OKHo7NpHWbt80SvoSttfKzyP6toTnS7KVUh/NPyvxP5Xlsh71g
	pnUpGTEzfbjGisZNW/nwKHHaJfY7LgTAk/iGNdUyaAEF/alVPs60YmNHOgoGc7J6
	zmq7nFlMnyKDMtWqm6bdWo6mt4YEUvPlNp3rkdLg=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2
X-HELO: mail-io0-f182.google.com
X-Received: by 10.107.148.8 with SMTP id w8mr1282935iod.3.1447825971972;        Tue, 17 Nov 2015 21:52:51 -0800 (PST)
To: cygwin@cygwin.com
From: Dustin Boyd <chronokitsune3233@gmail.com>
Subject: fnmatch() doesn't work with character classes?
Message-ID: <564C122C.7080608@gmail.com>
Date: Wed, 18 Nov 2015 05:52:44 +0000
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------070300020907010102090601"

--------------070300020907010102090601
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

fnmatch() does not appear to work with character classes or character equivalents. regcomp(), however, does work with character classes, but not character equivalents. Is this behavior one should expect? I've tested with Debian, and it matches in both cases.

I sent this to the Cygwin ML rather than the Newlib ML just because of the fact that it may be locale-related, which is a problem on Cygwin's end, not Newlib's, if it's a problem at all.

The attached program will hopefully illustrate the trouble occurring on my Windows 10 machine:

regexec: 0 matched /[[:digit:]]/
fnmatch: 0 did not match /[[:digit:]]/
-- 
Sent using Mozilla Thunderbird

--------------070300020907010102090601
Content-Type: text/plain; charset=UTF-8;
 name="fnmatch_fail.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="fnmatch_fail.c"

I2RlZmluZSBfWE9QRU5fU09VUkNFIDcwMAojaW5jbHVkZSA8YXNzZXJ0Lmg+
CiNpbmNsdWRlIDxmbm1hdGNoLmg+CiNpbmNsdWRlIDxyZWdleC5oPgojaW5j
bHVkZSA8c3RkaW8uaD4KCmludAptYWluICh2b2lkKQp7CiAgcmVnZXhfdCBy
ZWc7CiAgY29uc3QgY2hhciAqcGF0dGVybiA9ICJbWzpkaWdpdDpdXSI7CiAg
Y29uc3QgY2hhciAqcyA9ICIwIjsKICBpbnQgY2ZsYWdzID0gUkVHX05PU1VC
OwoKICBhc3NlcnQocmVnY29tcCgmcmVnLCBwYXR0ZXJuLCBjZmxhZ3MpID09
IDApOwogIGlmIChyZWdleGVjKCZyZWcsIHMsIDAsIE5VTEwsIDApID09IFJF
R19OT01BVENIKQogICAgewogICAgICBwcmludGYoInJlZ2V4ZWM6ICVzIGRp
ZCBub3QgbWF0Y2ggLyVzL1xuIiwgcywgcGF0dGVybik7CiAgICB9CiAgZWxz
ZQogICAgewogICAgICBwcmludGYoInJlZ2V4ZWM6ICVzIG1hdGNoZWQgLyVz
L1xuIiwgcywgcGF0dGVybik7CiAgICB9CiAgcmVnZnJlZSgmcmVnKTsKCiAg
aWYgKGZubWF0Y2gocGF0dGVybiwgcywgMCkgPT0gRk5NX05PTUFUQ0gpCiAg
ICB7CiAgICAgIHByaW50ZigiZm5tYXRjaDogJXMgZGlkIG5vdCBtYXRjaCAv
JXMvXG4iLCBzLCBwYXR0ZXJuKTsKICAgIH0KICBlbHNlCiAgICB7CiAgICAg
IHByaW50ZigiZm5tYXRjaDogJXMgbWF0Y2hlZCAvJXMvXG4iLCBzLCBwYXR0
ZXJuKTsKICAgIH0KfQo=


--------------070300020907010102090601
Content-Type: text/plain; charset=us-ascii

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
--------------070300020907010102090601--
