You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jim Jagielski <ji...@jaguNET.com> on 1997/11/07 03:11:29 UTC

That fnmatch stuff

The submitter's name was also given as Andrey A. Chernov, hence my
confusion. The message's From line uses what Dean put in the
CHANGES file, but there is also the one below as well :/

---------- Forwarded message ----------
Date: Thu, 23 Oct 1997 14:48:46 +0400 (MSD)
From: "[KOI8-R] ������ ������" <ac...@nagual.pp.ru>
To: dgaudet@hyperreal.org
Cc: apache-bugdb@apache.org, dgaudet@apache.org
Subject: Re: os-freebsd/1311: FreeBSD have better fnmatch.c but Apache still use its own broken version

On 23 Oct 1997 dgaudet@hyperreal.org wrote:

> Sorry, no.  If fnmatch is buggy, please report specific bugs, the
> version in there is from a recent FreeBSD tree.  We've
> had enough "Fun" dealing with OS-specific regex problems.  If
> we need to supply fnmatch for any OS, then we'll supply it for
> all of them.

Well, FreeBSD version really have many enhancements like CASEFOLD or
LEADING_DIR and l10n support, but real bugfix in the same abilities range
as Apache fnmatch is only one, here the patch:

*** src/main/fnmatch.c.orig	Thu Oct 16 22:57:01 1997
--- src/main/fnmatch.c	Thu Oct 23 14:37:04 1997
***************
*** 110,115 ****
--- 110,119 ----
  		return (FNM_NOMATCH);
  	    if (*string == '/' && flags & FNM_PATHNAME)
  		return (FNM_NOMATCH);
+ 	    if (*string == '.' && (flags & FNM_PERIOD) &&
+ 		(string == stringstart ||
+ 		((flags & FNM_PATHNAME) && *(string - 1) == '/')))
+ 		    return (FNM_NOMATCH);
  	    if ((pattern =
  		 rangematch(pattern, *string, flags)) == NULL)
  		return (FNM_NOMATCH);


-- 
Andrey A. Chernov
<ac...@nietzsche.net>
http://www.nagual.pp.ru/~ache/

-- 
====================================================================
      Jim Jagielski            |       jaguNET Access Services
     jim@jaguNET.com           |       http://www.jaguNET.com/
            "Look at me! I'm wearing a cardboard belt!"

Re: That fnmatch stuff

Posted by Dean Gaudet <dg...@arctic.org>.
I know, I just felt like having 8-bit characters in there.  You think
it'll break anything?

Dean

On Thu, 6 Nov 1997, Jim Jagielski wrote:

> The submitter's name was also given as Andrey A. Chernov, hence my
> confusion. The message's From line uses what Dean put in the
> CHANGES file, but there is also the one below as well :/
> 
> ---------- Forwarded message ----------
> Date: Thu, 23 Oct 1997 14:48:46 +0400 (MSD)
> From: "[KOI8-R] áÎÄÒÅÊ þÅÒÎÏ×" <ac...@nagual.pp.ru>
> To: dgaudet@hyperreal.org
> Cc: apache-bugdb@apache.org, dgaudet@apache.org
> Subject: Re: os-freebsd/1311: FreeBSD have better fnmatch.c but Apache still use its own broken version
> 
> On 23 Oct 1997 dgaudet@hyperreal.org wrote:
> 
> > Sorry, no.  If fnmatch is buggy, please report specific bugs, the
> > version in there is from a recent FreeBSD tree.  We've
> > had enough "Fun" dealing with OS-specific regex problems.  If
> > we need to supply fnmatch for any OS, then we'll supply it for
> > all of them.
> 
> Well, FreeBSD version really have many enhancements like CASEFOLD or
> LEADING_DIR and l10n support, but real bugfix in the same abilities range
> as Apache fnmatch is only one, here the patch:
> 
> *** src/main/fnmatch.c.orig	Thu Oct 16 22:57:01 1997
> --- src/main/fnmatch.c	Thu Oct 23 14:37:04 1997
> ***************
> *** 110,115 ****
> --- 110,119 ----
>   		return (FNM_NOMATCH);
>   	    if (*string == '/' && flags & FNM_PATHNAME)
>   		return (FNM_NOMATCH);
> + 	    if (*string == '.' && (flags & FNM_PERIOD) &&
> + 		(string == stringstart ||
> + 		((flags & FNM_PATHNAME) && *(string - 1) == '/')))
> + 		    return (FNM_NOMATCH);
>   	    if ((pattern =
>   		 rangematch(pattern, *string, flags)) == NULL)
>   		return (FNM_NOMATCH);
> 
> 
> -- 
> Andrey A. Chernov
> <ac...@nietzsche.net>
> http://www.nagual.pp.ru/~ache/
> 
> -- 
> ====================================================================
>       Jim Jagielski            |       jaguNET Access Services
>      jim@jaguNET.com           |       http://www.jaguNET.com/
>             "Look at me! I'm wearing a cardboard belt!"
>