I need access to the program environment (not with getenv() etc., but the adress)
The following crashes:
---------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
int main(int argc, const char *argv[], const char *envp[]) {
size_t i;
if (envp != NULL) {
for (i = 0; envp != NULL; i++) {
puts(envp);
}
}
return 0;
}
-----------------------------------------------------------
Is there a variable like 'environ' pointing to the global environment?
czerny