Re: MinGW port - initial work uploaded
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 23, 2007, 11:25 UTC
- Message-ID
- <Pine.LNX.4.63.0701231220470.22628@wbgn013.biozentrum.uni-wuerzburg.de>
- In-Reply-To
- <Pine.LNX.4.64.0701220823260.32200@woody.linux-foundation.org>
Hi,
On Mon, 22 Jan 2007, Linus Torvalds wrote:
> Maybe getenv() under MinGW always returns a real string, and it's just > empty?
No. It is not Oracle: it _does_ return NULL if it is not set, and an empty string iff it is set to an empty string.
Show 8 quoted lines
> - datestamp() uses "time()" to get the number of seconds since the epoch. > HOWEVER, it does it by actually doing > > time_t now; > > time(&now); > > which is proper, but maybe a bit unusual.
MinGW does that quite fine (actually, it just calls the MS C Runtime library; maybe they still had a clue bat back when they wrote that?).
> Alternatively, if "time()" just doesn't work in MinGW, just use > gettimeofday() instead, [...]
Funnily enough, MinGW does not have gettimeofday(). Actually, for purposes of getting git to compile, I had to
int gettimeofday(struct timeval *tv, void *tz)
{
return -1;
};-)
> Anyway. I have no idea of Windows or MinGW, or what you did to make it > all compile, so..
Lucky you! Fortunately, I don't have any Windows at home (but I still have windows, thank God!). So I cannot even be tempted to work on this thing in my free time.
Ciao, Dscho