[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Cvs-cvs] Changes to ccvs/windows-NT/filesubr.c

From: Derek Price
Subject: Re: [Cvs-cvs] Changes to ccvs/windows-NT/filesubr.c
Date: Tue, 20 Sep 2005 12:27:18 -0400
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

Conrad T. Pino wrote:

>Let me know if any of this information changes the suggested direction.

The Windows mktemp you linked to only allows up to 27 temporary files
and is not acceptable.
The other temporary file creation routines you listed return unique file
names, but do not open the files and so provide no guarantee that
another process was not returned the same "unique" file name before you
had a chance to open it.

I suggest the following:

1) Abstract the src/main.c env lookup of TMPDIR_ENV with some wrapper
function which looks up TMPDIR_ENV in the env on UNIX and calls your
gettemppath  function
(http://msdn.microsoft.com/library/en-us/fileio/fs/gettemppath.asp) on

2) Either get the lib/mkstemp.c & lib/tempname.c files to compile on
Windows and use that mkstemp, or write a windows-NT/filesubr.c
substitute for mkstemp that calls your gettempfilename function
and verify that you can open it O_CREAT|O_EXCL before you return the
file descriptor (keeping in mind that this is basically what
lib/tempname.c already does).



Derek R. Price
CVS Solutions Architect
Ximbiot <http://ximbiot.com>
v: +1 717.579.6168
f: +1 717.234.3125

reply via email to

[Prev in Thread] Current Thread [Next in Thread]