[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 08:25:39 -0400
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

Conrad T.Pino wrote:

>@@ -705,9 +704,14 @@
>     /* assert (filename != NULL); */
>-    fn = _tempnam (Tmpdir, "cvs");
>+    fn = _tempnam (getenv("TEMP"), "cvs");

This raises several questions:

First, there's a new get_cvs_tmp_dir() function in src/main.c that
should be used rather than querying the environment directly. 
Otherwise, tmpdirs set on the command line and in the config file won't
be noticed.

Likewise, the TMPDIR_ENV macro probably needs to be split into config.h
so that `TMPDIR' can be used on UNIX & `TEMP' on Windows.  Right now the
get_cvs_tmp_dir() function always uses `TMPDIR', I believe.  This also
needs doc in cvs.texinfo - I just removed the reference to TEMP the
other day since I noticed it was not being used while I was rewriting
the tmpdir stuff.  Just grep for TMPDIR and add TEMP with a note about
it being used on Windows.

Lastly, does Windows have the POSIX "mkstemp" function, perhaps called
_mkstemp()?  If not, does the lib/mkstemp.c (which depends on
lib/tempname.c) compile on Windows?  If either of these is the case,
then we could move the cvs_temp_file() function from src/filesubr.c into
src/subr.c and remove the windows-NT  variant completely.



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]