summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCheng Shao <astrohavoc@gmail.com>2022-10-24 06:48:59 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-11-11 00:26:55 -0500
commit5fcbae0b5c3e8cf9662fc46a327314705912516b (patch)
treefab74a183c4ded55d931200dff76d470f8f93e1b
parent7f59b0f351d2376eee1cb797338d3b0a987d0d72 (diff)
downloadhaskell-5fcbae0b5c3e8cf9662fc46a327314705912516b.tar.gz
base: more autoconf checks for wasm32
This patch adds more autoconf checks to base, since those functions and headers may exist on other POSIX systems but don't exist on wasm32.
-rw-r--r--libraries/base/configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/libraries/base/configure.ac b/libraries/base/configure.ac
index 8935fd9a9b..6a7cdd719a 100644
--- a/libraries/base/configure.ac
+++ b/libraries/base/configure.ac
@@ -84,6 +84,15 @@ fi
# unsetenv
AC_CHECK_FUNCS([unsetenv])
+AC_CHECK_FUNCS([chmod])
+AC_CHECK_FUNCS([dup])
+AC_CHECK_FUNCS([fork])
+AC_CHECK_FUNCS([getpid])
+AC_CHECK_FUNCS([mkfifo])
+AC_CHECK_FUNCS([pipe])
+
+AC_CHECK_TYPE([struct rlimit],[AC_DEFINE([HAVE_STRUCT_RLIMIT],[1],[HAVE_STRUCT_RLIMIT])],[],[#include <sys/resource.h>])
+
### POSIX.1003.1 unsetenv returns 0 or -1 (EINVAL), but older implementations
### in common use return void.
AC_CACHE_CHECK([return type of unsetenv], fptools_cv_func_unsetenv_return_type,