extern ** environ...



 DEVELOP > c-Plus-Plus > extern ** environ...

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1

1

 
Topic: DEVELOP > c-Plus-Plus
User: "Rahul"
Date: 13 Jan 2008 02:16:00 AM
Object: 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!!!
.

User: "James Kanze"

Title: Re: extern ** environ... 13 Jan 2008 04:58:12 AM
On Jan 13, 9:16 am, Rahul <sam_...@yahoo.co.in> wrote:

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:james.kanze@gmail.com
Conseils en informatique orient=E9e objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=E9mard, 78210 St.-Cyr-l'=C9cole, France, +33 (0)1 30 23 00 34
.


  Page 1 of 1

1

 


Related Articles
 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER