Bill Allombert on Sat, 27 Jun 2009 16:56:23 +0200


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

Re: Pari svn on MSVC


On Sat, Jun 27, 2009 at 02:43:13AM +0100, Jason Moxham wrote:
> In the file
> config/paricfgDOS.h.SH

It is probable this file must be entirely rewritten to match current
Configure. I do not think we ever use the resulting Odos/paricfg.h
anymore.

> we have
>
> #if !defined(WINCE) && !(defined(_WIN32) && defined(_MSC_VER))
> /* Timings: Don't use times because of the HZ / CLK_TCK confusion. */
> #  define USE_FTIME 1
> #  define HAS_STRFTIME
> #endif
> #if defined(_WIN32) && defined(_MSC_VER)
> #  define HAS_STAT
> #endif
>
> #endif
>
>
> the
> #define HAS_STAT
> causes problems as MSVC does not define the macros
>
> es.obj : error LNK2001: unresolved external symbol _S_ISDIR
> es.obj : error LNK2001: unresolved external symbol _S_ISREG
>
> not defining HAS_STAT   sorts the problem out.
>
> I expect we could find some sort of replacement for this if it's  
> critical/useful

It seems this is not a problem with stat per se, but with the POSIX
macros S_ISDIR/S_ISREG.
I suppose the MSC documentation of stat should say how st_mode must
be understood.

The point of this code is to check whether something is a directory or a file.

Cheers,
Bill.