diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-10-30 19:04:22 -0700 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2010-10-30 19:04:27 -0700 |
commit | 3a3c6e584a1fee04a6bc4c11581c283d5fa8c603 (patch) | |
tree | ff69119d384eb792f830d89b0178bd1382ac5224 | |
parent | f6587b17a6aef0404853ad5113158fddf4a90219 (diff) |
Use autoconf standard HAVE_MKSTEMP instead of HAS_MKSTEMP
We no longer need to maintain compatibility with the monolith
Imakefile -D flags in the sources.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-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.", |