diff --git a/media/mtransport/objs.mk b/media/mtransport/objs.mk index b7d113d386b9..f1fc85f72cd6 100644 --- a/media/mtransport/objs.mk +++ b/media/mtransport/objs.mk @@ -47,6 +47,13 @@ LOCAL_INCLUDES += \ DEFINES += -DWIN endif +DEFINES += \ + -DR_PLATFORM_INT_TYPES='"mozilla/StandardInteger.h"' \ + -DR_DEFINED_INT2=int16_t -DR_DEFINED_UINT2=uint16_t \ + -DR_DEFINED_INT4=int32_t -DR_DEFINED_UINT4=uint32_t \ + -DR_DEFINED_INT8=int64_t -DR_DEFINED_UINT8=uint64_t \ + $(NULL) + MTRANSPORT_LCPPSRCS = \ dtlsidentity.cpp \ nricectx.cpp \ diff --git a/media/mtransport/third_party/nICEr/nicer.gyp b/media/mtransport/third_party/nICEr/nicer.gyp index 34aa6d87a73d..26ec0c50eda3 100644 --- a/media/mtransport/third_party/nICEr/nicer.gyp +++ b/media/mtransport/third_party/nICEr/nicer.gyp @@ -30,6 +30,9 @@ "./src/net", "./src/stun", "./src/util", + + # Mozilla, hopefully towards the end + '$(DEPTH)/dist/include', ], 'sources' : [ @@ -116,6 +119,13 @@ 'USE_TURN', 'NR_SOCKET_IS_VOID_PTR', 'restrict=', + 'R_PLATFORM_INT_TYPES=\'"mozilla/StandardInteger.h"\'', + 'R_DEFINED_INT2=int16_t', + 'R_DEFINED_UINT2=uint16_t', + 'R_DEFINED_INT4=int32_t', + 'R_DEFINED_UINT4=uint32_t', + 'R_DEFINED_INT8=int64_t', + 'R_DEFINED_UINT8=uint64_t', ], 'conditions' : [ @@ -161,14 +171,6 @@ '_CRT_SECURE_NO_WARNINGS', '__UNUSED__=', 'HAVE_STRDUP', - 'SIZEOF_SHORT=2', - 'SIZEOF_UNSIGNED_SHORT=2', - 'SIZEOF_INT=4', - 'SIZEOF_UNSIGNED_INT=4', - 'SIZEOF_LONG=4', - 'SIZEOF_UNSIGNED_LONG=4', - 'SIZEOF_LONG_LONG=8', - 'SIZEOF_UNSIGNED_LONG_LONG=8', 'NO_REG_RPC' ], diff --git a/media/mtransport/third_party/nrappkit/nrappkit.gyp b/media/mtransport/third_party/nrappkit/nrappkit.gyp index 4a04b737859b..f9a5c19bc519 100644 --- a/media/mtransport/third_party/nrappkit/nrappkit.gyp +++ b/media/mtransport/third_party/nrappkit/nrappkit.gyp @@ -13,9 +13,6 @@ 'include_dirs' : [ # EXTERNAL - - - # INTERNAL 'src/event', 'src/log', @@ -24,7 +21,10 @@ 'src/share', 'src/stats', 'src/util', - 'src/util/libekr' + 'src/util/libekr', + + # Mozilla, hopefully towards the end + '$(DEPTH)/dist/include', ], 'sources' : [ @@ -137,6 +137,13 @@ 'defines' : [ 'SANITY_CHECKS', + 'R_PLATFORM_INT_TYPES=\'"mozilla/StandardInteger.h"\'', + 'R_DEFINED_INT2=int16_t', + 'R_DEFINED_UINT2=uint16_t', + 'R_DEFINED_INT4=int32_t', + 'R_DEFINED_UINT4=uint32_t', + 'R_DEFINED_INT8=int64_t', + 'R_DEFINED_UINT8=uint64_t', ], 'conditions' : [ @@ -177,14 +184,6 @@ 'WIN', '__UNUSED__=""', 'HAVE_STRDUP=1', - 'SIZEOF_SHORT=2', - 'SIZEOF_UNSIGNED_SHORT=2', - 'SIZEOF_INT=4', - 'SIZEOF_UNSIGNED_INT=4', - 'SIZEOF_LONG=4', - 'SIZEOF_UNSIGNED_LONG=4', - 'SIZEOF_LONG_LONG=8', - 'SIZEOF_UNSIGNED_LONG_LONG=8', 'NO_REG_RPC' ], diff --git a/media/mtransport/third_party/nrappkit/src/util/libekr/r_types.h b/media/mtransport/third_party/nrappkit/src/util/libekr/r_types.h index 3d3f2690b060..b05bf0d3da88 100644 --- a/media/mtransport/third_party/nrappkit/src/util/libekr/r_types.h +++ b/media/mtransport/third_party/nrappkit/src/util/libekr/r_types.h @@ -84,6 +84,14 @@ #ifndef _r_types_h #define _r_types_h +/* Either define R_PLATFORM_INT_TYPES or be on a platform that + has stdint.h */ +#ifdef R_PLATFORM_INT_TYPES +#include R_PLATFORM_INT_TYPES +#else +#include +#endif + #ifndef R_DEFINED_INT2 #ifndef SIZEOF_INT typedef short INT2; @@ -98,6 +106,8 @@ typedef long INT2; # error no type for INT2 # endif #endif +#else +typedef R_DEFINED_INT2 INT2; #endif #ifndef R_DEFINED_UINT2 @@ -114,6 +124,8 @@ typedef unsigned long UINT2; # error no type for UINT2 # endif #endif +#else +typedef R_DEFINED_UINT2 UINT2; #endif #ifndef R_DEFINED_INT4 @@ -130,6 +142,8 @@ typedef long INT4; # error no type for INT4 # endif #endif +#else +typedef R_DEFINED_INT4 INT4; #endif #ifndef R_DEFINED_UINT4 @@ -146,6 +160,8 @@ typedef unsigned long UINT4; # error no type for UINT4 # endif #endif +#else +typedef R_DEFINED_UINT4 UINT4; #endif #ifndef R_DEFINED_INT8 @@ -164,6 +180,8 @@ typedef long long INT8; # error no type for INT8 # endif #endif +#else +typedef R_DEFINED_INT8 INT8; #endif #ifndef R_DEFINED_UINT8 @@ -182,11 +200,14 @@ typedef unsigned long long UINT8; # error no type for UINT8 # endif #endif +#else +typedef R_DEFINED_UINT8 UINT8; #endif #ifndef R_DEFINED_UCHAR typedef unsigned char UCHAR; -#endif - +#else +typedef R_DEFINED_UCHAR UCHAR; +#endif #endif