From 3c5861c340cb45cf626f61e022d0aa2805f16569 Mon Sep 17 00:00:00 2001 From: Ian Lynagh Date: Thu, 3 Jul 2008 19:06:03 +0000 Subject: Allow C's unsetenv to return either void or int Fixes, and patch from donn in, trac #2352. --- include/HsUnix.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include') diff --git a/include/HsUnix.h b/include/HsUnix.h index 7aee685..4afd51a 100644 --- a/include/HsUnix.h +++ b/include/HsUnix.h @@ -190,4 +190,14 @@ INLINE int __hscore_setrlimit(int resource, struct rlimit *rlim) { } #endif +INLINE int __hsunix_unsetenv(const char *name) +{ +#ifdef UNSETENV_RETURNS_VOID + unsetenv(name); + return 0; +#else + return unsetenv(name); +#endif +} + #endif -- cgit v1.2.3