This is the mail archive of the
mailing list for the Cygwin project.
Fwd: struct tm problem
- From: Irfan Adilovic <irfanadilovic at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 6 Mar 2014 13:17:10 +0100
- Subject: Fwd: struct tm problem
- Authentication-results: sourceware.org; auth=none
- References: <CAJoYywWqyBYEJKriugeU0deHm=DsS_LYgHotaX6K=q6TO_tmQQ at mail dot gmail dot com> <20140304081928 dot GF7236 at calimero dot vinschen dot de> <CAJoYywUF2gpX5+-9H3gExyRMYUtJQyi_mHOX42uG9kRfaQ0Nvg at mail dot gmail dot com> <53172C18 dot 5090906 at redhat dot com> <20140305140553 dot GC2192 at calimero dot vinschen dot de> <CAJoYywXWrs+kreKb+_cZbTCJJ+7DQhFAgXgX6w5d8k-KC_Nbqw at mail dot gmail dot com>
On Wed, Mar 5, 2014 at 3:05 PM, Corinna Vinschen wrote:
> On Mar 5 06:52, Eric Blake wrote:
>> On 03/05/2014 03:45 AM, Irfan Adilovic wrote:
>> > If it is recognized that the executable was compiled against a
>> > different sized struct tm, how would you instruct cygwin1.dll code not
>> > to write to tm_gmtoff?
>> Linker magic, the same as how we converted to 64-bit stat, and the same
>> as what we will eventually have to do if we want to convert to 64-bit
>> time_t. Basically, we add a new entry point, and alias the public name
>> to the new entry point. Any old program is still linked to the old
>> name, where we know they use the smaller size. Any new program is
>> linked to the new name, where we know they use the larger size. New
>> programs cannot run against the old dll, but the new dll is able to
>> handle both old and new apps by virtue of dual entry points.
> Not in this case. I just applied a patch which simply tests the API
> version of the executable and skips the code handling tm_offset and
> tm_zone, which are just a few lines anyway.
Can you point me to the patch in CVS? I'd like to see the code --
being curious, as I already said.
> What you describe above is what we would have to do if we change
> sizeof(time_t) from 4 to 8 on 32 bit, which is something I won't have on
> my plate any time soon. I'm quite satisfied that the 64 bit version has
> a 8 byte time_t. Not that I wouldn't appreciate patches...
> Corinna Vinschen Please, send mails regarding Cygwin to
> Cygwin Maintainer cygwin AT cygwin DOT com
> Red Hat
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple