aboutsummaryrefslogtreecommitdiff
path: root/src/lib/third_party
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2022-03-16 11:03:57 +0100
committerlns <matzeton@googlemail.com>2022-04-14 19:17:48 +0200
commitc3df3a12aa88739e303340ccd7436d467b4662d2 (patch)
tree13355914f93b668afb47f2b5b643dffc073fb8e7 /src/lib/third_party
parent4775be3d85434d4e385f43a47b783844bbfb2571 (diff)
Fixed msys2 build warnings and re-activated CI Mingw64 build.fix/windows-msys2
* Removed Visual Studio leftovers. Maintaining an autotools project with VS integration requires some additional overhead. Signed-off-by: Toni Uhlig <matzeton@googlemail.com> Signed-off-by: lns <matzeton@googlemail.com>
Diffstat (limited to 'src/lib/third_party')
5 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/third_party/include/uthash.h b/src/lib/third_party/include/uthash.h
index f78a73b86..c9b7812f3 100644
--- a/src/lib/third_party/include/uthash.h
+++ b/src/lib/third_party/include/uthash.h
@@ -63,7 +63,7 @@ do {
#endif
/* a number of the hash function use uint32_t which isn't defined on Pre VS2010 */
-#if defined(_WIN32)
+#if defined(WIN32)
#if defined(_MSC_VER) && _MSC_VER >= 1600
#include <stdint.h>
#elif defined(__WATCOMC__) || defined(__MINGW32__) || defined(__CYGWIN__)
diff --git a/src/lib/third_party/src/ahocorasick.c b/src/lib/third_party/src/ahocorasick.c
index aefd7ae03..1508a0f6c 100644
--- a/src/lib/third_party/src/ahocorasick.c
+++ b/src/lib/third_party/src/ahocorasick.c
@@ -629,11 +629,11 @@ static AC_ERROR_t dump_node_common(AC_AUTOMATA_t * thiz,
char lbuf[512];
int nl = 0,j;
- nl = snprintf(lbuf,sizeof(lbuf),"'%.100s' N:%d{",rstr,n->matched_patterns->num);
+ nl = ndpi_snprintf(lbuf,sizeof(lbuf),"'%.100s' N:%d{",rstr,n->matched_patterns->num);
for (j=0; j<n->matched_patterns->num; j++) {
AC_PATTERN_t *sid = &n->matched_patterns->patterns[j];
- if(j) nl += snprintf(&lbuf[nl],sizeof(lbuf)-nl-1,", ");
- nl += snprintf(&lbuf[nl],sizeof(lbuf)-nl-1,"%d %c%.100s%c",
+ if(j) nl += ndpi_snprintf(&lbuf[nl],sizeof(lbuf)-nl-1,", ");
+ nl += ndpi_snprintf(&lbuf[nl],sizeof(lbuf)-nl-1,"%d %c%.100s%c",
sid->rep.number & 0x3fff,
sid->rep.number & 0x8000 ? '^':' ',
sid->astring,
diff --git a/src/lib/third_party/src/gcrypt/gcm.c b/src/lib/third_party/src/gcrypt/gcm.c
index 9b3ed1848..e793465f5 100644
--- a/src/lib/third_party/src/gcrypt/gcm.c
+++ b/src/lib/third_party/src/gcrypt/gcm.c
@@ -34,7 +34,7 @@
#define GCM_VALIDATE( cond ) \
MBEDTLS_INTERNAL_VALIDATE( cond )
-#ifdef _WIN32
+#ifdef WIN32
#define LBLOCKSIZE 4
#else
#define LBLOCKSIZE __SIZEOF_LONG__
@@ -295,7 +295,7 @@ int mbedtls_gcm_starts( mbedtls_gcm_context *ctx,
if( iv_len == 0)
return( MBEDTLS_ERR_GCM_BAD_INPUT );
#if __SIZE_WIDTH__ == 64
- if( iv_len >= (1UL << 32 ))
+ if( iv_len >= (1ULL << 32 ))
return( MBEDTLS_ERR_GCM_BAD_INPUT );
#endif
diff --git a/src/lib/third_party/src/gcrypt_light.c b/src/lib/third_party/src/gcrypt_light.c
index c048e8704..8ad142576 100644
--- a/src/lib/third_party/src/gcrypt_light.c
+++ b/src/lib/third_party/src/gcrypt_light.c
@@ -1,6 +1,6 @@
#include <stdint.h>
-#ifndef _WIN32
+#ifndef WIN32
#include <unistd.h>
#endif
#include <string.h>
diff --git a/src/lib/third_party/src/roaring.cc b/src/lib/third_party/src/roaring.cc
index e3fd63096..2fccfb129 100644
--- a/src/lib/third_party/src/roaring.cc
+++ b/src/lib/third_party/src/roaring.cc
@@ -300,7 +300,7 @@ static inline uint32_t croaring_detect_supported_architectures() {
extern "C" { // portability definitions are in global scope, not a namespace
#endif
-#if defined(_MSC_VER) && !defined(__clang__) && !defined(_WIN64) && !defined(ROARING_ACK_32BIT)
+#if defined(_MSC_VER) && !defined(__clang__) && !defined(WIN64) && !defined(ROARING_ACK_32BIT)
#pragma message( \
"You appear to be attempting a 32-bit build under Visual Studio. We recommend a 64-bit build instead.")
#endif
@@ -373,7 +373,7 @@ extern "C" { // portability definitions are in global scope, not a namespace
/* result might be undefined when input_num is zero */
static inline int __builtin_ctzll(unsigned long long input_num) {
unsigned long index;
-#ifdef _WIN64 // highly recommended!!!
+#ifdef WIN64 // highly recommended!!!
_BitScanForward64(&index, input_num);
#else // if we must support 32-bit Windows
if ((uint32_t)input_num != 0) {
@@ -389,7 +389,7 @@ static inline int __builtin_ctzll(unsigned long long input_num) {
/* result might be undefined when input_num is zero */
static inline int __builtin_clzll(unsigned long long input_num) {
unsigned long index;
-#ifdef _WIN64 // highly recommended!!!
+#ifdef WIN64 // highly recommended!!!
_BitScanReverse64(&index, input_num);
#else // if we must support 32-bit Windows
if (input_num > 0xFFFFFFFF) {
@@ -479,14 +479,14 @@ static inline int hammingbackup(uint64_t x) {
}
static inline int hamming(uint64_t x) {
-#if defined(_WIN64) && defined(_MSC_VER) && !defined(__clang__)
+#if defined(WIN64) && defined(_MSC_VER) && !defined(__clang__)
#ifdef _M_ARM64
return hammingbackup(x);
// (int) _CountOneBits64(x); is unavailable
#else // _M_ARM64
return (int) __popcnt64(x);
#endif // _M_ARM64
-#elif defined(_WIN32) && defined(_MSC_VER) && !defined(__clang__)
+#elif defined(WIN32) && defined(_MSC_VER) && !defined(__clang__)
#ifdef _M_ARM
return hammingbackup(x);
// _CountOneBits is unavailable