|
Boost-Build : |
From: Johan Nilsson (johan.nilsson_at_[hidden])
Date: 2004-10-20 06:51:11
"Vladimir Prus" <ghost_at_[hidden]> wrote in message
news:cl5b8j$p6k$1_at_sea.gmane.org...
>
> Hi Johan,
>
> > under OpenVMS the environment varibles (i.e. logical names) are not
> > imported automatically, presumably because there is no officially
> > supported way to enumerate them.
>
> Is it really the case? Even on recent versions?
>
Yes, that's true. VMS doesn't really have a notion of environment variables.
I recall that the envp passed to main is usable, but only contains some
fixed couple number (~5?) of vars, e.g. USER.
> > Would it be possible to add an explicit native rule to do this, asimilar
> > to the w32_getreg functionality? Perhaps vms_import <list of environment
> > var names/logical names>:
> >
> > var_values_list = [ vms_import "X" "Y" "Z" ] ;
> >
> > The values can be accessed using getenv, at least in reasonably recent
> > OpenVMS CRTL versions.
>
> I'm not exactly happy about platform specific native rules, but if it's
not
> possible to enumerate variables, I don't see any other solution.
>
I guess there's two possibilities:
1. More-or-less straight access to the CRTLs getenv through new built-in
"getenv". Could be made available for all(?) platforms without causing any
harm(?).
2. VMS specific native rules with more control over what's retrieved; e.g.
rule vms_logical ( name+ : logical_name_table? ).
Not sure on which one to prefer though.
// Johan
Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk