summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-13 11:24:56 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2013-01-13 11:24:56 -0800
commit5a273c9fab6a4fe3ab0c729e78f3a86d3e5a69ed (patch)
tree6973b7b128ba66d077dd110accad6c0fcd809230
parent79a24ac258f66014af066df0707058b971c31988 (diff)
Use standard autoconf defines for mkstemp & putenv instead of imake leftovers
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--auth.c10
-rw-r--r--configure.ac5
-rw-r--r--misc.c2
3 files changed, 7 insertions, 10 deletions
diff --git a/auth.c b/auth.c
index c8bc653..398e37c 100644
--- a/auth.c
+++ b/auth.c
@@ -30,7 +30,7 @@ in this Software without prior written authorization from The Open Group.
#include <X11/ICE/ICEutil.h>
#include "auth.h"
-#ifdef HAS_MKSTEMP
+#ifdef HAVE_MKSTEMP
#include <unistd.h>
#endif
#include <sys/types.h>
@@ -80,7 +80,7 @@ write_iceauth(FILE *addfp, FILE *removefp, IceAuthDataEntry *entry)
-#ifndef HAS_MKSTEMP
+#ifndef HAVE_MKSTEMP
static char *
unique_filename(const char *path, const char *prefix)
#else
@@ -88,7 +88,7 @@ static char *
unique_filename(const char *path, const char *prefix, int *pFd)
#endif
{
-#ifndef HAS_MKSTEMP
+#ifndef HAVE_MKSTEMP
#ifndef X_NOT_POSIX
return ((char *) tempnam (path, prefix));
#else
@@ -137,7 +137,7 @@ SetAuthentication(int count, IceListenObj *listenObjs,
int original_umask;
char command[256];
int i;
-#ifdef HAS_MKSTEMP
+#ifdef HAVE_MKSTEMP
int fd;
#endif
@@ -150,7 +150,7 @@ SetAuthentication(int count, IceListenObj *listenObjs,
if (!path)
path = ".";
}
-#ifndef HAS_MKSTEMP
+#ifndef HAVE_MKSTEMP
if ((addAuthFile = unique_filename (path, ".xsm")) == NULL)
goto bad;
diff --git a/configure.ac b/configure.ac
index bd4ceea..a2c5c20 100644
--- a/configure.ac
+++ b/configure.ac
@@ -45,10 +45,7 @@ AC_ARG_WITH(rsh, AS_HELP_STRING([--with-rsh=PATH],
RSH=$rsh
AC_SUBST(RSH)
-AC_CHECK_FUNC([mkstemp],
- AC_DEFINE(HAS_MKSTEMP,1,[Define to 1 if you have the 'mkstemp' function.]))
-AC_CHECK_FUNC([putenv], [],
- AC_DEFINE(NOPUTENV,1,[Define to 1 if you DO NOT have the 'putenv' function.]))
+AC_CHECK_FUNCS([mkstemp putenv])
# Checks for pkg-config packages
PKG_CHECK_MODULES(XSM, [x11 xt > 1.0.99 ice sm xaw7])
diff --git a/misc.c b/misc.c
index 3c4c636..c9367bd 100644
--- a/misc.c
+++ b/misc.c
@@ -28,7 +28,7 @@ in this Software without prior written authorization from The Open Group.
#include "xsm.h"
-#ifdef NOPUTENV
+#ifndef HAVE_PUTENV
/*
* define our own putenv() if the system doesn't have one.
* putenv(s): place s (a string of the form "NAME=value") in