Re: [ccache] Suggested patch to add local strtok_r for systems lacking it

2012-05-13 Thread Joel Rosdahl
Hi,

On 12 April 2012 08:32, Jürgen Buchmüller pullm...@t-online.de wrote:
 here's a suggested patch for config.h.in and util.c to add a local
 implementation of strtok_r for systems that don't have it (e.g. mingw32
 plus libgw32c).

A lot of Windows build related work has already been done in the
development version (i.e., on the master branch), including a strtok_r
implementation. It would be great if you could try it out:
http://ccache.samba.org/repo.html

-- Joel
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] Suggested patch to add local strtok_r for systems lacking it

2012-04-12 Thread Martin Pool
Thanks for the patch.

I guess the definition ought to be guarded by HAVE_STRTOK_R, not _WIN32.

Perhaps you also need to update configure.in to check for it?

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


Re: [ccache] Suggested patch to add local strtok_r for systems lacking it

2012-04-12 Thread Jürgen Buchmüller
Am Donnerstag, den 12.04.2012, 18:54 +1000 schrieb Martin Pool:
 Thanks for the patch.
 
 I guess the definition ought to be guarded by HAVE_STRTOK_R, not _WIN32.

Of course! I should have looked through it once more before submission.

 Perhaps you also need to update configure.in to check for it?

I thought that config.h.in standard defines, i.e. defines for well known
function names, would be handled automagically by the autotools and it
would suffice to just add the #define. I'll take a closer look now.

In any case, I realized there actually _is_ a strtok_r implementation in
libgw32c - of course! It's just that it was hidden behind a __USE_GNU
ifdef, so I have to specify -D_GNU_SOURCE to enable its visibility.

What I'm trying to achieve is to build ccache-3.1.7 on mingw32 together
with the glibc substitute gw32c. The readily available ccache-win32,
which most people use, is based on ccache-2.4 and a little hackish for
my taste.

Currently I'm running into some brick walls because I must undefine
_WIN32 to avoid conflicts between win32 and glibc for various types and
macros. I will report should I succeed, since I suspect many people will
be interested in a more recent ccache for mingw32.

Regards
Juergen

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


Re: [ccache] Suggested patch to add local strtok_r for systems lacking it

2012-04-12 Thread Mike Frysinger
On Thursday 12 April 2012 02:32:39 Jürgen Buchmüller wrote:
 here's a suggested patch for config.h.in and util.c to add a local
 implementation of strtok_r for systems that don't have it (e.g. mingw32
 plus libgw32c).

sounds like we should just integrate gnulib instead of open coding all of our 
own compatibility layers
-mike


signature.asc
Description: This is a digitally signed message part.
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache