X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f X-Recipient: djgpp-workers AT delorie DOT com From: Martin Str|mberg Message-Id: <201401141024.s0EAO5jE018027@dexter.ludd.ltu.se> Subject: Re: Implementation of mkdtemp. To: djgpp-workers AT delorie DOT com Date: Tue, 14 Jan 2014 11:24:05 +0100 (MET) In-Reply-To: <52D08912.4080904@gmx.de> from "Juan Manuel Guerrero" at Jan 11, 2014 12:58:10 AM X-Mailer: ELM [version 2.5 PL6] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk According to Juan Manuel Guerrero: > diff -aprNU5 djgpp.orig/src/libc/compat/stdio/mktemp.c djgpp/src/libc/compat/stdio/mktemp.c > --- djgpp.orig/src/libc/compat/stdio/mktemp.c 2013-12-31 14:54:02 +0100 > +++ djgpp/src/libc/compat/stdio/mktemp.c 2014-01-09 22:24:06 +0100 > @@ -1,82 +1,99 @@ > +/* Copyright (C) 2014 DJ Delorie, see COPYING.DJ for details */ > /* Copyright (C) 2013 DJ Delorie, see COPYING.DJ for details */ > /* Copyright (C) 2009 DJ Delorie, see COPYING.DJ for details */ > /* Copyright (C) 2000 DJ Delorie, see COPYING.DJ for details */ > /* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */ > /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ > #include > #include > #include > +#include > #include > #include > #include > #include > +#include > > static int mktemp_count = -1; > > char * > mktemp(char *_template) > { > - static int count = 0; > - char *cp, *dp; > - int i, len, xcount, loopcnt; > - char real_path[FILENAME_MAX]; > + register int i, len, xcount; > + unsigned int use_lfn = _USE_LFN; Hrrm... Declaring variables with register in C is considered bad form nowadays. May I ask why you'd do so? Nevertheless, thanks for all your work. -- MartinS