From d76d11198035408667b20e3c0972e059551cde69 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 18 Sep 2015 06:45:31 -0700 Subject: Detect mkstemps function. * configure: Add check for mkstemps. (HAVE_MKSTEMPS): New preprocessor symbol, conditionally deposited into config/config.h --- configure | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/configure b/configure index aa9c8f05..aa5264fa 100755 --- a/configure +++ b/configure @@ -2234,6 +2234,26 @@ if [ -z "$have_winsize" ] ; then printf "no\n" fi +printf "Checking for mkstemps ... " + +cat > conftest.c < + +int main(int argc, char **argv) +{ + char template[] = "abcXXXXXX.xyz"; + int fd = mkstemps(template, 4); + return 0; +} +! + +if conftest ; then + printf "yes\n" + printf "#define HAVE_MKSTEMPS 1\n" >> $config_h +else + printf "no\n" +fi + # # Dependent variables # -- cgit v1.2.3