Ticket #5779: libs_libmythdb-krazy2-include-directives.patch

File libs_libmythdb-krazy2-include-directives.patch, 14.2 KB (added by Erik Hovland <erik@…>, 16 years ago)

Addresses include directive defects

  • mythtv/libs/libmythdb/compat.h

    Attempts to address some header strangeness.
    
    From: Erik Hovland <erik@hovland.org>
    
    
    ---
    
     mythtv/libs/libmythdb/compat.h           |    6 +++---
     mythtv/libs/libmythdb/exitcodes.h        |    6 +++---
     mythtv/libs/libmythdb/httpcomms.cpp      |    2 +-
     mythtv/libs/libmythdb/httpcomms.h        |    4 ++--
     mythtv/libs/libmythdb/lcddevice.cpp      |   16 ++++++++--------
     mythtv/libs/libmythdb/lcddevice.h        |    4 ++--
     mythtv/libs/libmythdb/mythdb.cpp         |    6 ++++--
     mythtv/libs/libmythdb/mythdb.h           |    4 ++--
     mythtv/libs/libmythdb/mythdbcon.cpp      |   16 ++++++++++------
     mythtv/libs/libmythdb/mythdbcon.h        |    4 ++--
     mythtv/libs/libmythdb/mythdbparams.h     |    4 ++--
     mythtv/libs/libmythdb/mythdirs.cpp       |   10 +++++++---
     mythtv/libs/libmythdb/mythdirs.h         |    4 ++--
     mythtv/libs/libmythdb/mythevent.h        |    4 ++--
     mythtv/libs/libmythdb/mythexp.h          |    6 +++---
     mythtv/libs/libmythdb/mythobservable.cpp |    5 ++++-
     mythtv/libs/libmythdb/mythobservable.h   |    4 ++--
     mythtv/libs/libmythdb/mythsocket.cpp     |   14 +++++++++-----
     mythtv/libs/libmythdb/mythtimer.h        |    4 ++--
     mythtv/libs/libmythdb/mythverbose.cpp    |    5 ++++-
     mythtv/libs/libmythdb/mythverbose.h      |   14 +++++++-------
     mythtv/libs/libmythdb/mythversion.h      |    4 ++--
     mythtv/libs/libmythdb/oldsettings.cpp    |    1 -
     mythtv/libs/libmythdb/qcodecs.cpp        |   11 +++++++----
     mythtv/libs/libmythdb/qcodecs.h          |   10 +++++-----
     25 files changed, 95 insertions(+), 73 deletions(-)
    
    diff --git a/mythtv/libs/libmythdb/compat.h b/mythtv/libs/libmythdb/compat.h
    index afd7bde..732b033 100644
    a b  
    22// Simple header which encapsulates platform incompatibilities, so we
    33// do not need to litter the codebase with ifdefs.
    44
    5 #ifndef __COMPAT_H__
    6 #define __COMPAT_H__
     5#ifndef MYTHTV_COMPAT_H
     6#define MYTHTV_COMPAT_H
    77
    88// Turn off the visual studio warnings (identifier was truncated)
    99#ifdef _MSC_VER
    inline const char *dlerror(void) 
    284284#endif
    285285
    286286
    287 #endif // __COMPAT_H__
     287#endif // MYTHTV_COMPAT_H
  • mythtv/libs/libmythdb/exitcodes.h

    diff --git a/mythtv/libs/libmythdb/exitcodes.h b/mythtv/libs/libmythdb/exitcodes.h
    index 36fd5f6..5790831 100644
    a b  
    1 #ifndef __MYTH_EXIT_CODES__
    2 #define __MYTH_EXIT_CODES__
     1#ifndef MYTHTV_EXIT_CODES
     2#define MYTHTV_EXIT_CODES
    33
    44#define GENERIC_EXIT_OK                             0
    55#define GENERIC_EXIT_NOT_OK                       255
     
    128128#define COMMFLAG_EXIT_START                       GENERIC_EXIT_START-6
    129129#define COMMFLAG_EXIT_NO_RINGBUFFER               GENERIC_EXIT_START-7
    130130
    131 #endif // __MYTH_EXIT_CODES__
     131#endif // MYTH_EXIT_CODES
  • mythtv/libs/libmythdb/httpcomms.cpp

    diff --git a/mythtv/libs/libmythdb/httpcomms.cpp b/mythtv/libs/libmythdb/httpcomms.cpp
    index c4ce8c8..b17c487 100644
    a b  
     1#include "httpcomms.h"
    12#include <iostream>
    23
    34#include <qfile.h>
     
    1112using namespace std;
    1213
    1314#include "qcodecs.h"
    14 #include "httpcomms.h"
    1515
    1616HttpComms::HttpComms()
    1717         : http(0)
  • mythtv/libs/libmythdb/httpcomms.h

    diff --git a/mythtv/libs/libmythdb/httpcomms.h b/mythtv/libs/libmythdb/httpcomms.h
    index eaebcec..4bc883c 100644
    a b  
    1 #ifndef HTTPCOMMS_H_
    2 #define HTTPCOMMS_H_
     1#ifndef HTTPCOMMS_H
     2#define HTTPCOMMS_H
    33
    44#include <qurl.h>
    55#include <qobject.h>
  • mythtv/libs/libmythdb/lcddevice.cpp

    diff --git a/mythtv/libs/libmythdb/lcddevice.cpp b/mythtv/libs/libmythdb/lcddevice.cpp
    index 721b0f8..ee65d3b 100644
    a b  
    77    (c) 2002, 2003 Thor Sigvaldason, Dan Morphis and Isaac Richards
    88*/
    99
     10// MythTV headers
     11#include "lcddevice.h"
     12#include "mythverbose.h"
     13#include "compat.h"
     14#include "mythdb.h"
     15#include "mythdirs.h"
     16#include "mythevent.h"
     17
    1018// ANSI C headers
    1119#include <cstdlib>
    1220#include <cmath>
     
    2129#include <QTextCodec>
    2230#include <QByteArray>
    2331
    24 // MythTV headers
    25 #include "lcddevice.h"
    26 #include "mythverbose.h"
    27 #include "compat.h"
    28 #include "mythdb.h"
    29 #include "mythdirs.h"
    30 #include "mythevent.h"
    31 
    3232static QString LOC = "lcddevice: ";
    3333
    3434LCD::LCD()
  • mythtv/libs/libmythdb/lcddevice.h

    diff --git a/mythtv/libs/libmythdb/lcddevice.h b/mythtv/libs/libmythdb/lcddevice.h
    index 39bf2a4..9d62b07 100644
    a b  
    1 #ifndef LCDDEVICE_H_
    2 #define LCDDEVICE_H_
     1#ifndef LCDDEVICE_H
     2#define LCDDEVICE_H
    33
    44#include <iostream>
    55using namespace std;
  • mythtv/libs/libmythdb/mythdb.cpp

    diff --git a/mythtv/libs/libmythdb/mythdb.cpp b/mythtv/libs/libmythdb/mythdb.cpp
    index 6b6bbfd..21d0cb2 100644
    a b  
    1 #include <QMutex>
    2 
     1// MythTV
    32#include "mythdb.h"
    43#include "mythdbcon.h"
    54#include "mythverbose.h"
    65#include "oldsettings.h"
    76
     7// Qt
     8#include <QMutex>
     9
    810static MythDB *mythdb = 0;
    911static QMutex dbLock;
    1012
  • mythtv/libs/libmythdb/mythdb.h

    diff --git a/mythtv/libs/libmythdb/mythdb.h b/mythtv/libs/libmythdb/mythdb.h
    index 7153570..4154d2e 100644
    a b  
    1 #ifndef MYTHDB_H_
    2 #define MYTHDB_H_
     1#ifndef MYTHDB_H
     2#define MYTHDB_H
    33
    44#include <QString>
    55#include "mythexp.h"
  • mythtv/libs/libmythdb/mythdbcon.cpp

    diff --git a/mythtv/libs/libmythdb/mythdbcon.cpp b/mythtv/libs/libmythdb/mythdbcon.cpp
    index 801536d..d053367 100644
    a b  
    1 #include "unistd.h"
    2 #include "stdlib.h"
     1// MythTV
     2#include "mythdbcon.h"
     3#include "compat.h"
     4#include "mythdb.h"
     5#include "mythverbose.h"
     6
     7// C/C++ standard library
     8#include <unistd.h>
     9#include <cstdlib>
    310
     11// Qt
    412#include <QVector>
    513#include <QSqlDriver>
    614
    7 #include "compat.h"
    8 #include "mythdbcon.h"
    9 #include "mythdb.h"
    10 #include "mythverbose.h"
    1115
    1216QMutex MSqlQuery::prepareLock;
    1317
  • mythtv/libs/libmythdb/mythdbcon.h

    diff --git a/mythtv/libs/libmythdb/mythdbcon.h b/mythtv/libs/libmythdb/mythdbcon.h
    index 1dab8f0..0dd6b69 100644
    a b  
    1 #ifndef MYTHDBCON_H_
    2 #define MYTHDBCON_H_
     1#ifndef MYTHDBCON_H
     2#define MYTHDBCON_H
    33
    44#include <iostream>
    55using namespace std;
  • mythtv/libs/libmythdb/mythdbparams.h

    diff --git a/mythtv/libs/libmythdb/mythdbparams.h b/mythtv/libs/libmythdb/mythdbparams.h
    index 58579fb..d1d6bb1 100644
    a b  
    1 #ifndef MYTHDBPARAMS_H_
    2 #define MYTHDBPARAMS_H_
     1#ifndef MYTHDBPARAMS_H
     2#define MYTHDBPARAMS_H
    33
    44#include "mythexp.h"
    55
  • mythtv/libs/libmythdb/mythdirs.cpp

    diff --git a/mythtv/libs/libmythdb/mythdirs.cpp b/mythtv/libs/libmythdb/mythdirs.cpp
    index d6bbfcf..ed9f333 100644
    a b  
     1// MythTV
     2#include "mythdirs.h"
     3#include "mythconfig.h"  // for CONFIG_DARWIN
     4#include "mythverbose.h"
     5
     6// C++ STL
    17#include <iostream>
    28#include <cstdlib>
    39
     10// Qt
    411#include <QDir>
    512#include <QApplication>
    613
    7 #include "mythconfig.h"  // for CONFIG_DARWIN
    8 #include "mythdirs.h"
    9 #include "mythverbose.h"
    1014
    1115static QString installprefix = QString::null;
    1216static QString sharedir = QString::null;
  • mythtv/libs/libmythdb/mythdirs.h

    diff --git a/mythtv/libs/libmythdb/mythdirs.h b/mythtv/libs/libmythdb/mythdirs.h
    index 438b0a9..21e8929 100644
    a b  
    1 #ifndef MYTHDIRS_H_
    2 #define MYTHDIRS_H_
     1#ifndef MYTHDIRS_H
     2#define MYTHDIRS_H
    33
    44#include <QString>
    55#include "mythexp.h"
  • mythtv/libs/libmythdb/mythevent.h

    diff --git a/mythtv/libs/libmythdb/mythevent.h b/mythtv/libs/libmythdb/mythevent.h
    index 2bf43ec..85df1ea 100644
    a b  
    1 #ifndef MYTHEVENT_H_
    2 #define MYTHEVENT_H_
     1#ifndef MYTHEVENT_H
     2#define MYTHEVENT_H
    33
    44#include <QString>
    55#include <QStringList>
  • mythtv/libs/libmythdb/mythexp.h

    diff --git a/mythtv/libs/libmythdb/mythexp.h b/mythtv/libs/libmythdb/mythexp.h
    index f3c4f9f..bcc569c 100644
    a b  
    1 #ifndef MYTHEXP_H_
    2 #define MYTHEXP_H_
     1#ifndef MYTHEXP_H
     2#define MYTHEXP_H
    33
    44#if (__GNUC__ >= 4)
    55#define MHIDDEN __attribute__((visibility("hidden")))
     
    99#define MPUBLIC
    1010#endif
    1111
    12 #endif // MYTHEXP_H_
     12#endif // MYTHEXP_H
  • mythtv/libs/libmythdb/mythobservable.cpp

    diff --git a/mythtv/libs/libmythdb/mythobservable.cpp b/mythtv/libs/libmythdb/mythobservable.cpp
    index d52bbef..c72409e 100644
    a b  
     1//MythTV
     2#include "mythobservable.h"
     3
     4// Qt
    15#include <qobject.h>
    26#include <qapplication.h>
    37
    4 #include "mythobservable.h"
    58
    69MythObservable::MythObservable()
    710{
  • mythtv/libs/libmythdb/mythobservable.h

    diff --git a/mythtv/libs/libmythdb/mythobservable.h b/mythtv/libs/libmythdb/mythobservable.h
    index e8cd93f..9dfa0f8 100644
    a b  
    1 #ifndef MYTHOBSERVABLE_H_
    2 #define MYTHOBSERVABLE_H_
     1#ifndef MYTHOBSERVABLE_H
     2#define MYTHOBSERVABLE_H
    33
    44#include <QList>
    55#include "mythevent.h"
  • mythtv/libs/libmythdb/mythsocket.cpp

    diff --git a/mythtv/libs/libmythdb/mythsocket.cpp b/mythtv/libs/libmythdb/mythsocket.cpp
    index c75f2a3..55555dc 100644
    a b  
    1 #include <iostream>
     1// MythTV
     2#include "mythsocket.h"
     3#include "mythtimer.h"
     4#include "mythverbose.h"
     5#include "compat.h"
    26
     7// Qt3
    38#include <qapplication.h>
    49#include <qstring.h>
    510#include <unistd.h>
    611#include <stdlib.h>
    712
     13// Qt4
    814#include <QByteArray>
    915#include <QMutex>
    1016#include <QHostInfo>
    1117
    12 #include "mythtimer.h"
    13 #include "mythsocket.h"
    14 #include "mythverbose.h"
    15 #include "compat.h"
     18// C++ standard library
     19#include <iostream>
    1620
    1721#ifdef USING_MINGW
    1822#include <winsock2.h>
  • mythtv/libs/libmythdb/mythtimer.h

    diff --git a/mythtv/libs/libmythdb/mythtimer.h b/mythtv/libs/libmythdb/mythtimer.h
    index 8b12d79..fc33ec4 100644
    a b  
    1 #ifndef MYTHTIMER_H_
    2 #define MYTHTIMER_H_
     1#ifndef MYTHTIMER_H
     2#define MYTHTIMER_H
    33
    44#include <QTime>
    55#include "mythexp.h"
  • mythtv/libs/libmythdb/mythverbose.cpp

    diff --git a/mythtv/libs/libmythdb/mythverbose.cpp b/mythtv/libs/libmythdb/mythverbose.cpp
    index a168ace..8b223b3 100644
    a b  
     1// MythTV
     2#include "mythverbose.h"
     3
     4// Qt
    15#include <QMutex>
    26#include <QStringList>
    37#include <QtDebug>
    48
    5 #include "mythverbose.h"
    69
    710const unsigned int GENERIC_EXIT_OK              = 0;
    811const unsigned int GENERIC_EXIT_INVALID_CMDLINE = 252;
  • mythtv/libs/libmythdb/mythverbose.h

    diff --git a/mythtv/libs/libmythdb/mythverbose.h b/mythtv/libs/libmythdb/mythverbose.h
    index a2afe45..3f82742 100644
    a b  
    1 #ifndef MYTHVERBOSE_H_
    2 #define MYTHVERBOSE_H_
     1#ifndef MYTHVERBOSE_H
     2#define MYTHVERBOSE_H
    33
    44#ifdef __cplusplus
    55#   include <QDateTime>
    extern MPUBLIC unsigned int print_verbose_messages; 
    113113// 1. A non-locking one, used in C or Objective C src, or standalone libraries,
    114114// 2. A mutex-locked one, which may deadlock, and
    115115// 3. A mutex-locked one, which should be deadlock safe.
    116 // If MYTHCONTEXT_H_ is not defined, we assume the first type,
     116// If MYTHCONTEXT_H is not defined, we assume the first type,
    117117// otherwise DEBUG determines the second or third
    118118
    119119
    120 #ifndef MYTHCONTEXT_H_
     120#ifndef MYTHCONTEXT_H
    121121    #ifdef  __cplusplus
    122122        #define VERBOSE(mask,args...)                        \
    123123        do {                                                 \
    extern MPUBLIC unsigned int print_verbose_messages; 
    158158        } while (0)
    159159    #endif
    160160
    161 #elif defined(DEBUG) // && MYTHCONTEXT_H_
     161#elif defined(DEBUG) // && MYTHCONTEXT_H
    162162
    163163    // The verbose_mutex lock is a recursive lock so it is possible (while
    164164    // not recommended) to use a VERBOSE macro within another VERBOSE macro.
    extern MPUBLIC unsigned int print_verbose_messages; 
    179179            } \
    180180        } while (0)
    181181
    182 #else // MYTHCONTEXT_H_ && !DEBUG
     182#else // MYTHCONTEXT_H && !DEBUG
    183183
    184184    // use a slower non-deadlockable version in release builds
    185185
    extern MPUBLIC unsigned int print_verbose_messages; 
    197197            } \
    198198        } while (0)
    199199
    200 #endif // MYTHCONTEXT_H_, DEBUG
     200#endif // MYTHCONTEXT_H, DEBUG
    201201
    202202
    203203#ifdef  __cplusplus
  • mythtv/libs/libmythdb/mythversion.h

    diff --git a/mythtv/libs/libmythdb/mythversion.h b/mythtv/libs/libmythdb/mythversion.h
    index b783dc5..54b5bbd 100644
    a b  
    1 #ifndef MYTHVERSION_H_
    2 #define MYTHVERSION_H_
     1#ifndef MYTHVERSION_H
     2#define MYTHVERSION_H
    33
    44#if (QT_VERSION < 0x040300)
    55#error You need Qt version >= 4.3.0 to compile MythTV.
  • mythtv/libs/libmythdb/oldsettings.cpp

    diff --git a/mythtv/libs/libmythdb/oldsettings.cpp b/mythtv/libs/libmythdb/oldsettings.cpp
    index a8810a8..905e37c 100644
    a b  
    1616#include <fstream>
    1717#include <cstdlib>
    1818#include <cstdio>
    19 #include <cstdlib>
    2019#include <ctime>
    2120#include <string>
    2221#include <sys/time.h>
  • mythtv/libs/libmythdb/qcodecs.cpp

    diff --git a/mythtv/libs/libmythdb/qcodecs.cpp b/mythtv/libs/libmythdb/qcodecs.cpp
    index 46904c6..68b7d33 100644
    a b  
    3131   Rik Hemsley (C) 2001.
    3232*/
    3333
    34 #include <stdio.h>
     34// MythTV
     35#include "qcodecs.h"
     36
     37// C/C++ standard library
     38#include <cstdio>
    3539#include <string.h>
    36 #include <stdlib.h>
     40#include <cstdlib>
    3741
     42// Qt
    3843#include <QtCore/QIODevice>
    3944#include <QtDebug>
    4045
    41 #include "qcodecs.h"
    42 
    4346const unsigned int QMD5_S11 = 7;
    4447const unsigned int QMD5_S12 = 12;
    4548const unsigned int QMD5_S13 = 17;
  • mythtv/libs/libmythdb/qcodecs.h

    diff --git a/mythtv/libs/libmythdb/qcodecs.h b/mythtv/libs/libmythdb/qcodecs.h
    index 6cdba56..cb881b6 100644
    a b  
    3131   Rik Hemsley (C) 2001.
    3232*/
    3333
    34 #ifndef KCODECS_H
    35 #define KCODECS_H
    36 
    37 #define QBase64 QCodecs
     34#ifndef QCODECS_H
     35#define QCODECS_H
    3836
    3937#include <mythexp.h>
     38#include <QtGlobal>
    4039
    4140class QByteArray;
    4241class QIODevice;
    private: 
    471470  QMD5Private* d;
    472471};
    473472
     473namespace QBase64 = QCodecs;
    474474
    475 #endif // KCODECS_H
     475#endif // QCODECS_H