C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Revising #pragma once

From: Thiago Macieira <thiago_at_[hidden]>
Date: Mon, 02 Sep 2024 09:11:16 -0700
On Monday 2 September 2024 07:29:57 GMT-7 zxuiji via Std-Proposals wrote:
> I even did [ctrl]+[f] on the gmail convo to check for CPATH. In the
> makefile you just need to set the CPATH (or the c++ specific one) variable
> to your list of directories then
>
> export VAR

FYI, the size of the environment block is part of the same limit that applies
to the command-line. You gain a little by using an environment variable for
all paths instead of a command-line option per path (9 bytes, specifically, on
64-bit architectures, for the one pointer and the "-I", minus one for a
delimiter). But if you're running out of space, you're likely to get one or
two more paths with the environment before running out again. Then you add the
problem of having to escape paths containing the delimiter.

With a response file, the delimiter is a newline (which is much less likely to
be used than a colon) and has effectively unlimited size.

https://codebrowser.dev/linux/linux/fs/exec.c.html#bprm_stack_limits

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Principal Engineer - Intel DCAI Platform & System Engineering

Received on 2024-09-02 16:11:18