Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!ncar!gatech!udel!rochester!pt.cs.cmu.edu!cadre!pitt!amanue!oglvee!jr From: jr@oglvee.UUCP (Jim Rosenberg) Newsgroups: comp.unix.questions Subject: Re: setenv/putenv/unsetenv. Message-ID: <272@oglvee.UUCP> Date: 24 Aug 88 18:43:23 GMT References: <23335@labrea.Stanford.EDU> Organization: Oglevee Computer Systems, Connellsville, Pa Lines: 23 From article <23335@labrea.Stanford.EDU>, by karish@denali.stanford.edu (Chuck Karish): > As of Draft 12.3, the POSIX 1003.1 standard includes only getenv(). > It's pretty simple to write the others; all you have to do is to ^^^^ ^^^^^^ ^^^^^^ ^^ ^^^^^ ^^^ ^^^^^^ > change the contents of the strings pointed to by the `environ' pointers. > This may entail using realloc() where strings get longer, and re- > assigning pointers to pointers (unsetenv()). OPINION ON: Sure it's simple, but that's not the point. The environment is something pretty basic. Isn't it about time we started dealing with as many such basic things as possible through a layer of primitives?? It is quite surprising how many vendors of quite diverse operating systems are either talking about or actually promising POSIX compatibility, even though the underlying kernels don't look even vaguely like UNIX. (VMS, OS/2, ...) What are these people supposed to do? If the primitive to set an environment variable isn't in the standard then you will get just the kind of problems with variant versions and portability troubles that the standard is supposed to prevent. -- Jim Rosenberg pitt Oglevee Computer Systems >--!amanue!oglvee!jr 151 Oglevee Lane cgh Connellsville, PA 15425 #include