C++ Logo

SG16

Advanced search

Subject: Re: A UTF-8 environment specification; an alternative to assuming UTF-8 based on choice of literal encoding
From: Thiago Macieira (thiago_at_[hidden])
Date: 2021-07-30 11:39:50


On Friday, 30 July 2021 09:31:19 PDT Tom Honermann wrote:
> Indeed. My use case was trying to get them before main().

You can use _dl_argc and _dl_argv (glibc specific) and _environ. The argv is
always just below _environ, so you can know where it ends, but finding where
it starts is a little more difficult if you don't have argc too.

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel DPG Cloud Engineering

SG16 list run by sg16-owner@lists.isocpp.org