On Jan 13, 9:16 am, Rahul <sam_...@yahoo.co.inwrote:
I once had a look at a code having the following declaration,
extern ** environ or extern char ** environ...
I lost the code and i'm wondering what is the exact need of
this? Does anyone have any idea on this?
It should be "extern char** environ". And it is a Unixism;
according to Posix, it should be declared in <unistd.h>. See
http://www.unix.org/single_unix_specification/ for more
information (search for environ). And of course, don't use it
in portable code, although I wouldn't be too surprised if
Windows supported it as well. (In practice, it is exceedingly
rare to need to access it directly in Unix as well. I may have
done so once, in twenty years of Unix programming, and that was
implementing the getenv() function.)
--
James Kanze (GABI Software) email:ja*********@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientierter Datenverarbeitung
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34