...
Portable code should use environment variables that differ by more than capitalization.
Code Block | ||
---|---|---|
| ||
char *temp; if (putenv("TEST_ENV_1=foo") != 0) { /* Handle Error */ } if (putenv("TEST_ENV_2=bar") != 0) { /* Handle Error */ } temp = getenv("TEST_ENV"); if (temp == NULL) { /* Handle Error */ } printf("%s\n",temp); |
...