Re: [PATCH 03/40] Add target architecture MinGW.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 28 February 2008 13:05, Johannes Schindelin wrote:
> 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.

> > +#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.

> ... 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux