Re: [PATCH 03/40] Add target architecture MinGW.
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Feb 28, 2008, 12:05 UTC
- Message-ID
- <alpine.LSU.1.00.0802281159550.22527@racer.site>
- In-Reply-To
- <1204138503-6126-4-git-send-email-johannes.sixt@telecom.at>
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.
Show 15 quoted lines
> 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...
Show 13 quoted lines
> @@ -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