
[PATCH] do_sqlite3-0.9.2 compile fails under cygwin
Reported by vo.x | July 17th, 2008 @ 04:06 PM
Hello,
I have found ticket #344 which describes similar problems with do_mysql on solaris. I applied the same patch for do_sqlite in recent version.
do_sqlite3_ext.c:
155,156c155,157
< time_t rawtime;
< struct tm * timeinfo;
---
> long gmtoffset;
> time_t t1, t2;
> struct tm tm;
178,181c179,184
< // Get localtime
< time(&rawtime);
< timeinfo = localtime(&rawtime);
<
---
> // begin ANSI GMT offset caluclation
> t1 = time(0);
> tm = *gmtime(&t1);
> t2 = mktime(&tm);
> gmtoffset = (long) difftime(t1, t2);
>
184,186c187,189
< hour_offset = abs(timeinfo->tm_gmtoff) / 3600;
< minute_offset = abs(timeinfo->tm_gmtoff) % 3600 / 60;
< sign = timeinfo->tm_gmtoff < 0 ? '-' : '+';
---
> hour_offset = abs(gmtoffset) / 3600;
> minute_offset = abs(gmtoffset) % 3600 / 60;
> sign = gmtoffset < 0 ? '-' : '+';
Comments and changes to this ticket
-
-
Dan Kubb (dkubb) November 28th, 2008 @ 02:41 AM
- State changed from new to open
- Title changed from do_sqlite3-0.9.2 compile fails under cygwin to [PATCH] do_sqlite3-0.9.2 compile fails under cygwin
- Assigned user cleared.
Could someone review this patch and see if it still applies to the current do_sqlite3?
-
Dan Kubb (dkubb) November 30th, 2008 @ 12:37 PM
- Assigned user set to Dirkjan Bussink
Dirkjan, would you mind reviewing this patch?
-
Dirkjan Bussink November 30th, 2008 @ 01:50 PM
- State changed from open to resolved
This seems to be fixed already because of the windows support work. I can't find tm_gmtoff usage in it anymore.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »