summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-06-02 08:11:25 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-06-02 08:11:25 -0700
commit98a5ae664df526c18bac5d4597c3ae165cd0fd20 (patch)
tree0c1fbf305134247323a4460287e912ac6d2f95a2 /configure
parented63896a29e77ea5d3aa0d9f4b5341d3149c2d0a (diff)
downloadtxr-98a5ae664df526c18bac5d4597c3ae165cd0fd20.tar.gz
txr-98a5ae664df526c18bac5d4597c3ae165cd0fd20.tar.bz2
txr-98a5ae664df526c18bac5d4597c3ae165cd0fd20.zip
solaris: unbundle mkstemp and mkdtemp.
* configure: Solaris 10 doesn't have mkdtemp, so we detect it separately from mkstemp, which Solaris 10 does have, producing HAVE_MKSTEMP and MAKE_MKDTEMP config.h symbols. * stream.c (mkdtemp_wrap): Separately surround with #if HAVE_MKDTEMP. (mkstemp_wrap): Reduce scope of #if HAVE_MKSTEMP only around this function. Bugfix here: in the #else case of #if HAVE_MKSTEMPS, we are calling the mkstemps function instead of mkstemp.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure23
1 files changed, 21 insertions, 2 deletions
diff --git a/configure b/configure
index 10027028..3e97ed13 100755
--- a/configure
+++ b/configure
@@ -3228,7 +3228,7 @@ if [ -z "$have_winsize" ] ; then
printf "no\n"
fi
-printf "Checking for mkstemp/mkdtemp ... "
+printf "Checking for mkstemp ... "
cat > conftest.c <<!
#include <stdlib.h>
@@ -3237,7 +3237,6 @@ int main(int argc, char **argv)
{
char templ[] = "abcXXXXXX";
int fd = mkstemp(templ);
- char *s = mkdtemp(templ);
return 0;
}
!
@@ -3249,6 +3248,26 @@ else
printf "no\n"
fi
+printf "Checking for mkdtemp ... "
+
+cat > conftest.c <<!
+#include <stdlib.h>
+
+int main(int argc, char **argv)
+{
+ char templ[] = "abcXXXXXX";
+ char *s = mkdtemp(templ);
+ return 0;
+}
+!
+
+if conftest ; then
+ printf "yes\n"
+ printf "#define HAVE_MKDTEMP 1\n" >> config.h
+else
+ printf "no\n"
+fi
+
printf "Checking for mkstemps ... "
cat > conftest.c <<!