[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: Conrad T. Pino
Subject: RE: [Cvs-cvs] Changes to ccvs/windows-NT/filesubr.c
Date: Tue, 20 Sep 2005 14:48:02 -0700

Hi Derek,

> From: Derek Price
> Sent: Tuesday, September 20, 2005 09:27
> 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
> Windows.

H:\cvs-1.12>grep -dn TMPDIR_ENV *.h
File src\cvs.h:
258     #define TMPDIR_ENV      "TMPDIR"        /* Temporary directory */

That's not a value ever likely to be defined on Windows.  IMO the Windows
value should be "TMP" given the Win32 API documentation we've seen.

> 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
> (http://msdn.microsoft.com/library/en-us/fileio/fs/gettempfilename.asp)
> 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).

This looks pretty easy except Microsoft's "mkdir" has only 1 argument
and we pick up another "mbsinit" linker error from another module.
See below for compiler output.

I checked for "fdopen" function and VC6 has one.

Should "cvs_temp_file" stay in the "filesubr.c" module?

> Regards,


> Derek


--------------------Configuration: libcvs - Win32 Debug--------------------
h:\conrad\projects\cvs-1.12\lib\tempname.c(282) : warning C4020: 'mkdir' : too 
many actual parameters
Creating library...
--------------------Configuration: libdiff - Win32 Debug--------------------
Creating library...
--------------------Configuration: cvsnt - Win32 Debug--------------------
libdiff.lib(regex.obj) : error LNK2001: unresolved external symbol _mbsinit
libdiff.lib(strftime.obj) : error LNK2001: unresolved external symbol _mbsinit
.\WinDebug\cvs.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.

cvs.exe - 3 error(s), 138 warning(s)

reply via email to

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