468,512 Members | 1,459 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,512 developers. It's quick & easy.

extern ** environ...

Hi Everyone,

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?

Thanks in advance!!!
Jan 13 '08 #1
1 6883
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
Jan 13 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by mahongquan | last post: by
reply views Thread by jtauber | last post: by
3 posts views Thread by RLN | last post: by
9 posts views Thread by boris.smirnov | last post: by
1 post views Thread by paragon.john | last post: by
7 posts views Thread by Joe P. Cool | last post: by
3 posts views Thread by Tim Chase | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.