Skip to content

environment variables - int main(int argc, char *argv[], char *envp[]); vs extern char **environ; #1363

Closed Answered by jmalak
PerditionC asked this question in Q&A
Discussion options

You must be logged in to vote

main is defined by C standard and therefore OW support only forms defined by C standard.
Anyway call main is defined in OW C run-time startup program that it can be modified if needed.
but envp is not available on all platforms that it will require more work if you need this non-standard main call.
Take into account that envp and environ are two different things, not same.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by PerditionC
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants