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: Derek Price
Subject: Re: [Cvs-cvs] Changes to ccvs/windows-NT/filesubr.c
Date: Wed, 21 Sep 2005 20:36:52 -0400
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

Conrad T. Pino wrote:

>Thank you.  How about calling it "cvs_system_temp_dir" instead?
>  
>

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.

>Then inside "windows-NT/unistd.h" we could try:
>  
>

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

?

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?

Regards,

Derek

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






reply via email to

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