Commit 3983aa8a authored by Felipe Sateler's avatar Felipe Sateler

Use gbp-pq for patches

parent 1c355c8a
Description: Fix FTBFS on various arches caused by buggy oscpack build
OscTypes.h: fix integer size detection on 64-bit arches
OscReceivedElements.cpp:
- Fix "error: 'argument_' was not declared in this scope" on big-endian
arches.
- Rename RoundUp4 to avoid multiple redefinitions on platforms where
uint32 == size_t. This bug originally happened on 64-bit arches due to the
mishandling of types in OscTypes.h.
OscOutboundPacketStream.h, OscReceivedElements.h:
- Remove extra int overloads which don't built on 32-bit arches.
The other overloads should be enough.
Author: James Cowgill <jcowgill@debian.org>
From: James Cowgill <jcowgill@debian.org>
Date: Tue, 24 May 2016 17:16:37 +0100
Subject: Fix FTBFS on various arches caused by buggy oscpack build
OscTypes.h: fix integer size detection on 64-bit arches
OscReceivedElements.cpp:
- Fix "error: 'argument_' was not declared in this scope" on big-endian
arches.
- Rename RoundUp4 to avoid multiple redefinitions on platforms where
uint32 == size_t. This bug originally happened on 64-bit arches due to the
mishandling of types in OscTypes.h.
OscOutboundPacketStream.h, OscReceivedElements.h:
- Remove extra int overloads which don't built on 32-bit arches.
The other overloads should be enough.
Bug-Debian: https://bugs.debian.org/824581
Forwarded: yes
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/external_libraries/oscpack_1_1_0/osc/OscTypes.h
+++ b/external_libraries/oscpack_1_1_0/osc/OscTypes.h
@@ -37,42 +37,17 @@
#ifndef INCLUDED_OSCPACK_OSCTYPES_H
#define INCLUDED_OSCPACK_OSCTYPES_H
+#include <stdint.h>
namespace osc{
// basic types
.../oscpack_1_1_0/osc/OscOutboundPacketStream.h | 5 ----
.../oscpack_1_1_0/osc/OscReceivedElements.cpp | 12 ++++----
.../oscpack_1_1_0/osc/OscReceivedElements.h | 6 ----
external_libraries/oscpack_1_1_0/osc/OscTypes.h | 35 ++++------------------
4 files changed, 11 insertions(+), 47 deletions(-)
diff --git a/external_libraries/oscpack_1_1_0/osc/OscOutboundPacketStream.h b/external_libraries/oscpack_1_1_0/osc/OscOutboundPacketStream.h
index 26f3e58..333b3d9 100644
--- a/external_libraries/oscpack_1_1_0/osc/OscOutboundPacketStream.h
+++ b/external_libraries/oscpack_1_1_0/osc/OscOutboundPacketStream.h
@@ -105,11 +105,6 @@ public:
OutboundPacketStream& operator<<( const InfinitumType& rhs );
OutboundPacketStream& operator<<( int32 rhs );
-#if defined(__BORLANDC__) || defined(_MSC_VER)
-
-typedef __int64 int64;
-typedef unsigned __int64 uint64;
-
-#elif defined(__x86_64__) || defined(_M_X64)
-
-typedef long int64;
-typedef unsigned long uint64;
-
-#else
-
-typedef long long int64;
-typedef unsigned long long uint64;
-
-#if !(defined(__x86_64__) || defined(_M_X64))
- OutboundPacketStream& operator<<( int rhs )
- { *this << (int32)rhs; return *this; }
-#endif
-
-
-
-#if defined(__x86_64__) || defined(_M_X64)
-
-typedef signed int int32;
-typedef unsigned int uint32;
-
-#else
-
-typedef signed long int32;
-typedef unsigned long uint32;
-
-#endif
+typedef int64_t int64;
+typedef uint64_t uint64;
+typedef int32_t int32;
+typedef uint32_t uint32;
enum ValueTypeSizes{
OSC_SIZEOF_INT32 = 4,
OutboundPacketStream& operator<<( float rhs );
OutboundPacketStream& operator<<( char rhs );
OutboundPacketStream& operator<<( const RgbaColor& rhs );
diff --git a/external_libraries/oscpack_1_1_0/osc/OscReceivedElements.cpp b/external_libraries/oscpack_1_1_0/osc/OscReceivedElements.cpp
index 3b38bfc..52fd8eb 100644
--- a/external_libraries/oscpack_1_1_0/osc/OscReceivedElements.cpp
+++ b/external_libraries/oscpack_1_1_0/osc/OscReceivedElements.cpp
@@ -84,7 +84,7 @@ static inline const char* FindStr4End( c
@@ -84,7 +84,7 @@ static inline const char* FindStr4End( const char *p, const char *end )
// round up to the next highest multiple of 4. unless x is already a multiple of 4
......@@ -75,7 +51,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
{
return (x + 3) & ~((uint32)0x03);
}
@@ -249,7 +249,7 @@ int32 ReceivedMessageArgument::AsInt32Un
@@ -249,7 +249,7 @@ int32 ReceivedMessageArgument::AsInt32Unchecked() const
return u.i;
#else
......@@ -84,7 +60,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
#endif
}
@@ -280,7 +280,7 @@ float ReceivedMessageArgument::AsFloatUn
@@ -280,7 +280,7 @@ float ReceivedMessageArgument::AsFloatUnchecked() const
return u.f;
#else
......@@ -93,7 +69,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
#endif
}
@@ -400,7 +400,7 @@ double ReceivedMessageArgument::AsDouble
@@ -400,7 +400,7 @@ double ReceivedMessageArgument::AsDoubleUnchecked() const
return u.d;
#else
......@@ -102,7 +78,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
#endif
}
@@ -533,7 +533,7 @@ void ReceivedMessageArgumentIterator::Ad
@@ -533,7 +533,7 @@ void ReceivedMessageArgumentIterator::Advance()
{
// treat blob size as an unsigned int for the purposes of this calculation
uint32 blobSize = ToUInt32( value_.argumentPtr_ );
......@@ -111,7 +87,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
}
break;
@@ -694,7 +694,7 @@ void ReceivedMessage::Init( const char *
@@ -694,7 +694,7 @@ void ReceivedMessage::Init( const char *message, osc_bundle_element_size_t size
// treat blob size as an unsigned int for the purposes of this calculation
uint32 blobSize = ToUInt32( argument );
......@@ -120,20 +96,8 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
if( argument > end )
MalformedMessageException( "arguments exceed message size" );
}
--- a/external_libraries/oscpack_1_1_0/osc/OscOutboundPacketStream.h
+++ b/external_libraries/oscpack_1_1_0/osc/OscOutboundPacketStream.h
@@ -105,11 +105,6 @@ public:
OutboundPacketStream& operator<<( const InfinitumType& rhs );
OutboundPacketStream& operator<<( int32 rhs );
-#if !(defined(__x86_64__) || defined(_M_X64))
- OutboundPacketStream& operator<<( int rhs )
- { *this << (int32)rhs; return *this; }
-#endif
-
OutboundPacketStream& operator<<( float rhs );
OutboundPacketStream& operator<<( char rhs );
OutboundPacketStream& operator<<( const RgbaColor& rhs );
diff --git a/external_libraries/oscpack_1_1_0/osc/OscReceivedElements.h b/external_libraries/oscpack_1_1_0/osc/OscReceivedElements.h
index 729938e..82daa5c 100644
--- a/external_libraries/oscpack_1_1_0/osc/OscReceivedElements.h
+++ b/external_libraries/oscpack_1_1_0/osc/OscReceivedElements.h
@@ -100,12 +100,6 @@ public:
......@@ -149,3 +113,55 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
bool IsMessage() const { return !IsBundle(); }
bool IsBundle() const;
diff --git a/external_libraries/oscpack_1_1_0/osc/OscTypes.h b/external_libraries/oscpack_1_1_0/osc/OscTypes.h
index 005524f..49bb603 100644
--- a/external_libraries/oscpack_1_1_0/osc/OscTypes.h
+++ b/external_libraries/oscpack_1_1_0/osc/OscTypes.h
@@ -37,42 +37,17 @@
#ifndef INCLUDED_OSCPACK_OSCTYPES_H
#define INCLUDED_OSCPACK_OSCTYPES_H
+#include <stdint.h>
namespace osc{
// basic types
-#if defined(__BORLANDC__) || defined(_MSC_VER)
-
-typedef __int64 int64;
-typedef unsigned __int64 uint64;
-
-#elif defined(__x86_64__) || defined(_M_X64)
-
-typedef long int64;
-typedef unsigned long uint64;
-
-#else
-
-typedef long long int64;
-typedef unsigned long long uint64;
-
-#endif
-
-
-
-#if defined(__x86_64__) || defined(_M_X64)
-
-typedef signed int int32;
-typedef unsigned int uint32;
-
-#else
-
-typedef signed long int32;
-typedef unsigned long uint32;
-
-#endif
+typedef int64_t int64;
+typedef uint64_t uint64;
+typedef int32_t int32;
+typedef uint32_t uint32;
enum ValueTypeSizes{
OSC_SIZEOF_INT32 = 4,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment