diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-11-23 21:56:29 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2013-11-23 21:56:29 -0800 |
commit | 6f90cf3021d5c8755963ab5d88d477774cd5bd43 (patch) | |
tree | 0f491acd9556c3b5124924d2018337ed00610c9d | |
parent | ddbc7f6b08643fb852d98810a1149b09e80e68fe (diff) |
Replace #ifdef X_NOT_POSIX with explicit check for mktemp function
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | save.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index c97bb04..1f23bac 100644 --- a/configure.ac +++ b/configure.ac @@ -35,7 +35,7 @@ AC_CONFIG_HEADERS([config.h]) XORG_DEFAULT_OPTIONS -AC_CHECK_FUNCS([mkstemp]) +AC_CHECK_FUNCS([mkstemp mktemp]) # Checks for pkg-config packages PKG_CHECK_MODULES(SMPROXY, [sm ice xt xmuu]) @@ -310,9 +310,9 @@ unique_filename(char *path, char *prefix, int *pFd) #endif { #ifndef HAVE_MKSTEMP -#ifndef X_NOT_POSIX +# ifndef HAVE_MKTEMP return ((char *) tempnam (path, prefix)); -#else +# else /* HAVE_MKTEMP */ char tempFile[PATH_MAX]; char *tmp; @@ -326,8 +326,8 @@ unique_filename(char *path, char *prefix, int *pFd) } else return (NULL); -#endif -#else +# endif /* HAVE_MKTEMP */ +#else /* HAVE_MKSTEMP */ char tempFile[PATH_MAX]; char *ptr; @@ -339,7 +339,7 @@ unique_filename(char *path, char *prefix, int *pFd) *pFd = mkstemp(ptr); } return ptr; -#endif +#endif /* HAVE_MKSTEMP */ } |