tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] Tcc and environment


From: Darren Oakey
Subject: [Tinycc-devel] Tcc and environment
Date: Sun, 7 Apr 2013 12:07:19 +1000

I am using a system with no c compiler, no include directories - ie they've made some effort to stop you writing c for some reason (even though other languages are freely available).   I found tiny cc - and particularly PTS-TCC - and thought my problems were solved - hello world and other programs worked perfectly.

Then I ran into a snag.

However I try - I can't read the environment :( -    getenv, while appearing to be there, always returns null.  I looked at the uclibc source and getenv uses __environ - which is null, as is environ, if I do a char ** environ.   If I extend main to have void main (int argv, char **args, char **envp) - envp appears to be just random numbers.

please help - anyone have any idea how I get at environment variables?  I'm trying to use this to build a faster cgi on my web host - so without environment variables, I'm toast.

Thanks,
Darren

reply via email to

[Prev in Thread] Current Thread [Next in Thread]