Subject: Re: bug#9960: Compiling Emacs trunk with MSVC

From: Eli Zaretskii <[email-masked]>
Date: Sat, 05 Nov 2011 16:53:11 +0200

> Date: Sat, 05 Nov 2011 16:16:40 +0200
> From: Eli Zaretskii <[email-masked]>
> Cc: [email-masked], [email-masked]
> 
> > +/* Define to `int' if <sys/types.h> does not define. */
> > +#ifdef __GNUC__
> > +/* No action required for gcc */
> > +#else /* MSVC */
> > +#define mode_t int
> > +#endif
> > +
> >   /* A va_copy replacement for MSVC.  */
> >   #ifdef _MSC_VER
> >   # ifdef _WIN64
> 
> Please commit this, thanks.

Actually, it's better to say

 #ifdef _MSC_VER
 typedef unsigned short mode_t;
 #endif

since that is how MS headers define it in their sys/stat.h.