summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac3
-rw-r--r--imake.c8
2 files changed, 5 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index db65c99..ce98ce3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,8 +39,7 @@ XORG_PROG_RAWCPP
CPP_PROGRAM=${RAWCPP}
AC_SUBST(CPP_PROGRAM)
-AC_CHECK_FUNC([mkstemp],
- AC_DEFINE(HAS_MKSTEMP,1,[Define to 1 if you have the "mkstemp" function.]))
+AC_CHECK_FUNCS([mkstemp])
AC_CHECK_PROG(HAS_PERL, perl, yes)
AM_CONDITIONAL([HAS_PERL], [test "x$HAS_PERL" = xyes])
diff --git a/imake.c b/imake.c
index 30943c6..c628fc3 100644
--- a/imake.c
+++ b/imake.c
@@ -395,11 +395,11 @@ main(int argc, char *argv[])
if ((tmpfd = fopen(tmpMakefile, "w+")) == NULL)
LogFatal("Cannot create temporary file %s.", tmpMakefile);
} else {
-#ifdef HAS_MKSTEMP
+#ifdef HAVE_MKSTEMP
int fd;
#endif
tmpMakefile = Strdup(tmpMakefile);
-#ifndef HAS_MKSTEMP
+#ifndef HAVE_MKSTEMP
if (mktemp(tmpMakefile) == NULL ||
(tmpfd = fopen(tmpMakefile, "w+")) == NULL) {
LogFatal("Cannot create temporary file %s.", tmpMakefile);
@@ -1769,11 +1769,11 @@ CleanCppInput(char *imakefile)
strcmp(ptoken, "pragma") &&
strcmp(ptoken, "undef")) {
if (outFile == NULL) {
-#ifdef HAS_MKSTEMP
+#ifdef HAVE_MKSTEMP
int fd;
#endif
tmpImakefile = Strdup(tmpImakefile);
-#ifndef HAS_MKSTEMP
+#ifndef HAVE_MKSTEMP
if (mktemp(tmpImakefile) == NULL ||
(outFile = fopen(tmpImakefile, "w+")) == NULL) {
LogFatal("Cannot open %s for write.",