mirror of
https://https.git.savannah.gnu.org/git/findutils.git
synced 2026-01-27 01:44:23 +00:00
Fixed Savannah bug #19970, taking into account the limitations of the gnulib _Bool replacement
This commit is contained in:
parent
533c213ce3
commit
450bcbca78
12
ChangeLog
12
ChangeLog
@ -1,5 +1,17 @@
|
||||
2007-05-26 James Youngman <jay@gnu.org>
|
||||
|
||||
* find/parser.c (parse_gid): Return an explicit boolean constant
|
||||
rather than automatically converting from a pointer, because the
|
||||
gnulib substitute for bool (or _Bool) in c89 environments lacking
|
||||
bool does not support that conversion. One affected system is Sun
|
||||
WorkShop Compilers 5.0 98/12/15 C 5.0 on Solaris 7. This is
|
||||
Savannah bug #19970, reported by Nelson Beebe.
|
||||
(parse_inum): Ditto.
|
||||
(parse_links): Ditto.
|
||||
(parse_uid): Ditto.
|
||||
(check_path_safety): declarations need to go before code, not
|
||||
interspersed. Move declaration of char* s.
|
||||
|
||||
* xargs/testsuite/xargs.posix/rc-125.exp: Explain Savannah bug
|
||||
#19969. This bug is not yet fixed.
|
||||
|
||||
|
||||
30
NEWS
30
NEWS
@ -3,16 +3,6 @@ GNU findutils NEWS - User visible changes. -*- outline -*- (allout)
|
||||
|
||||
** Bug Fixes
|
||||
|
||||
#19967: Build successfully with C compilers that don't support the GCC
|
||||
construct __attribute__((__noreturn__)).
|
||||
|
||||
#19966: Findutils should now build on systems which have the modf()
|
||||
function in the maths library, -lm. This includes some versions of
|
||||
HP-UX.
|
||||
|
||||
#19965: Fixed a compilation failure on OSF/1 4.0 (no definition of the
|
||||
type uintmax_t).
|
||||
|
||||
#19948: Fixed an assertion failure on IRIX 6.5 (O_NOFOLLOW is defined
|
||||
to 0 there).
|
||||
|
||||
@ -31,6 +21,26 @@ checked, and failures are reported. Any failure will cause find's
|
||||
exit status to be nonzero. The predicate itself will continue to
|
||||
return true.
|
||||
|
||||
** Compilation Fixes
|
||||
|
||||
A variety of changes were made to allow compilation to succeed on
|
||||
non-GNU systems.
|
||||
|
||||
#19970: Compile correctly on C89 systems where the "_Bool" type is not
|
||||
provided, taking into account the limitations of the gnulib
|
||||
replacement for stdbool.h.
|
||||
|
||||
#19967: Build successfully with C compilers that don't support the GCC
|
||||
construct __attribute__((__noreturn__)).
|
||||
|
||||
#19966: Findutils should now build on systems which have the modf()
|
||||
function in the maths library, -lm. This includes some versions of
|
||||
HP-UX.
|
||||
|
||||
#19965: Fixed a compilation failure on OSF/1 4.0 (no definition of the
|
||||
type uintmax_t).
|
||||
|
||||
|
||||
* Major changes in release 4.3.5
|
||||
|
||||
** Functional changes
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
#include <time.h>
|
||||
#include <limits.h> /* for CHAR_BIT */
|
||||
#include <stdbool.h> /* for bool/boolean */
|
||||
#include <stdint_.h> /* for uintmax_t */
|
||||
#include <stdint.h> /* for uintmax_t */
|
||||
|
||||
|
||||
|
||||
|
||||
@ -912,8 +912,15 @@ static boolean
|
||||
parse_gid (const struct parser_table* entry, char **argv, int *arg_ptr)
|
||||
{
|
||||
struct predicate *p = insert_num (argv, arg_ptr, entry);
|
||||
p->est_success_rate = (p->args.numinfo.l_val < 100) ? 0.99 : 0.2;
|
||||
return p;
|
||||
if (p)
|
||||
{
|
||||
p->est_success_rate = (p->args.numinfo.l_val < 100) ? 0.99 : 0.2;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static boolean
|
||||
@ -1112,9 +1119,18 @@ static boolean
|
||||
parse_inum (const struct parser_table* entry, char **argv, int *arg_ptr)
|
||||
{
|
||||
struct predicate *p = insert_num (argv, arg_ptr, entry);
|
||||
/* inode number is exact match only, so very low proportions of files match */
|
||||
p->est_success_rate = 1e-6;
|
||||
return p;
|
||||
if (p)
|
||||
{
|
||||
/* inode number is exact match only, so very low proportions of
|
||||
* files match
|
||||
*/
|
||||
p->est_success_rate = 1e-6;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* -ipath is deprecated (at RMS's request) in favour of
|
||||
@ -1158,13 +1174,20 @@ static boolean
|
||||
parse_links (const struct parser_table* entry, char **argv, int *arg_ptr)
|
||||
{
|
||||
struct predicate *p = insert_num (argv, arg_ptr, entry);
|
||||
if (p->args.numinfo.l_val == 1)
|
||||
p->est_success_rate = 0.99;
|
||||
else if (p->args.numinfo.l_val == 2)
|
||||
p->est_success_rate = 0.01;
|
||||
if (p)
|
||||
{
|
||||
if (p->args.numinfo.l_val == 1)
|
||||
p->est_success_rate = 0.99;
|
||||
else if (p->args.numinfo.l_val == 2)
|
||||
p->est_success_rate = 0.01;
|
||||
else
|
||||
p->est_success_rate = 1e-3;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
p->est_success_rate = 1e-3;
|
||||
return p;
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static boolean
|
||||
@ -2209,8 +2232,15 @@ static boolean
|
||||
parse_uid (const struct parser_table* entry, char **argv, int *arg_ptr)
|
||||
{
|
||||
struct predicate *p = insert_num (argv, arg_ptr, entry);
|
||||
p->est_success_rate = (p->args.numinfo.l_val < 100) ? 0.99 : 0.2;
|
||||
return p;
|
||||
if (p)
|
||||
{
|
||||
p->est_success_rate = (p->args.numinfo.l_val < 100) ? 0.99 : 0.2;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static boolean
|
||||
@ -2779,10 +2809,10 @@ static void
|
||||
check_path_safety(const char *action, char **argv)
|
||||
{
|
||||
const char *path = getenv("PATH");
|
||||
char *s;
|
||||
|
||||
(void)argv;
|
||||
|
||||
char *s;
|
||||
s = next_element(path, 1);
|
||||
while ((s = next_element ((char *) NULL, 1)) != NULL)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user