From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,85592352d25c0f43 X-Google-Attributes: gid103376,public From: Keith Thompson Subject: Re: getenv in Ada Date: 1998/12/02 Message-ID: #1/1 X-Deja-AN: 418032539 Cache-Post-Path: wagasa.cts.com!kst@king.cts.com Sender: kst@king.cts.com References: <36649bdb.116439355@news.pacbell.net> Organization: CTS Network Services Newsgroups: comp.lang.ada Date: 1998-12-02T00:00:00+00:00 List-Id: stt@houdini.camb.inmet.com (Tucker Taft) writes: > Tom Moran (tmoran@bix.com) wrote: > > : >is there a procedure or function similar to getenv in Ada95? > > : No, since many Ada targets have no such thing as an "environment". > : But any compiler targetted to Unix or DOS or Windows probably supplies > : a getenv function or its equivalent in a library. Look in your > : compiler documentation. > > Or if you know the name of the function in your C library, > then just define an appropriate Ada subprogram spec for it and use > pragma Import. At link-time, make sure the appropriate > C library gets searched. Note that the getenv function is part of standard C, so any conforming hosted C implementation must provide it by that name, though the semantics are implementation-defined. (A freestanding implementation of C may or may not provide getenv.) -- Keith Thompson (The_Other_Keith) kst@cts.com <*> Qualcomm, San Diego, California, USA I must be a techno-geek. My mouse is bigger than my phone.