bug-cvs
[Top][All Lists]
Advanced

[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: Thu, 22 Sep 2005 16:53:56 -0700

Hi Derek,

> From: Derek Price
> Sent: Wednesday, September 21, 2005 17:37
> 
> Hrm.  I don't think I like that.  The function is really general enough
> to get the system temp dir for any program.  I don't see a reason to put
> "cvs" in the name.

Thank you.

> POSIX says mkdir should be declared in <sys/stat.h>, so that and
> config.h are all we can be sure a GNULIB module that needs mkdir will
> include.  Since Windows has a <sys/stat.h> (or at least I think it does,
> or a bunch of other code would be breaking), why not just this in
> config.h.in.footer:
> 
> #include <dirent.h>
> #define mkdir wnt_mkdir

Done in attached patch with <direct.h> as MSVC doesn'have <dirent.h>

> I don't like including other headers from config.h, but this isn't
> exactly the general case and if it doesn't work we can examine that
> bridge later.
> 
> Hrm.  GNULIB's mkdtemp.c does this to call the Windows mkdir function. 
> It's not elegant, but apparently it works:
> 
> # define mkdir ((int (*)()) mkdir)
> 
> Could that be stuck in config.h without other worries?

We don't need to do that.  A "#undef mkdir" in

        windows-NT/filesubr.c
        windows-NT/mkdir.c

seems to suffice for compiling.
===========================================================
Attached "patch.txt" gets me to a sucessful compile, see attached "compile.txt"
file.  Not all the warnings are fixed since the program run is very buggy.

Warning: I've provided an "mbsinit" implementation in "config.h" for now.

I'll email about each bug seperately.

Conrad

Attachment: patch.txt
Description: Text document

Attachment: compile.txt
Description: Text document


reply via email to

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