diff options
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/CMakeLists.txt | 2 | ||||
-rw-r--r-- | mysys/checksum.c | 6 | ||||
-rw-r--r-- | mysys/my_crc32.c | 23 |
3 files changed, 7 insertions, 24 deletions
diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt index 0d404586569..5f4e9156fd2 100644 --- a/mysys/CMakeLists.txt +++ b/mysys/CMakeLists.txt @@ -71,7 +71,7 @@ ENDIF() ADD_CONVENIENCE_LIBRARY(mysys ${MYSYS_SOURCES}) TARGET_LINK_LIBRARIES(mysys dbug strings mysys_ssl ${ZLIB_LIBRARY} - ${LIBNSL} ${LIBM} ${LIBRT} ${LIBDL} ${LIBSOCKET} ${LIBEXECINFO}) + ${LIBNSL} ${LIBM} ${LIBRT} ${LIBDL} ${LIBSOCKET} ${LIBEXECINFO} ${CRC32_VPMSUM_LIBRARY}) DTRACE_INSTRUMENT(mysys) IF(HAVE_BFD_H) diff --git a/mysys/checksum.c b/mysys/checksum.c index a948785d935..7f26e02e7bd 100644 --- a/mysys/checksum.c +++ b/mysys/checksum.c @@ -30,7 +30,13 @@ ha_checksum my_checksum(ha_checksum crc, const uchar *pos, size_t length) { +#ifdef HAVE_CRC32_VPMSUM + extern unsigned int crc32_vpmsum(unsigned int crc, const unsigned char *p, + unsigned long len); + crc= (ha_checksum) crc32_vpmsum((uint) crc, pos, (uint) length); +#else crc= (ha_checksum) crc32((uint)crc, pos, (uint) length); +#endif DBUG_PRINT("info", ("crc: %lu", (ulong) crc)); return crc; } diff --git a/mysys/my_crc32.c b/mysys/my_crc32.c deleted file mode 100644 index 0981c75755d..00000000000 --- a/mysys/my_crc32.c +++ /dev/null @@ -1,23 +0,0 @@ -/* Copyright (c) 2003, 2004 MySQL AB - Use is subject to license terms - - 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 this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ - -#include "mysys_priv.h" - -#ifndef HAVE_COMPRESS -#undef DYNAMIC_CRC_TABLE -#include "../zlib/crc32.c" -#endif - |