Patch for src/engine/gnc-trace.c

Rich Johnson rich at dogstar-interactive.com
Mon Dec 22 08:05:10 CST 2003


On Monday, December 22, 2003, at 04:24 AM, Christian Stimming wrote:

> On Donnerstag, 27. November 2003 00:44, Rich Johnson wrote:
>> Enclosed is a patch enabling compilation on Mac OS X.
>> (It's my first posting here so please let me know if the format is
>> <<snip>>
> sorry for nobody reacting to this patch. Of course we welcome any
> contribution, but unfortunately currently most core developers are 
> busy by
> other means.
No problem.

>
> Your proposed patch, however, doesn't really work with gcc3.3 and 
> Linux. It
> precisely says
>
> gnc-trace.c: In function `gnc_report_clock':
> gnc-trace.c:209: warning: int format, __time_t arg (arg 4)
> gnc-trace.c:209: warning: int format, __suseconds_t arg (arg 5)
> gnc-trace.c: In function `gnc_report_clock_total':
> gnc-trace.c:242: warning: int format, __time_t arg (arg 4)
> gnc-trace.c:242: warning: int format, __suseconds_t arg (arg 5)
>
> So it seems that on Linux, the type indeed requires a %ld format 
> directive...
>
Hmmm.. without the patch compiling on OSX reports:

gnc-trace.c: In function `gnc_report_clock':
gnc-trace.c:209: warning: long int format, int32_t arg (arg 4)
gnc-trace.c:209: warning: long int format, int32_t arg (arg 5)
gnc-trace.c: In function `gnc_report_clock_total':
gnc-trace.c:242: warning: long int format, int32_t arg (arg 4)
gnc-trace.c:242: warning: long int format, int32_t arg (arg 5)

So it looks like it's a conflict between differing typedefs for struct 
timeval.   But timeval a fundamental datatype; so this class of 
problems must have been solved somewhere.  I'll look around some more.

Also,  should this thread be carried on elsewhere--i.e. not "patches"?

Thanks,
--rich



More information about the gnucash-patches mailing list