summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-03-16 00:09:30 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-03-16 00:10:42 -0700
commitaca7c64aa69a4e14a2dd57779cd206a5aa15f649 (patch)
tree6a700564ae7356241a9d29f5fe7fc8c4a0ae858e /configure
parentef14bd0e49bec4025b80bdc01638b7a34b7778de (diff)
downloadtxr-aca7c64aa69a4e14a2dd57779cd206a5aa15f649.tar.gz
txr-aca7c64aa69a4e14a2dd57779cd206a5aa15f649.tar.bz2
txr-aca7c64aa69a4e14a2dd57779cd206a5aa15f649.zip
* configure: Detect _wspawn* functions.
* stream.c (run): Implement using _wspawnvp on MinGW.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure21
1 files changed, 21 insertions, 0 deletions
diff --git a/configure b/configure
index ff7f67fa..f20ec31d 100755
--- a/configure
+++ b/configure
@@ -1720,6 +1720,27 @@ else
printf "no\n"
fi
+printf "Checking for _wspawvp ... "
+
+cat > conftest.c <<!
+#include "config.h"
+#include <process.h>
+#include <wchar.h>
+
+int main(int argc, char **argv)
+{
+ wchar_t *wargv[] = { L"foo", L"bar", 0 };
+ int r = _wspawnlp(_P_WAIT, L"foo", wargv);
+ return 0;
+}
+!
+if conftest ; then
+ printf "yes\n"
+ printf "#define HAVE_WSPAWN 1\n" >> config.h
+else
+ printf "no\n"
+fi
+
#
# Dependent variables
#