DBI windows compile problems: gmtime_r

Derek Atkins warlord at MIT.EDU
Mon Jul 14 12:22:47 EDT 2008


Thanks.

I didn't look to see if it was being used elsewhere.  I'm quite surprised
how often we use it.   Well, I suppose for now we should just live with
it.

I'll try to remember to file a bug report at some point.

-derek

Phil Longstaff <plongstaff at rogers.com> writes:

> OK.  However, gmtime() is used in many other places in gnucash, so I am
> not introducing a problem.
>
> Why don't you log a bug so we won't forget it :)
>
> Phil
>
> Derek Atkins wrote:
>> Hi,
>> 
>> One problem with using gmtime() is that it is not multi-threaded
>> so a second call to gmtime() will scribble over the space used
>> in the first call.
>> 
>> I think a better approach would be to add gmtime_r to AC_REPLACE_FUNCS
>> in configure and then we can add an implementation in libs/libc
>> on win32.  I suspect this would be a better long-term solution
>> than just using gmtime().
>> 
>> -derek
>> 
>> Quoting Phil Longstaff <plongstaff at rogers.com>:
>> 
>>> Hi Nathan,
>>>
>>> sorry for taking so long.  I just committed this change.
>>>
>>> Phil
>>>
>>> Nathan Buchanan wrote:
>>>> Hi Phil!
>>>>
>>>> I get a warning about gmtime_r being undefined in
>>>> src/backend/sql/gnc-backend-sql.c:1550  From what I read, the gmtime_r
>>>> function is not available in mingw. How about we use gmtime?
>>>>
>>>> Nathan
>>>>
>>>> -- 
>>>> <><><><><><><><><><><><><><><>
>>>> "Even if you are on the right track, you'll get run over if you just sit
>>>> there" - Will Rogers
>>>
>>>
>>> _______________________________________________
>>> gnucash-devel mailing list
>>> gnucash-devel at gnucash.org
>>> https://lists.gnucash.org/mailman/listinfo/gnucash-devel
>>>
>> 
>> 
>> 
>
>
>
>

-- 
       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