[PATCH:xrdb 1/3] Convert HAS_MKSTEMP to autoconf standard HAVE_MKSTEMP
Gaetan Nadon
memsize at videotron.ca
Wed Jan 5 06:14:29 PST 2011
On Tue, 2011-01-04 at 20:31 -0800, Alan Coopersmith wrote:
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
> configure.ac | 3 +--
> xrdb.c | 4 ++--
> 2 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index f5e2389..deeb9a1 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -37,8 +37,7 @@ m4_ifndef([XORG_MACROS_VERSION],
> XORG_MACROS_VERSION(1.8)
> XORG_DEFAULT_OPTIONS
>
> -AC_CHECK_FUNC([mkstemp],
> - AC_DEFINE(HAS_MKSTEMP,1,[Define to 1 if you have the 'mkstemp' function.]))
> +AC_CHECK_FUNCS([mkstemp])
>
> # Find MAXHOSTNAMELEN definition
> # Common hidey holes:
> diff --git a/xrdb.c b/xrdb.c
> index 21005c0..33547f8 100644
> --- a/xrdb.c
> +++ b/xrdb.c
> @@ -943,7 +943,7 @@ main(int argc, char *argv[])
> strcpy(tmpname, "/tmp/xrdb_XXXXXX");
> #endif
> #endif
> -#ifndef HAS_MKSTEMP
> +#ifndef HAVE_MKSTEMP
> (void) mktemp(tmpname);
> filename = tmpname;
> fp = fopen(filename, "w");
> @@ -1115,7 +1115,7 @@ Process(int scrno, Bool doScreen, Bool execute)
>
> input = fopen(editFile, "r");
> snprintf(template, sizeof(template), "%sXXXXXX", editFile);
> -#ifndef HAS_MKSTEMP
> +#ifndef HAVE_MKSTEMP
> (void) mktemp(template);
> output = fopen(template, "w");
> #else
Reviewed-by: Gaetan Nadon <memsize at videotron.ca>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110105/b1bf9f59/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110105/b1bf9f59/attachment.pgp>
More information about the xorg-devel
mailing list