From ripley at stats.ox.ac.uk  Tue Mar  1 15:57:11 2005
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Tue Mar  1 16:04:49 2005
Subject: [Rd] Can crc32() assume to be available at the C level?
In-Reply-To: <16932.27504.50306.153858@basebud.nulle.part>
References: <16932.27504.50306.153858@basebud.nulle.part>
Message-ID: <Pine.LNX.4.61.0503011326370.10692@gannet.stats>

On Tue, 1 Mar 2005, Dirk Eddelbuettel wrote:

> Antoine Lucas suggested extending my small digest package (which provides md5
> and sha-1 digests of R objects, which it are serialized if needed) with a
> crc32 function, and provided a fairly complete patch.
>
> We are now wondering if we should play it safe and bundle crc32.c (plus
> utils) in the digest sources (as I do with md5 and sha1), or if we can assume
> that crc32 is present on all R platforms thanks to zlib.
>
> Is that the case?  If so, is it a good idea to use it even though it doesn't
> appear in the header files?  Or should we package "our" copy?

It is present, but with --with-zlib options it could be in an external 
library and hence not exported by R.bin/libR.so. So I don't think you can 
rely on finding it.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] Can crc32() assume to be available at the C level?
Prof Brian Ripley