Re: [PATCH 03/40] Add target architecture MinGW.
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Mar 5, 2008, 22:18 UTC
- Message-ID
- <alpine.LSU.1.00.0803052317350.15786@racer.site>
- In-Reply-To
- <200803052221.12495.johannes.sixt@telecom.at>
Hi,
On Wed, 5 Mar 2008, Johannes Sixt wrote:
Show 44 quoted lines
> On Thursday 28 February 2008 13:05, Johannes Schindelin wrote:
> > On Wed, 27 Feb 2008, Johannes Sixt wrote:
> > > --- a/git-compat-util.h
> > > +++ b/git-compat-util.h
> > > @@ -357,6 +359,10 @@ static inline FILE *xfdopen(int fd, const char
> > > *mode) return stream;
> > > }
> > >
> > > +#ifdef __MINGW32__
> > > +int mkstemp(char *template);
> > > +#endif
> > > +
> > > static inline int xmkstemp(char *template)
> > > {
> > > int fd;
> >
> > Could we have this...
> >
> > > @@ -437,4 +443,140 @@ void git_qsort(void *base, size_t nmemb, size_t
> > > size, #define qsort git_qsort
> > > #endif
> > >
> > > +#ifdef __MINGW32__
> > > +
> > > +#include <winsock2.h>
> > > +
> > > +/*
> > > + * things that are not available in header files
> > > + */
> > > +
> > > [...]
> >
> > ... and this in compat/mingw.h? And then, we'd only have
> >
> > #ifdef __MINGW32__
> > #include "mingw.h"
> > #endif
> >
> > in git-compat-util.h?
>
> I've now created compat/mingw.h. Below is the interdiff. Of course, it
> mostly only moves code around. But you might want to look at at mkstemp,
> PATH_SEP, PRIuMAX, and has_dos_drive_prefix. Notice also that I include
> compat/mingw.h early in git-compat-util.h instead of late.Thanks!
With this, I think I have nothing to add to your series (except maybe an Acked-by: where it applies, or a Reviewed-by:, but I think that this would only be a burden on our maintainer).
Ciao, Dscho