On Sun, Sep 26, 2010 at 5:42 PM, Joel Rosdahl <j...@rosdahl.net> wrote:
> On 2010-09-22 05:17, Ramiro Polla wrote:
>> - There is no strtok_r() on Windows, I've implemented an ugly
>> replacement using strtok().
> I switched to use strtok_r because I needed nested parsing somewhere.
> Although I don't see anything in the current code that needs it (I
> probably rewrote it), I think we should use a reentrant replacement.
> Maybe this: http://www.mail-archive.com/mutt-...@mutt.org/msg03067.html

At first I tried using a naive wrapper of strtok_r() around strtok()
but I've been bitten by the reentrancy issue. It involved that
function that hashes multiple commands and find_executable. I'm
certain my version works, but I'm certain it's a hack too =). I don't
really mind which replacement is used as long as it works and the
functions it uses exist/work as expected on win32. I've checked
quickly and all of strspn, strpbrk, and strchr seem to be available on

>> - The ar check on configure.ac fails for cross-compilation. I haven't
>> investigated why, I've just removed it, but I suppose it's there for a
>> reason so it's better to fix than to remove =)
> Perhaps already fixed in e1b287d0ca3cdb48a5d3e8b0d46b9af51ee39abe?

Yes, that seems to have worked.

>> Joel, is there a way we can time how long each part of ccache takes?
>> Not just a whole batch of tests, but it would be nice if under a
>> certain ifdef we could print to the ccache log the time it takes to
>> perform each step.
> That would be a nice thing to have. Added to the TODO list.

If you want to borrow some timing code there are the START_TIMER and
STOP_TIMER macros from ffmpeg (libavutil/timer.h). It's not good for
absolute timings (since the time comes from rdtsc), but it's great if
we want relative times (before and after a change or one part of the
program relative to the other).
ccache mailing list

Reply via email to