On Fri, Nov 19, 2021 at 07:42:18PM -0700, Theo de Raadt wrote:
> +#include <sys/param.h> /* for MAXBSIZE */
> 
> No way, that is non-POSIX namespace.  We are going in precisely the opposite
> direction, eliminating this non-portability from the tree.
> 
> No biblical scrolls have it written "all programs must use buffer sizes
> decided by a system header file".
> 
> If you want 64*1024 in this specific program then just say 64*1024.

Is there a nicer way to pick a "reasonable" buffer size when we just
want to move as many bytes as possible on a given platform without
hogging the machine?

I thought MAXBSIZE was that constant, because we use it elsewhere,
e.g.  in cat(1) and wc(1), but if not then what is the right thing?
Is it BUFSIZ?

Reply via email to