From: Kurt Zeilenga Date: Thu, 6 Dec 2001 21:19:10 +0000 (+0000) Subject: ITS#1482 patch from Michael.Gerdts@usa.alcatel.co X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~737 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ac2cd34aaff9badffa2ff41c1185b01f6d18639a;p=openldap ITS#1482 patch from Michael.Gerdts@usa.alcatel.co MSVC cannot build clients/ud because the symbol mkstemp is not found. Add tmpfile() support. --- diff --git a/clients/ud/edit.c b/clients/ud/edit.c index 88c777c17b..fa97178f60 100644 --- a/clients/ud/edit.c +++ b/clients/ud/edit.c @@ -142,6 +142,7 @@ load_editor( void ) printf("->load_editor()\n"); #endif +#ifdef HAVE_MKSTEMP sprintf(entry_temp_file, "/tmp/udXXXXXX"); tmpfd = mkstemp(entry_temp_file); @@ -156,6 +157,14 @@ load_editor( void ) return(-1); } +#else + fp = tmpfile(); + if ( fp == NULL ) { + perror("tmpfile"); + return(-1); + } +#endif + fprintf(fp, "## Directory entry of %s\n", Entry.name); fprintf(fp, "##\n"); fprintf(fp, "## Syntax is:\n");