[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/2] maint.mk: Split long argument lists
From: |
Bruno Haible |
Subject: |
Re: [PATCH 1/2] maint.mk: Split long argument lists |
Date: |
Sun, 02 Dec 2018 13:26:52 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-138-generic; KDE/5.18.0; x86_64; ; ) |
Roman Bolshakov wrote:
> But then we will need to correct calculation of VC_ARG_MAX. We can take
> formulae from [2]:
> expr `getconf ARG_MAX` - `env|wc -c` - `env|egrep '^[^ ]+='|wc -l` \* 4 - 2048
This formula assumes that a pointer in the 'environ' array is 4 bytes long.
On 64-bit platforms it surely is 8 bytes long.
More generally, I find this formula too fragile. It assumes so many things.
I would prefer a formula which does not attempt to produce the highest possible
value, but makes less assumptions. How about
expr `getconf ARG_MAX` / 2
?
Bruno
- Re: [PATCH 1/2] maint.mk: Split long argument lists,
Bruno Haible <=