Path: utzoo!mnetor!tmsoft!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!usc!sdd.hp.com!caen!uwm.edu!ux1.cso.uiuc.edu!news From: mcdonald@aries.scs.uiuc.edu (Doug McDonald) Newsgroups: comp.lang.c Subject: Re: Putenv() & Getenv() Bug ? Message-ID: <1991Feb17.014354.1677@ux1.cso.uiuc.edu> Date: 17 Feb 91 01:43:54 GMT References: <448@bria> <50361@olivea.atc.olivetti.com> <1991Feb15.151849.5269@ux1.cso.uiuc.edu> Sender: news@ux1.cso.uiuc.edu (News) Organization: University of Illinois at Urbana Lines: 31 In article <448@bria> writes: >In an article, aries.scs.uiuc.edu!mcdonald (Doug McDonald) writes: > >[ in response to a question on putenv() and getenv() ] > >>This is a system-specific question. It has nothing to do with C or Fortran per >>se: It should be posted in an SCO Unix specific newsgroup, or at least >>a Unix specific newsgroup. Not a general one like comp.lang.c. > >I don't believe that this is as system-specific as you would would like to >believe. I have not yet encountered a C library that didn't include these >two _subroutines_ regardless of operating system. Note that they are _not_ >operating system calls, but rather simple routines that search and insert from >a list. If your library doesn't have 'em, I would consider it broken. > >-- >Michael Stefanik, MGI Inc., Los Angeles| Opinions stated are not even my own. Yep, the system has to have getenv or its broken (or its a free-standing implementation :-). But apparently NOT putenv. In fact, as best as I can tell, "putenv" is on the list of functions a conforming C compiler CANNOT have!! But anything they DO is "implememtation dependent", and should be discussed in the appropriate implementation-dependent place. The only possible portable thing "getenv" can do is return NULL. Doug McDonald