diff options
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c index 0f105f87207..5a3ba465d81 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -820,6 +820,15 @@ xstrdup (const char *s) | |||
| 820 | return p; | 820 | return p; |
| 821 | } | 821 | } |
| 822 | 822 | ||
| 823 | /* Like putenv, but (1) use the equivalent of xmalloc and (2) the | ||
| 824 | argument is a const pointer. */ | ||
| 825 | |||
| 826 | void | ||
| 827 | xputenv (char const *string) | ||
| 828 | { | ||
| 829 | if (putenv ((char *) string) != 0) | ||
| 830 | memory_full (0); | ||
| 831 | } | ||
| 823 | 832 | ||
| 824 | /* Unwind for SAFE_ALLOCA */ | 833 | /* Unwind for SAFE_ALLOCA */ |
| 825 | 834 | ||