r17325 - gnucash/branches/gda-dev2/src/backend/sql - Replace gmtime_r() with gmtime() so that it can be compiled on win32.

Derek Atkins warlord at MIT.EDU
Mon Aug 3 10:53:32 EDT 2009


Phil Longstaff <plongstaff at rogers.com> writes:

> On July 31, 2009 05:03:39 pm Derek Atkins wrote:
>> Phil,
>>
>> Yes, I know this was committed a year ago, but I'm sitting at 34,000
>> feet and finally found time to go through the set of changes over the
>> past... year..
>>
>> Anyways, this change seems wrong to me.  The main difference between
>> gmtime() and gmtime_r() is that the latter is thread-safe whereas the
>> former is not.  If Win32 doesn't have gmtime_r the proper fix would be
>> to use AC_REPLACE_FUNCS() and create an implementation of gmtime_r()
>> that we can use for systems (like Win32) that don't have it.
>>
>> This would imply:
>>
>> 1) add gmtime_r to the AC_REPLACE_FUNCS in configure.in
>> 2) create an implementation of gmtime_r in lib/libc/
>> 3) hook that together in lib/libc/Makefile.am
>>
>> Maybe you just don't care about thread safety in gnc-backend-sql.c?
>
> That's quite the assumption.  Yes, I do care.  I was unaware of 
> AC_REPLACE_FUNCS.

That's why I audit changesets, albeit a year later...  :)

> Phil

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-devel mailing list