! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
FNM_CASEFOLD isn't defined in the fnmatch.h on IRIX 6.5
Status:
CLOSED: FIXED

Comments

Description Daichi Kawahata editbugs 2006-02-03 10:20:36 CET
I just get an compilation error below,

exo-url.c: In function 'exo_url_show_on_screen':
exo-url.c:227: error: 'FNM_CASEFOLD' undeclared (first use in this function)
exo-url.c:227: error: (Each undeclared identifier is reported only once
exo-url.c:227: error: for each function it appears in.)

Reproducible: Always
Steps to Reproduce:
1. ./autogen.sh
2. gmake




Predefined macro constants in that header on IRIX 6.5 are:

#define FNM_PATHNAME    0001
#define FNM_PERIOD      0002
#define FNM_NOESCAPE    0004

#define FNM_NOSYS       (-1)
#define FNM_NOMATCH     (-2)
#define FNM_BADPAT      (-3)

extern int      fnmatch(const char *, const char *, int);
Comment 1 Benedikt Meurer editbugs 2006-02-03 10:22:18 CET
Meh, IRIX. ;-)

Isn't it defined at all (grep FNM_CASEFOLD `find /usr/include -type f`), or is
it just not defined in fnmatch.h?
Comment 2 Daichi Kawahata editbugs 2006-02-03 10:40:31 CET
(In reply to comment #1)
> Meh, IRIX. ;-)

Yup, IRIX.

> Isn't it defined at all (grep FNM_CASEFOLD `find /usr/include -type f`),
> or is it just not defined in fnmatch.h?

Nowhere. Google answered me the following,

php-4.4.2/NEWS:
- Fixed bug #22384 (FNM_CASEFOLD is not available). (Hartmut)

php-4.4.2/ext/standard/file.c:
#ifdef HAVE_FNMATCH
    REGISTER_LONG_CONSTANT("FNM_NOESCAPE", FNM_NOESCAPE, CONST_CS |
CONST_PERSISTENT);
    REGISTER_LONG_CONSTANT("FNM_PATHNAME", FNM_PATHNAME, CONST_CS |
CONST_PERSISTENT);
    REGISTER_LONG_CONSTANT("FNM_PERIOD",   FNM_PERIOD,   CONST_CS |
CONST_PERSISTENT);
#ifdef FNM_CASEFOLD /* a GNU extension */ /* TODO emulate if not available */
    REGISTER_LONG_CONSTANT("FNM_CASEFOLD", FNM_CASEFOLD, CONST_CS |
CONST_PERSISTENT);
#endif
#endif

Seems `FNM_CASEFOLD' is GNU extension.
Comment 3 Daichi Kawahata editbugs 2006-02-03 10:45:52 CET
As you know, that blocks current Thunar compilation as well.
How about very minor version bump (0.3.1.3.1svn) in exo and
increase minimum version requirement in Thunar?
Comment 4 Daichi Kawahata editbugs 2006-02-03 12:29:42 CET
Created attachment 431 
Dirty patch

Anyway, compilation itself would pass with this patch,
then, I'll check whether the function works.
Comment 5 Daichi Kawahata editbugs 2006-02-03 12:48:47 CET
...But a URL handling test seems not included here.

PASS: test-exo-csource
PASS: test-exo-noop
PASS: test-exo-string
==================
All 3 tests passed
==================
Comment 6 Benedikt Meurer editbugs 2006-02-03 23:24:07 CET
I should have checked the header file first, it's indeed a BSD extension:

#if __BSD_VISIBLE
#define FNM_LEADING_DIR 0x08  /* Ignore /<tail> after Imatch. */
#define FNM_CASEFOLD  0x10  /* Case insensitive search. */
#define FNM_IGNORECASE  FNM_CASEFOLD
#define FNM_FILE_NAME FNM_PATHNAME
#endif

I'll add a #define for systems without the BSD extension. Do not trust your man
pages :-)
Comment 7 Benedikt Meurer editbugs 2006-02-03 23:27:14 CET
Committed revision 19734.

2006-02-03	Benedikt Meurer <benny@xfce.org>

	* exo/exo-url.c: Define FNM_CASEFOLD for systems that don't support it.
	  Bug #1423.

Bug #1423

Reported by:
Daichi Kawahata
Reported on: 2006-02-03
Last modified on: 2009-10-09

People

Assignee:
Nick Schermer
CC List:
0 users

Version

Version:
0.3.1.3svn

Attachments

Dirty patch (433 bytes, patch)
2006-02-03 12:29 CET , Daichi Kawahata
no flags

Additional information