mailing list of musl libc
 help / color / mirror / code / Atom feed
* Bug report for fnmatch.h
@ 2014-08-06  3:15 林冠儒
  0 siblings, 0 replies; only message in thread
From: 林冠儒 @ 2014-08-06  3:15 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 747 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 values are *DIFFERENT* !
I am confused which library is wrong?
Do you have any idea?
It would be very helpful if you email me back and tell me what's the problem

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2014-08-06  3:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-06  3:15 Bug report for fnmatch.h 林冠儒

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).