Ticket #5776: libs_libmythdb-krazy2-typedefs.patch

File libs_libmythdb-krazy2-typedefs.patch, 2.1 KB (added by Erik Hovland <erik@…>, 18 years ago)

Use Qt types where possible

  • mythtv/libs/libmythdb/compat.h

    Use Qt types from QtGlobal
    
    From: Erik Hovland <erik@hovland.org>
    
    
    ---
    
     mythtv/libs/libmythdb/compat.h              |    2 +-
     mythtv/libs/libmythdb/msocketdevice_win.cpp |   11 ++++++-----
     2 files changed, 7 insertions(+), 6 deletions(-)
    
    diff --git a/mythtv/libs/libmythdb/compat.h b/mythtv/libs/libmythdb/compat.h
    index cef5463..3fb8f30 100644
    a b inline const char *dlerror(void)  
    269269
    270270#include "mythconfig.h"
    271271#if defined(CONFIG_DARWIN) && ! defined (_SUSECONDS_T)
    272     typedef int32_t suseconds_t;   // 10.3 or earlier don't have this
     272    typedef qint32 suseconds_t;   // 10.3 or earlier don't have this
    273273#endif
    274274
    275275// Libdvdnav now uses off64_t lseek64(), which Darwin doesn't have.
  • mythtv/libs/libmythdb/msocketdevice_win.cpp

    diff --git a/mythtv/libs/libmythdb/msocketdevice_win.cpp b/mythtv/libs/libmythdb/msocketdevice_win.cpp
    index 1c53854..7a984d9 100644
    a b  
    4646#include "qdatetime.h"
    4747
    4848#include <qcoreapplication.h>
     49#include <QtGlobal>
    4950
    5051#include <string.h>
    5152
    struct qt_sockaddr_storage {  
    8081// Only the new version is the correct one, so always
    8182// use this structure.
    8283struct qt_in6_addr {
    83     u_char qt_s6_addr[16];
     84    uchar qt_s6_addr[16];
    8485};
    8586typedef struct {
    8687    short   sin6_family;            /* AF_INET6 */
    87     u_short sin6_port;              /* Transport level port number */
    88     u_long  sin6_flowinfo;          /* IPv6 flow information */
     88    ushort sin6_port;              /* Transport level port number */
     89    ulong  sin6_flowinfo;          /* IPv6 flow information */
    8990    struct  qt_in6_addr sin6_addr;  /* IPv6 address */
    90     u_long  sin6_scope_id;          /* set of interfaces for a scope */
     91    ulong  sin6_scope_id;          /* set of interfaces for a scope */
    9192} qt_sockaddr_in6;
    9293#endif
    9394
    qint64 MSocketDevice::bytesAvailable() const  
    639640{
    640641    if ( !isValid() )
    641642        return -1;
    642     u_long nbytes = 0;
     643    ulong nbytes = 0;
    643644    if ( ::ioctlsocket(fd, FIONREAD, &nbytes) < 0 )
    644645        return -1;
    645646