summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2010-09-22 23:23:26 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2010-09-22 23:25:02 -0700
commit79e3387e7a2d35f5895f813a4572a93457114e3c (patch)
tree6cc09c067af9ead10ecf00ad65e6cca0dd1a9167
parent3bac463f63b4c1e667256c7d2d287b3567a7ff1c (diff)
Use AC_CHECK_FUNCS / default name for mkstemp
No longer need to maintain #ifdef compatibility with the names used in the monolith Imakefiles. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--configure.ac3
-rw-r--r--src/session.c12
2 files changed, 7 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 560a740..80d5f1a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -41,8 +41,7 @@ AC_CHECK_FILE([$srcdir/gram.c], [],
[test -z "$YACC_INST" && AC_MSG_ERROR([yacc not found - unable to compile gram.y])])
AC_PROG_LEX
-AC_CHECK_FUNC([mkstemp],
- AC_DEFINE(HAS_MKSTEMP,1,[Define to 1 if you have the `mkstemp' function.]))
+AC_CHECK_FUNCS([mkstemp])
# Checks for pkg-config packages
PKG_CHECK_MODULES(TWM, x11 xext xt xmu ice sm)
diff --git a/src/session.c b/src/session.c
index 7c4ce99..8319300 100644
--- a/src/session.c
+++ b/src/session.c
@@ -53,7 +53,7 @@ Author: Ralph Mor, X Consortium
#endif
#endif
#endif /* PATH_MAX */
-#ifdef HAS_MKSTEMP
+#ifdef HAVE_MKSTEMP
#include <unistd.h>
#endif
@@ -74,7 +74,7 @@ Bool sent_save_done = 0;
#define SAVEFILE_VERSION 2
-#ifndef HAS_MKSTEMP
+#ifndef HAVE_MKSTEMP
static char *unique_filename ( char *path, char *prefix );
#else
static char *unique_filename ( char *path, char *prefix, int *pFd );
@@ -720,7 +720,7 @@ Bool *height_ever_changed_by_user;
-#ifndef HAS_MKSTEMP
+#ifndef HAVE_MKSTEMP
static char *
unique_filename (path, prefix)
char *path;
@@ -734,7 +734,7 @@ int *pFd;
#endif
{
-#ifndef HAS_MKSTEMP
+#ifndef HAVE_MKSTEMP
#ifndef X_NOT_POSIX
return ((char *) tempnam (path, prefix));
#else
@@ -789,7 +789,7 @@ SmPointer clientData;
char discardCommand[80];
int numVals, i;
static int first_time = 1;
-#ifdef HAS_MKSTEMP
+#ifdef HAVE_MKSTEMP
int fd;
#endif
@@ -836,7 +836,7 @@ SmPointer clientData;
if (!path)
path = ".";
}
-#ifndef HAS_MKSTEMP
+#ifndef HAVE_MKSTEMP
if ((filename = unique_filename (path, ".twm")) == NULL)
goto bad;