… | |
… | |
395 | for (char **c = begin (); c != end (); c++) |
395 | for (char **c = begin (); c != end (); c++) |
396 | delete [] *c; |
396 | delete [] *c; |
397 | } |
397 | } |
398 | }; |
398 | }; |
399 | |
399 | |
400 | // temporarily replace the process environment |
|
|
401 | extern char **environ; |
|
|
402 | |
|
|
403 | struct temp_environ |
|
|
404 | { |
|
|
405 | char **prev; |
|
|
406 | |
|
|
407 | temp_environ (const stringvec *envv) |
|
|
408 | : prev (environ) |
|
|
409 | { |
|
|
410 | if (envv) |
|
|
411 | environ = (char **)envv->begin (); |
|
|
412 | } |
|
|
413 | |
|
|
414 | ~temp_environ () |
|
|
415 | { |
|
|
416 | environ = prev; |
|
|
417 | } |
|
|
418 | }; |
|
|
419 | |
|
|
420 | #endif |
400 | #endif |
421 | |
401 | |