Re: environment question



Mon Oct 04 1999, bob@cs.csoft.net ->
> Thanks guys. That did it.
> It seems that "extern char **environ;" was in stdlib.h and is no longer
> there so you have to code it yourself.

I don't know if this is standard C, but in gcc at least you can write
like this:

int main (int argc, char *argv[], char *env[]) {
	...
}

and use env inside of main to get the environment.

	n.

-- 
[ http://www.dtek.chalmers.se/~d95mback/ ] [ PGP: 0x453504F1 ] [ UIN: 4439498 ]
    Opinions expressed above are mine, and not those of my future employees.

PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]