[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug-gnulib] [Patch] mode_* when compiling findutils with fresh gnulib (
From: |
Bas van Gompel |
Subject: |
[bug-gnulib] [Patch] mode_* when compiling findutils with fresh gnulib (was: Re: merge from coreutils to gnulib (fd-safer, modechange, readutmp, ...)) |
Date: |
Sun, 22 May 2005 16:57:14 +0200 |
[This patch is for findutils. bug-gnulib Cc'd. Maybe they can answer my
questions...]
Op Mon, 02 May 2005 00:05:07 -0700 schreef Paul Eggert
in <address@hidden>:
: I installed this patch to merge coreutils changes into gnulib.
[...]
: There are also changes to the APIs for modechange and for readutmp.
[...]
: + * modechange.h (mode_free): Remove; all callers changed to invoke
: + 'free'.
: + * modechange.c: Likewise.
[...]
: + (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
: + (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
: + (mode_change, mode_adjust): Reflect the new signatures noted above.
When using a fresh gnulib to build findutils (CVS), breakage occurs. I
came up with following patch to get parser.c to compile.
I am however not sure it is correct.
Is it OK to just discard the MODE_MASK_PLUS-flag?
Is it OK to set the umask-parameter to mode_adjust to zero?
ChangeLog-entry:
22-05-2005 Bas van Gompel <address@hidden>
find/parser.c (parse_perm): Accomodate gnulib modifications to
mode_compile and mode_adjust, and the removal of mode_free.
diff --exclude='*~' -Ndrup curr/findutils/find/parser.c
mine2/findutils/find/parser.c
--- findutils/find/parser.c 2005-05-17 04:10:38.000000000 +0200
+++ findutils/find/parser.c 2005-05-18 22:58:44.000000000 +0200
@@ -1231,13 +1231,11 @@ parse_perm (char **argv, int *arg_ptr)
break;
}
- change = mode_compile (argv[*arg_ptr] + mode_start, MODE_MASK_PLUS);
- if (change == MODE_INVALID)
+ change = mode_compile (argv[*arg_ptr] + mode_start);
+ if (change == NULL)
error (1, 0, _("invalid mode `%s'"), argv[*arg_ptr]);
- else if (change == MODE_MEMORY_EXHAUSTED)
- error (1, 0, _("virtual memory exhausted"));
- perm_val = mode_adjust (0, change);
- mode_free (change);
+ perm_val = mode_adjust (0, change, 0);
+ free (change);
our_pred = insert_primary (pred_perm);
L8r,
Buzz.
--
) | | ---/ ---/ Yes, this | This message consists of true | I do not
-- | | / / really is | and false bits entirely. | mail for
) | | / / a 72 by 4 +-------------------------------+ any1 but
-- \--| /--- /--- .sigfile. | |perl -pe "s.u(z)\1.as." | me. 4^re