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

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

 



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.

> diff --git a/git-compat-util.h b/git-compat-util.h
> index 2a40703..b1f3f92 100644
> --- 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?

Ciao,
Dscho

-
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