Changeset: 7308b170e72a for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7308b170e72a Modified Files: clients/examples/C/CMakeLists.txt common/stream/bs2.c common/stream/stream_internal.h common/utils/mcrypt.c monetdb5/modules/mal/mal_mapi.c Branch: Oct2020 Log Message:
Use correct ifdef for snappy. diffs (78 lines): diff --git a/clients/examples/C/CMakeLists.txt b/clients/examples/C/CMakeLists.txt --- a/clients/examples/C/CMakeLists.txt +++ b/clients/examples/C/CMakeLists.txt @@ -40,7 +40,7 @@ if(TESTING) add_executable(streamcat streamcat.c) - target_link_libraries(streamcat + target_link_libraries(streamcat PRIVATE monetdb_config_header stream) diff --git a/common/stream/bs2.c b/common/stream/bs2.c --- a/common/stream/bs2.c +++ b/common/stream/bs2.c @@ -30,7 +30,7 @@ compress_stream_data(bs2 *s) { assert(s->comp != COMPRESSION_NONE); if (s->comp == COMPRESSION_SNAPPY) { -#ifdef HAVE_LIBSNAPPY +#ifdef HAVE_SNAPPY size_t compressed_length = s->compbufsiz; snappy_status ret; if ((ret = snappy_compress(s->buf, s->nr, s->compbuf, &compressed_length)) != SNAPPY_OK) { @@ -63,7 +63,7 @@ decompress_stream_data(bs2 *s) { assert(s->comp != COMPRESSION_NONE); if (s->comp == COMPRESSION_SNAPPY) { -#ifdef HAVE_LIBSNAPPY +#ifdef HAVE_SNAPPY snappy_status ret; size_t uncompressed_length = s->bufsiz; if ((ret = snappy_uncompress(s->compbuf, s->itotal, s->buf, &uncompressed_length)) != SNAPPY_OK) { @@ -96,7 +96,7 @@ compression_size_bound(bs2 *s) if (s->comp == COMPRESSION_NONE) { return 0; } else if (s->comp == COMPRESSION_SNAPPY) { -#ifndef HAVE_LIBSNAPPY +#ifndef HAVE_SNAPPY return -1; #else return snappy_max_compressed_length(s->bufsiz); diff --git a/common/stream/stream_internal.h b/common/stream/stream_internal.h --- a/common/stream/stream_internal.h +++ b/common/stream/stream_internal.h @@ -54,7 +54,7 @@ #ifdef HAVE_LIBLZMA #include <lzma.h> #endif -#ifdef HAVE_LIBSNAPPY +#ifdef HAVE_SNAPPY #include <snappy-c.h> #endif #ifdef HAVE_LIBLZ4 diff --git a/common/utils/mcrypt.c b/common/utils/mcrypt.c --- a/common/utils/mcrypt.c +++ b/common/utils/mcrypt.c @@ -64,7 +64,7 @@ mcrypt_getHashAlgorithms(void) #ifdef HAVE_SHA1_UPDATE ",SHA1" #endif -#ifdef HAVE_LIBSNAPPY +#ifdef HAVE_SNAPPY ",COMPRESSION_SNAPPY" #endif #ifdef HAVE_LIBLZ4 diff --git a/monetdb5/modules/mal/mal_mapi.c b/monetdb5/modules/mal/mal_mapi.c --- a/monetdb5/modules/mal/mal_mapi.c +++ b/monetdb5/modules/mal/mal_mapi.c @@ -207,7 +207,7 @@ doChallenge(void *data) comp = COMPRESSION_NONE; if (strstr(buf, "COMPRESSION_SNAPPY")) { -#ifdef HAVE_LIBSNAPPY +#ifdef HAVE_SNAPPY comp = COMPRESSION_SNAPPY; #else errmsg = "!server does not support Snappy compression.\n"; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list