2009-05-27 11:45:59 +02:00
|
|
|
/*****************************************************************************
|
|
|
|
|
2016-08-12 10:17:45 +02:00
|
|
|
Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
|
2020-03-05 06:31:55 +01:00
|
|
|
Copyright (c) 2016, 2020, MariaDB Corporation.
|
2009-05-27 11:45:59 +02:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it under
|
|
|
|
the terms of the GNU General Public License as published by the Free Software
|
|
|
|
Foundation; version 2 of the License.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License along with
|
2012-08-01 16:27:34 +02:00
|
|
|
this program; if not, write to the Free Software Foundation, Inc.,
|
2019-05-11 18:25:02 +02:00
|
|
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA
|
2009-05-27 11:45:59 +02:00
|
|
|
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
|
|
/**************************************************//**
|
2012-08-01 16:27:34 +02:00
|
|
|
@file include/ut0crc32.h
|
|
|
|
CRC32 implementation
|
2009-05-27 11:45:59 +02:00
|
|
|
|
2012-08-01 16:27:34 +02:00
|
|
|
Created Aug 10, 2011 Vasil Dimov
|
2009-05-27 11:45:59 +02:00
|
|
|
*******************************************************/
|
|
|
|
|
2012-08-01 16:27:34 +02:00
|
|
|
#ifndef ut0crc32_h
|
|
|
|
#define ut0crc32_h
|
2009-05-27 11:45:59 +02:00
|
|
|
|
2012-08-01 16:27:34 +02:00
|
|
|
#include "univ.i"
|
2020-09-17 16:07:37 +02:00
|
|
|
#include <my_sys.h>
|
2020-03-05 06:31:55 +01:00
|
|
|
static inline uint32_t ut_crc32(const byte *s, size_t size)
|
|
|
|
{
|
2020-09-17 16:07:37 +02:00
|
|
|
return my_crc32c(0, s, size);
|
2020-03-05 06:31:55 +01:00
|
|
|
}
|
|
|
|
|
2012-08-01 16:27:34 +02:00
|
|
|
#endif /* ut0crc32_h */
|