diff --git a/libs/esl/src/include/esl.h b/libs/esl/src/include/esl.h index 4296175f3a..5e66fe437a 100644 --- a/libs/esl/src/include/esl.h +++ b/libs/esl/src/include/esl.h @@ -221,6 +221,7 @@ typedef enum { #include #include typedef SOCKET esl_socket_t; +#if !defined(_STDINT) && !defined(uint32_t) typedef unsigned __int64 uint64_t; typedef unsigned __int32 uint32_t; typedef unsigned __int16 uint16_t; @@ -229,6 +230,7 @@ typedef __int64 int64_t; typedef __int32 int32_t; typedef __int16 int16_t; typedef __int8 int8_t; +#endif typedef intptr_t esl_ssize_t; typedef int esl_filehandle_t; #define ESL_SOCK_INVALID INVALID_SOCKET diff --git a/libs/libdingaling/src/ldl_compat.h b/libs/libdingaling/src/ldl_compat.h index 2507cd5957..280bf20dc8 100644 --- a/libs/libdingaling/src/ldl_compat.h +++ b/libs/libdingaling/src/ldl_compat.h @@ -42,7 +42,7 @@ extern "C" { #ifdef _MSC_VER -#ifndef uint32_t +#if !defined(_STDINT) && !defined(uint32_t) typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; diff --git a/libs/libteletone/src/libteletone_generate.h b/libs/libteletone/src/libteletone_generate.h index a49e45a658..25d5bf79d7 100644 --- a/libs/libteletone/src/libteletone_generate.h +++ b/libs/libteletone/src/libteletone_generate.h @@ -91,6 +91,7 @@ extern "C" { #define __inline__ __inline #endif +#if !defined(_STDINT) && !defined(uint32_t) typedef unsigned __int64 uint64_t; typedef unsigned __int32 uint32_t; typedef unsigned __int16 uint16_t; @@ -99,6 +100,7 @@ typedef __int64 int64_t; typedef __int32 int32_t; typedef __int16 int16_t; typedef __int8 int8_t; +#endif #else #include #endif diff --git a/libs/stfu/stfu.h b/libs/stfu/stfu.h index 2b21419118..045b644009 100644 --- a/libs/stfu/stfu.h +++ b/libs/stfu/stfu.h @@ -49,7 +49,7 @@ extern "C" { #endif #ifdef _MSC_VER -#ifndef uint32_t +#if !defined(_STDINT) && !defined(uint32_t) typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; diff --git a/libs/unimrcp/libs/mpf/codecs/g711/g711.h b/libs/unimrcp/libs/mpf/codecs/g711/g711.h index a8a0e92150..ae7e0e44aa 100644 --- a/libs/unimrcp/libs/mpf/codecs/g711/g711.h +++ b/libs/unimrcp/libs/mpf/codecs/g711/g711.h @@ -49,11 +49,13 @@ extern "C" { #ifndef __inline__ #define __inline__ __inline #endif +#if !defined(_STDINT) && !defined(uint32_t) typedef unsigned __int8 uint8_t; typedef __int16 int16_t; typedef __int32 int32_t; typedef unsigned __int16 uint16_t; #endif +#endif #if defined(__i386__) /*! \brief Find the bit position of the highest set bit in a word diff --git a/src/include/g711.h b/src/include/g711.h index 53f3afc87e..aac82a15ac 100644 --- a/src/include/g711.h +++ b/src/include/g711.h @@ -50,11 +50,13 @@ extern "C" { #ifndef __inline__ #define __inline__ __inline #endif +#if !defined(_STDINT) && !defined(uint32_t) typedef unsigned __int8 uint8_t; typedef __int16 int16_t; typedef __int32 int32_t; typedef unsigned __int16 uint16_t; #endif +#endif #if defined(__i386__) /*! \brief Find the bit position of the highest set bit in a word diff --git a/src/include/switch_platform.h b/src/include/switch_platform.h index a011850748..1140aac8ba 100644 --- a/src/include/switch_platform.h +++ b/src/include/switch_platform.h @@ -88,7 +88,7 @@ SWITCH_BEGIN_EXTERN_C #endif #undef inline #define inline __inline -#ifndef uint32_t +#if !defined(_STDINT) && !defined(uint32_t) typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; diff --git a/src/mod/endpoints/mod_opal/mod_opal.h b/src/mod/endpoints/mod_opal/mod_opal.h index da2ea1fa5b..56ac9b3671 100644 --- a/src/mod/endpoints/mod_opal/mod_opal.h +++ b/src/mod/endpoints/mod_opal/mod_opal.h @@ -49,31 +49,7 @@ #undef strcasecmp #undef strncasecmp - -#ifdef _MSC_VER -/*The following insanity is because libteletone_generate.h defines int8_t in - a slightly different manner to most other cases (SDL, PCAP, Java V8, - VS2010's own stdint.h, etc) and does not provide a mechanism to prevent it's - inclusion. Then, to cap it off, MSVC barfs on the difference. - - Sigh. - */ -#pragma include_alias(, <../../libs/libteletone/src/libteletone.h>) -#pragma include_alias(, <../../libs/libteletone/src/libteletone_generate.h>) -#pragma include_alias(, <../../libs/libteletone/src/libteletone_detect.h>) -#define int8_t signed int8_t -#include -#undef int8_t -#endif // End of insanity - - -#define HAVE_APR -#define uint32_t uint32_t // Avoid conflict in stdint definitions #include -#undef uint32_t - -#include - #define MODNAME "mod_opal"