* gnu tar 1.11.8 on DUNIX 4.0 -- won't compile -- fnmatch() problem
@ 1996-09-09 4:00 Dan Fineman
1996-09-11 4:00 ` Gleb O. Rajko
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Dan Fineman @ 1996-09-09 4:00 UTC (permalink / raw)
Hey all!
I'm trying to compile gnu tar 1.11.8 on a Dec Alpha running DUNIX 4.0
(a.k.a. osf4.0). Unfortunately, it just ain't happening.
After doing a configure, the compilation tells me this:
-----------------
gcc -c -DHAVE_CONFIG_H -I.. -I../intl -I. -I../lib -g -O tar.c
tar.c: In function `name_match':
tar.c:477: `FNM_LEADING_DIR' undeclared (first use this function)
tar.c:477: (Each undeclared identifier is reported only once
tar.c:477: for each function it appears in.)
tar.c: In function `name_scan':
tar.c:608: `FNM_LEADING_DIR' undeclared (first use this function)
tar.c: In function `check_exclude':
tar.c:828: `FNM_LEADING_DIR' undeclared (first use this function)
*** Exit 1
-----------------
Anyways, I noted that on a linux system of mine,
/usr/include/fnmatch.h has this line:
---------
#define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
---------
However, /usr/include/fnmatch.h on the DUNIX system has no such line!
There are several calls to the library function fnmatch() in tar.c
that are sent the parameter FNM_LEADING_DIR, which makes no sense to
the DUNIX libraries. Man pages on the Linux system do not mention
what the FNM_LEADING_DIR should do / does...
Thoughts?
Thanks, and please mail me with any replies,
Dan Fineman
fineman@cs.washington.edu
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gnu tar 1.11.8 on DUNIX 4.0 -- won't compile -- fnmatch() problem
1996-09-09 4:00 gnu tar 1.11.8 on DUNIX 4.0 -- won't compile -- fnmatch() problem Dan Fineman
@ 1996-09-11 4:00 ` Gleb O. Rajko
1996-09-16 4:00 ` Peter Hegelund
1996-09-17 4:00 ` Simon Wright
2 siblings, 0 replies; 4+ messages in thread
From: Gleb O. Rajko @ 1996-09-11 4:00 UTC (permalink / raw)
To: "fineman
Dan Fineman wrote:
> I'm trying to compile gnu tar 1.11.8 on a Dec Alpha running DUNIX 4.0
> (a.k.a. osf4.0). Unfortunately, it just ain't happening.
> -----------------
> gcc -c -DHAVE_CONFIG_H -I.. -I../intl -I. -I../lib -g -O tar.c
> tar.c: In function `name_match':
> tar.c:477: `FNM_LEADING_DIR' undeclared (first use this function)
> tar.c:477: (Each undeclared identifier is reported only once
> tar.c:477: for each function it appears in.)
> tar.c: In function `name_scan':
> tar.c:608: `FNM_LEADING_DIR' undeclared (first use this function)
> tar.c: In function `check_exclude':
> tar.c:828: `FNM_LEADING_DIR' undeclared (first use this function)
> *** Exit 1
> -----------------
> Anyways, I noted that on a linux system of mine,
> /usr/include/fnmatch.h has this line:
> ---------
> #define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
> ---------
Looks like you should change FNM_LEADING_DIR to FNM_NOESCAPE to
compile this code on Digital Unix.
From man page on fnmatch(3)
FNM_NOESCAPE Unless FNM_NOESCAPE is set, preceding a character in
pattern with a \ (backslash character) causes fnmatch()
to match that character in string. For example, \\
matches a backslash in string. If FNM_NOESCAPE is set,
\ (backslash) is interpreted as an ordinary character.
from /usr/include/fnmatch.h:
#define FNM_NOESCAPE 8 /* Don't treat backslash as an escape */
Concerning 1 << 3 = 8 and FNM_LEADING_DIR sounds to be functional
equivalent for FNM_NOESCAPE, I guess they are the same.
Hope this helps,
Gleb.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gnu tar 1.11.8 on DUNIX 4.0 -- won't compile -- fnmatch() problem
1996-09-09 4:00 gnu tar 1.11.8 on DUNIX 4.0 -- won't compile -- fnmatch() problem Dan Fineman
1996-09-11 4:00 ` Gleb O. Rajko
@ 1996-09-16 4:00 ` Peter Hegelund
1996-09-17 4:00 ` Simon Wright
2 siblings, 0 replies; 4+ messages in thread
From: Peter Hegelund @ 1996-09-16 4:00 UTC (permalink / raw)
I ran into the very same problem with GNU make. It's the POSIX support
that's at fault. I just edited the fnmatch.h header distributed by GNU thus
#if 1 // !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
Peter Hegelund
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: gnu tar 1.11.8 on DUNIX 4.0 -- won't compile -- fnmatch() problem
1996-09-09 4:00 gnu tar 1.11.8 on DUNIX 4.0 -- won't compile -- fnmatch() problem Dan Fineman
1996-09-11 4:00 ` Gleb O. Rajko
1996-09-16 4:00 ` Peter Hegelund
@ 1996-09-17 4:00 ` Simon Wright
2 siblings, 0 replies; 4+ messages in thread
From: Simon Wright @ 1996-09-17 4:00 UTC (permalink / raw)
In article <FINEMAN.96Sep8210447@grizzly.cs.washington.edu> fineman@grizzly.cs.washington.edu (Dan Fineman) writes:
> Anyways, I noted that on a linux system of mine,
> /usr/include/fnmatch.h has this line:
>
> ---------
> #define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
> ---------
>
> However, /usr/include/fnmatch.h on the DUNIX system has no such line!
If you look in tar-1.11.8/lib/fnmatch.h you'll find FNM_LEADING_DIR
defined -- but it depends on your POSIX version, perhaps that's
changed in DU4.0? (tar compiles fine on OSF1/3).
--
Simon Wright (G-net) +842-1778
Ferranti Naval Systems (voice) +44(0)1705-701778
GEC-Marconi S3I Combat Systems Division (fax) +44(0)1705-701800
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1996-09-17 4:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-09-09 4:00 gnu tar 1.11.8 on DUNIX 4.0 -- won't compile -- fnmatch() problem Dan Fineman
1996-09-11 4:00 ` Gleb O. Rajko
1996-09-16 4:00 ` Peter Hegelund
1996-09-17 4:00 ` Simon Wright
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox