Subject: bug#9960: Compiling Emacs trunk with MSVC

From: Eli Zaretskii <[email-masked]>
Date: Sat, 05 Nov 2011 18:10:38 +0200

> From: Óscar Fuentes <[email-masked]>
> Cc: [email-masked],  [email-masked],  [email-masked]
> Date: Sat, 05 Nov 2011 16:51:55 +0100
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > 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.
> 
> Why not
> 
>   #ifdef _MSC_VER
>   #include "sys/stat.h"
>   #endif
> 
> ?

Because at least some versions of Microsoft's stat.h don't define
mode_t, but instead use "unsigned short" literally in `struct stat'
definition.