diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-09-18 06:45:31 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-09-18 06:45:31 -0700 |
commit | d76d11198035408667b20e3c0972e059551cde69 (patch) | |
tree | 44137a279b009b312a3e78297ff241442351bae3 | |
parent | e822ba5e7733472644542701ef82fc0f8d001a10 (diff) | |
download | txr-d76d11198035408667b20e3c0972e059551cde69.tar.gz txr-d76d11198035408667b20e3c0972e059551cde69.tar.bz2 txr-d76d11198035408667b20e3c0972e059551cde69.zip |
Detect mkstemps function.
* configure: Add check for mkstemps.
(HAVE_MKSTEMPS): New preprocessor symbol,
conditionally deposited into config/config.h
-rwxr-xr-x | configure | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -2234,6 +2234,26 @@ if [ -z "$have_winsize" ] ; then printf "no\n" fi +printf "Checking for mkstemps ... " + +cat > conftest.c <<! +#include <stdlib.h> + +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 # |