Re: [ccache] More win32 patches

2010-09-26 Thread Ramiro Polla
Hi,

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

 - 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
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


[ccache] More win32 patches

2010-09-21 Thread Ramiro Polla
Hi,

I've updated my github fork at:
http://github.com/ramiropolla/ccache

- There is no strtok_r() on Windows, I've implemented an ugly
replacement using strtok().
- 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 =)
- Make test on Windows requires a certain dd to work (one that can
emulate /dev/zero). It's the one found here:
http://www.chrysocome.net/dd
- %APPDATA% is chosen as home on Windows if $HOME is not found. This
makes ccache work on cmd.exe. Could someone please test whether it now
works on CodeBlocks?
- Executables with dots in the filename are now properly found.
- Checks for win32 directories before stat (I faintly remember already
having done something similar before, but out-of-tree builds were no
longer being cache directly).

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. It seems to have gotten slower on Windows since the
first port I've made (either that or FFmpeg has grown a lot too).

Ramiro Polla
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] Win32 support.

2010-07-16 Thread Ramiro Polla
On Fri, Jul 16, 2010 at 12:00 PM, Joel Rosdahl j...@rosdahl.net wrote:
 Implement is_full_path() helper function: This doesn't work if the
 path is ../foo or any other relative path other than ./foo. Doesn't
 just searching for / or \\ work on Windows too?

Changed to just searching for '/' or '\\'.

 Add a define for path delimiter: Applied. Also made CCACHE_EXTRAFILES
 use PATH_DELIM.

Thanks.

 Win32 support: In compare_executable_name, you can use
 x_asprintf(tmp, %s.exe, s2) instead. Otherwise, looks good to me.

Updated.

Also fixed a couple of issues related to 64-bit Windows pointed out by
the KDE devs.

By the way there's still a failure with out-of-tree builds for the
testsuite, but I've just worked around it and haven't checked closely
why it happens (suites.h not being found).

Ramiro Polla
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] ccache on windows

2010-06-23 Thread Ramiro Polla
Hi,

On Tue, Jun 22, 2010 at 9:15 PM, Patrick Spendrin ps...@gmx.de wrote:
 I am interested in getting ccache patches for windows upstreams, so I
 started a repository, took the patches that Ramiro Polla provided some
 weeks ago, and rebased them; they can be found, including my fixes on
 git://gitorious.org/ccache-win/ccache-win.git

 I'd like to get these fixes upstreams, not all of them are platform
 specific though. Since I am not the original author, I hope Ramiro will
 also speak up for these patches?!

I sent an e-mail to the list a couple of days ago regarding a github
fork I had created with those patches and pointing out some initial
uncontroversial patches that could get applied early but got no answer
yet.

I don't plan for the other patches to be applied as they are, but
rather be reviewed and discussed first (and look for cleaner solutions
to some issues), but there was no reply to that either...

Ramiro Polla
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] About Win32 binary

2010-05-11 Thread Ramiro Polla
On Tue, May 11, 2010 at 12:17 PM, asm warrior asmwarr...@gmail.com wrote:
 Now, I can successfully using the ccache.exe from reckless's ftp site:
 http://ftp//90.184.233.166/ccache.exe

Please tell him he must provide source code for his build.

Also, my patches expect you to be running a shell (not cmd.exe).

Ramiro Polla
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] About Win32 binary

2010-05-10 Thread Ramiro Polla
Hi,

On Mon, May 10, 2010 at 8:59 PM, asm warrior asmwarr...@gmail.com wrote:
 Hi, all.  I just came from this post in Codeblocks form:
 http://forums.codeblocks.org/index.php/topic,12285.msg83666.html#msg83666

 I have just find the Win32 support of ccache from this post:
 http://www.mail-archive.com/ccache@lists.samba.org/msg00426.html

 But there are only patches on the current 3.0 preview release. So, my
 question is:

 How can I build a win32 binary ccache on Windows system. (I have
 MinGW, MSYS already installed). I found the manual in
 http://ccache.samba.org/ccache-man.html  is not so clear about
 installation on Win32 system.

You should get the latest source code with git, then apply the patches
sequentially, and win32_tests.diff last. Then run sh autogen.sh,
configure and make normally.

 Is it possible to supply some Win32 binary files, so that a normal
 user can use it directly (not build it himself)

Here it is:
http://ramiro.arrozcru.org/ccache-win32-1.exe

It's a build with the exact same patches as I posted on the other
thread, cross compiled from Ubuntu, with debugging information. I
might remove it at any moment though (sorry to whoever gets here from
some search engine and gets frustrated because the link 404s).

Ramiro Polla
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


[ccache] [PATCH] Move mkstemp() replacement to before its use.

2010-05-09 Thread Ramiro Polla
$subj


0001-Move-mkstemp-replacement-to-before-its-use.patch
Description: Binary data
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] Release plan

2010-02-28 Thread Ramiro Polla
On Sun, Feb 28, 2010 at 5:11 PM, Joel Rosdahl j...@rosdahl.net wrote:
 And does anyone have other feature requests or
 semi-forks with features that could be incorporated in later ccache versions?

I have a win32 port almost done. But since it touches *a lot* of code
I'd rather wait for after 3.0 so it can receive more testing.

Ramiro Polla
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache