Re: [PATCH 03/40] Add target architecture MinGW.
- From
Johannes Sixt <johannes.sixt@telecom.at>
- Date
- Feb 28, 2008, 20:40 UTC
- Message-ID
- <200802282140.30654.johannes.sixt@telecom.at>
- In-Reply-To
- <alpine.LSU.1.00.0802281159550.22527@racer.site>
On Thursday 28 February 2008 13:05, Johannes Schindelin wrote:
Show 12 quoted lines
> Hi,
>
> On Wed, 27 Feb 2008, Johannes Sixt wrote:
> > +int gettimeofday(struct timeval *tv, void *tz)
> > +{
> > + return 0;
> > +}
>
> Should it not return -1, for failure? (I know, I know, probably a few
> programs do not work, then, but it is not correct that it succeeded.)
>
> The same goes for a few other functions.Agreed. The return value of these functions should not make a difference at this stage in the patch series anyway.
Show 9 quoted lines
> > +#ifdef __MINGW32__
> > +int mkstemp(char *template);
> > +#endif
> > +
> > static inline int xmkstemp(char *template)
> > {
> > int fd;
>
> Could we have this...No, becauser xmkstemp needs the forward declaration of mkstemp(). But we could make it unconditional.
Show 7 quoted lines
> ... and this in compat/mingw.h? And then, we'd only have > > #ifdef __MINGW32__ > #include "mingw.h" > #endif > > in git-compat-util.h?
I thought about this, but I decided against it: git-compat-util.h is the place to look for compatibility functions. A file compat/mingw.h only introduces an extra indirection and only *hides* stuff instead of making it obvious.
-- Hannes