~vcs-imports/findutils/trunk

« back to all changes in this revision

Viewing changes to lib/buildcmd.c

  • Committer: Eric Blake
  • Date: 2007-08-01 03:39:57 UTC
  • Revision ID: git-v1:756cecd45b0545ad52345507592cfa3c9f97a0ad
Allow choice of default arg size, Savannah bug #20594.
* configure.ac (DEFAULT_ARG_SIZE): Check environment for a default
size override.
* lib/buildcmd.c (bc_use_sensible_arg_max): Use default size from
configure, if requested.
* README (DEFAULT_ARG_SIZE): Mention the ability to tune this at
configure time.
* NEWS: Document the change.

Show diffs side-by-side

added added

removed removed

Lines of Context:
500
500
void
501
501
bc_use_sensible_arg_max(struct buildcmd_control *ctl)
502
502
{
 
503
#ifdef DEFAULT_ARG_SIZE
 
504
  enum { arg_size = DEFAULT_ARG_SIZE };
 
505
#else
503
506
  enum { arg_size = (128u * 1024u) };
504
 
  
 
507
#endif
 
508
 
505
509
  /* Check against the upper and lower limits. */  
506
510
  if (arg_size > ctl->posix_arg_size_max)
507
511
    ctl->arg_max = ctl->posix_arg_size_max;
547
551
  state->todo = 0;
548
552
  state->dirfd = -1;
549
553
}
550