On Thursday 19 June 2014 22:42, Bartosz Golaszewski wrote:
> The find utility uses a hardcoded value of 32 * 1024 as the limit of
> the command-line length when calling 'find -exec ... {} +'. This results
> in over 4 times more execve() calls than in coreutils' find.
> 
> This patch proposes to use the limit defined in system headers.


> +     IF_FEATURE_FIND_EXEC_PLUS(G.max_argv_len = BB_ARG_MAX;) \

The "- 2048" part should be here, not inside BB_ARG_MAX
(not all users will want that subtraction).

BB_ARX_MAX should be a function-like macro, a-la bb_arg_max().
CAPITALIZED macros are almost always constants.

> +
> +     /* TODO Introduce a growable buffer and use BB_ARG_MAX macro to
> +      * determine a safe value for n_max_chars. Remove this check afterwards.
> +      */

I don't understand this comment.

> +/* Include this for ARG_MAX on linux. */
> +#ifdef __linux__
> +# include <linux/limits.h>
> +#endif

libbb.h already inludes limits.h
"man sysconf" says that you need unistd.h, not limits.h,
but it is included too.

_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to