ID:               22384
 Updated by:       [EMAIL PROTECTED]
 Reported By:      polone at townnews dot com
-Status:           Open
+Status:           Assigned
 Bug Type:         Directory function related
 Operating System: RedHat Linux 7.3
 PHP Version:      4.3.1
-Assigned To:      
+Assigned To:      hholzgra
 New Comment:

>From my fnmatch.h (rh 6.2):

#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined
_GNU_SOURCE
# define FNM_FILE_NAME   FNM_PATHNAME   /* Preferred GNU name.  */
# define FNM_LEADING_DIR (1 << 3)       /* Ignore `/...' after a match.
 */
# define FNM_CASEFOLD    (1 << 4)       /* Compare without regard to
case.  */
#endif

Maybe we should add '#define _GNU_SOURCE' before including the
fnmatch.h in ext/standard/file.c ??
Assigned for Hartmut who's responsible for adding this function.. :)



Previous Comments:
------------------------------------------------------------------------

[2003-02-23 01:36:39] polone at townnews dot com

The predefined constant FNM_CASEFOLD does not exist for the fnmatch()
function. The function call does work by calling the function using:

fnmatch('pattern*','match-this', 16);

At least, on RedHat Linux this will work because the flag is a left bit
shift 1 << 4. Probably just not defined in the PHP extension as a flag
(although I haven't checked).

The flag allows case-insensitive comparisons to the string being
matched. Using the integer constant directly shouldn't break anything
if the constant is later added, just an annoyance as far as looking at
source is concerned.

Regards,

Patrick O'Lone

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=22384&edit=1

Reply via email to