[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Tcc and environment
From: |
Thomas Preud'homme |
Subject: |
Re: [Tinycc-devel] Tcc and environment |
Date: |
Sun, 7 Apr 2013 11:55:08 +0200 |
User-agent: |
KMail/1.13.7 (Linux/3.2.0-4-amd64; KDE/4.8.4; x86_64; ; ) |
Le dimanche 7 avril 2013 04:07:19, Darren Oakey a écrit :
> 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.
I searched what is tcc and the links I found to download pts-tcc are based on
tcc 0.9.25. This bug was fixed for tcc 0.9.26. You could make yourself and
many people a service by contacting the author of that software to tell them
to merge the changes from tcc 0.9.26.
>
> 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.
You could try recompiling pts-tcc with itself after applying the attached
patch to it.
>
> Thanks,
> Darren
Best regards,
Thomas Preud'homme
452876_link_alias_symbols_together.diff
Description: Text Data
signature.asc
Description: This is a digitally signed message part.