Mail Archives: djgpp-workers/2014/01/14/05:40:47
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 <libc/stubs.h>
> #include <libc/bss.h>
> #include <libc/symlink.h>
> +#include <fcntl.h>
> #include <unistd.h>
> #include <stdlib.h>
> #include <stdio.h>
> #include <string.h>
> +#include <errno.h>
>
> 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
- Raw text -