diff options
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | imake.c | 8 |
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]) @@ -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.", |