From bf46721dbf4c905d03e2dd39640980ea9736c6dd Mon Sep 17 00:00:00 2001 From: Deian Stefan Date: Thu, 5 Jan 2012 23:28:51 -0800 Subject: System.Posix.Temp compliance --- cbits/HsUnix.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'cbits') diff --git a/cbits/HsUnix.c b/cbits/HsUnix.c index bb3a3c7..dd4b4f6 100644 --- a/cbits/HsUnix.c +++ b/cbits/HsUnix.c @@ -132,14 +132,21 @@ int __hsunix_push_module(int fd, const char *module) int __hscore_mkstemp(char *filetemplate) { return (mkstemp(filetemplate)); } -char *__hscore_mkdtemp(char *filetemplate) { - return (mkdtemp(filetemplate)); -} +#endif + +#if HAVE_MKSTEMPS int __hscore_mkstemps(char *filetemplate, int suffixlen) { return (mkstemps(filetemplate, suffixlen)); } #endif +#if HAVE_MKDTEMP +char *__hscore_mkdtemp(char *filetemplate) { + return (mkdtemp(filetemplate)); +} +#endif + + #if !defined(__MINGW32__) && !defined(irix_HOST_OS) int __hscore_getrlimit(int resource, struct rlimit *rlim) { return (getrlimit(resource, rlim)); -- cgit v1.2.3