On Thu, Jul 19, 2007 at 05:47:36PM -0400, Charles Wilson wrote: > Ralf Wildenhues wrote: > >Hello Charles, Peter, > >>In case it wasn't clear, I think this patch should go in sooner rather > >>than later, as it also fixes an existing problem in the cwrapper w.r.t. > >>intptr_t. > > > >I don't mind the patch going in, but isn't > > +# define _stat stat > > > >the wrong way around, or at least superfluous? > > You're right, it is the wrong way around. I would suspect also that if > it compiles as-is under MSVC, then it is unnecessary. However, from > reading the msdn docs, it seems that the correct define: > > # define stat _stat > > SHOULD be necessary, for both 'stat() ==> _stat()' and 'struct stat ==> > struct _stat' usages. Peter, can you clarify?
The cwrapper has two targets (cygwin, mingw), I'm adding a third (msvc). Both the previous targets has stat as stat, cygwin doesn't have _stat and msvc doesn't have stat (unless you link with OLDNAMES.LIB). So, going the other way around breaks cygwin (IIRC). But I guess mingw could drop stat at some point as well (and require -loldnames) in order to match the MS libc. I think mingw has _stat already. Should I commit as is? Cheers, Peter