From 04d35cbbb03e68759fc6f05c0149daa8cd655fce Mon Sep 17 00:00:00 2001 From: dos-reis Date: Sun, 2 Feb 2014 18:13:09 +0000 Subject: Prefer mktemp over tempnam. --- config/open-axiom.m4 | 8 +++++++- config/openaxiom-c-macros.h.in | 12 ++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/open-axiom.m4 b/config/open-axiom.m4 index 2218be2c..410923b1 100644 --- a/config/open-axiom.m4 +++ b/config/open-axiom.m4 @@ -848,7 +848,13 @@ dnl ------------------------ dnl -- OPENAXIOM_CHECK_IO -- dnl ------------------------ AC_DEFUN([OPENAXIOM_CHECK_IO],[ -AC_CHECK_DECLS([tempnam],[],[],[#include ]) +# Utility for temporary pathnames. +if test -n $ac_cv_header_unistd_h; then + AC_CHECK_DECLS([mktemp, mkdtemp, mkstemp], [], [], [[#include ]]) +fi +if test -n $ac_cv_have_decl_mktemp; then + AC_CHECK_DECLS([tempnam],[],[],[[#include ]]) +fi # Honor support for large files AC_SYS_LARGEFILE # What about long file names? diff --git a/config/openaxiom-c-macros.h.in b/config/openaxiom-c-macros.h.in index 6a93a786..571fd4d3 100644 --- a/config/openaxiom-c-macros.h.in +++ b/config/openaxiom-c-macros.h.in @@ -33,6 +33,18 @@ */ #undef HAVE_DECL_KILL +/* Define to 1 if you have the declaration of `mkdtemp', and to 0 if you + don't. */ +#undef HAVE_DECL_MKDTEMP + +/* Define to 1 if you have the declaration of `mkstemp', and to 0 if you + don't. */ +#undef HAVE_DECL_MKSTEMP + +/* Define to 1 if you have the declaration of `mktemp', and to 0 if you don't. + */ +#undef HAVE_DECL_MKTEMP + /* Define to 1 if you have the declaration of `openpty', and to 0 if you don't. */ #undef HAVE_DECL_OPENPTY -- cgit v1.2.3