mailing list of musl libc
 help / color / mirror / code / Atom feed
* fnmatch.h bug?
@ 2014-08-06  3:01 林冠儒
  2014-08-06  6:28 ` Szabolcs Nagy
  0 siblings, 1 reply; 4+ messages in thread
From: 林冠儒 @ 2014-08-06  3:01 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

When I using the musl-libc "fnmatch" function, I found that the return
value is different from glibc.

For example:

musl-libc:
     i = fnmatch( "a\\.c" , "a\.c" , 0 ); // it will return 0 -> i = 0
glibc:
     i = fnmatch( "a\\.c" , "a\.c" , 0 ); // it will also return 0 -> i = 0

So, we know that "a.\\c" will escape " \ " in pattern and will NOT escape
in string.

But in the case:

musl-libc:
     i = fnmatch( "[[?*\\]" , "\\" , 0 ); // it will return 0 -> i = 0
glibc:
     i = fnmatch( "[[?*\\]" , "\\" , 0 ); // it will return 1 -> i = 1

The return value is DIFFERENT !
I am confuse which library is wrong?
If you have any idea, please response me and send an e-mail to me,
Thank you!

[-- Attachment #2: Type: text/html, Size: 1981 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-08-06 10:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-06  3:01 fnmatch.h bug? 林冠儒
2014-08-06  6:28 ` Szabolcs Nagy
2014-08-06 10:03   ` 林冠儒
2014-08-06 10:23     ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).