[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[BUGFIX] Bad #ifdef's in tar-1.3.18/lib/fnmatch.c
From: |
Vesselin Atanasov |
Subject: |
[BUGFIX] Bad #ifdef's in tar-1.3.18/lib/fnmatch.c |
Date: |
Thu, 2 Nov 2000 23:58:07 +0000 (UTC) |
Hello.
I installed tar-1.3.18 on one of my machines and noticed some buggy
behaviour. The machine is Slackware-7.0 with glibc upgraded to
glibc-2.1.3. The glibc version of fnmatch() is buggy, e.g.
fnmatch ("/a/*", "/a/b", FNM_PATHNAME | FNM_LEADING_DIR) = FNM_NOMATCH
Which is incorrect IMHO.
The configure scripts correctly discovers that native fnmatch() is buggy
and adds lib/fnmatch.o to list of object modules and links lib/fnmatch.hin
to lib/fnmatch.h. But when it starts compiling lib/fnmatch.c, it meets
following in the beginning of lib/fnmatch.c
#if defined _LIBC || !defined __GNU__LIBRARY__
...
Since _LIBC is not defined and __GNU_LIBRARY__ is defined when compiling
the file, all the fnmatch() code is skipped and the complied .o file is
empty, so the native buggy fnmatch() from glibc-2.1.3 is used. This causes
tests/extrac04.sh to fail when doing "make check".
The correct fix IMHO is to remove the #if from the beggining of
lib/fnmatch.c because if native fnmatch() is working correctly the
configure script will completely skip compiling of lib/fnmatch.c
I have attached a simple patch against tar-1.3.18.
Regards,
Vesselin Atanasov
tar-1.13.18.fnmatch.patch.gz
Description: Binary data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [BUGFIX] Bad #ifdef's in tar-1.3.18/lib/fnmatch.c,
Vesselin Atanasov <=