~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysys/checksum.c

  • Committer: Brian Aker
  • Date: 2008-06-28 01:01:34 UTC
  • Revision ID: brian@tangent.org-20080628010134-n44ixrdgb6yexhkb
Remove my_pthread_getspecific_ptr()

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
 
17
 
#include "config.h"
18
 
#include "drizzled/internal/my_sys.h"
19
 
 
 
17
#include <my_global.h>
 
18
#include <my_sys.h>
20
19
#include <zlib.h>
21
20
 
22
 
namespace drizzled
23
 
{
24
 
namespace internal
25
 
{
26
 
 
27
21
/*
28
22
  Calculate a long checksum for a memoryblock.
29
23
 
34
28
      length    length of the block
35
29
*/
36
30
 
37
 
ha_checksum my_checksum(ha_checksum crc, const unsigned char *pos, size_t length)
 
31
ha_checksum my_checksum(ha_checksum crc, const uchar *pos, size_t length)
38
32
{
39
 
  return ha_checksum(crc32((uint32_t)crc, pos, uInt(length)));
 
33
  return (ha_checksum)crc32((uint)crc, pos, length);
40
34
}
41
35
 
42
 
} /* namespace internal */
43
 
} /* namespace drizzled */