Date: Fri, 2 Sep 94 14:09:59 -0400 From: dj AT ctron DOT com (DJ Delorie) To: babcock AT cfa DOT harvard DOT edu Cc: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Re: Bug in getenv() ? > If you do > SET TMP = C:/TMP > then getenv("TMP") should return NULL. getenv("TMP ") should return > " C:/TMP". The blanks are significant to DOS in both the variable name and > its value. Of course, one can argue about whether it _should_ work this way. > Trailing blanks in the variable don't get trimmed either, so you might find > yourself looking for "c:/gcc/bin/ emu3877". All spaces around the equals and at the end are supposed to be removed by go32, since in all the cases where this happens it's NOT intentional (so far). There is a bug already reported that the new string is not null terminated.