-
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
|
|
2 | 2 | // Simple header which encapsulates platform incompatibilities, so we |
3 | 3 | // do not need to litter the codebase with ifdefs. |
4 | 4 | |
5 | | #ifndef __COMPAT_H__ |
6 | | #define __COMPAT_H__ |
| 5 | #ifndef MYTHTV_COMPAT_H |
| 6 | #define MYTHTV_COMPAT_H |
7 | 7 | |
8 | 8 | // Turn off the visual studio warnings (identifier was truncated) |
9 | 9 | #ifdef _MSC_VER |
… |
… |
inline const char *dlerror(void) |
284 | 284 | #endif |
285 | 285 | |
286 | 286 | |
287 | | #endif // __COMPAT_H__ |
| 287 | #endif // MYTHTV_COMPAT_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 |
3 | 3 | |
4 | 4 | #define GENERIC_EXIT_OK 0 |
5 | 5 | #define GENERIC_EXIT_NOT_OK 255 |
… |
… |
|
128 | 128 | #define COMMFLAG_EXIT_START GENERIC_EXIT_START-6 |
129 | 129 | #define COMMFLAG_EXIT_NO_RINGBUFFER GENERIC_EXIT_START-7 |
130 | 130 | |
131 | | #endif // __MYTH_EXIT_CODES__ |
| 131 | #endif // MYTH_EXIT_CODES |
-
diff --git a/mythtv/libs/libmythdb/httpcomms.cpp b/mythtv/libs/libmythdb/httpcomms.cpp
index c4ce8c8..b17c487 100644
a
|
b
|
|
| 1 | #include "httpcomms.h" |
1 | 2 | #include <iostream> |
2 | 3 | |
3 | 4 | #include <qfile.h> |
… |
… |
|
11 | 12 | using namespace std; |
12 | 13 | |
13 | 14 | #include "qcodecs.h" |
14 | | #include "httpcomms.h" |
15 | 15 | |
16 | 16 | HttpComms::HttpComms() |
17 | 17 | : http(0) |
-
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 |
3 | 3 | |
4 | 4 | #include <qurl.h> |
5 | 5 | #include <qobject.h> |
-
diff --git a/mythtv/libs/libmythdb/lcddevice.cpp b/mythtv/libs/libmythdb/lcddevice.cpp
index 721b0f8..ee65d3b 100644
a
|
b
|
|
7 | 7 | (c) 2002, 2003 Thor Sigvaldason, Dan Morphis and Isaac Richards |
8 | 8 | */ |
9 | 9 | |
| 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 | |
10 | 18 | // ANSI C headers |
11 | 19 | #include <cstdlib> |
12 | 20 | #include <cmath> |
… |
… |
|
21 | 29 | #include <QTextCodec> |
22 | 30 | #include <QByteArray> |
23 | 31 | |
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 | | |
32 | 32 | static QString LOC = "lcddevice: "; |
33 | 33 | |
34 | 34 | LCD::LCD() |
-
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 |
3 | 3 | |
4 | 4 | #include <iostream> |
5 | 5 | using namespace std; |
-
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 |
3 | 2 | #include "mythdb.h" |
4 | 3 | #include "mythdbcon.h" |
5 | 4 | #include "mythverbose.h" |
6 | 5 | #include "oldsettings.h" |
7 | 6 | |
| 7 | // Qt |
| 8 | #include <QMutex> |
| 9 | |
8 | 10 | static MythDB *mythdb = 0; |
9 | 11 | static QMutex dbLock; |
10 | 12 | |
-
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 |
3 | 3 | |
4 | 4 | #include <QString> |
5 | 5 | #include "mythexp.h" |
-
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> |
3 | 10 | |
| 11 | // Qt |
4 | 12 | #include <QVector> |
5 | 13 | #include <QSqlDriver> |
6 | 14 | |
7 | | #include "compat.h" |
8 | | #include "mythdbcon.h" |
9 | | #include "mythdb.h" |
10 | | #include "mythverbose.h" |
11 | 15 | |
12 | 16 | QMutex MSqlQuery::prepareLock; |
13 | 17 | |
-
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 |
3 | 3 | |
4 | 4 | #include <iostream> |
5 | 5 | using namespace std; |
-
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 |
3 | 3 | |
4 | 4 | #include "mythexp.h" |
5 | 5 | |
-
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 |
1 | 7 | #include <iostream> |
2 | 8 | #include <cstdlib> |
3 | 9 | |
| 10 | // Qt |
4 | 11 | #include <QDir> |
5 | 12 | #include <QApplication> |
6 | 13 | |
7 | | #include "mythconfig.h" // for CONFIG_DARWIN |
8 | | #include "mythdirs.h" |
9 | | #include "mythverbose.h" |
10 | 14 | |
11 | 15 | static QString installprefix = QString::null; |
12 | 16 | static QString sharedir = QString::null; |
-
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 |
3 | 3 | |
4 | 4 | #include <QString> |
5 | 5 | #include "mythexp.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 |
3 | 3 | |
4 | 4 | #include <QString> |
5 | 5 | #include <QStringList> |
-
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 |
3 | 3 | |
4 | 4 | #if (__GNUC__ >= 4) |
5 | 5 | #define MHIDDEN __attribute__((visibility("hidden"))) |
… |
… |
|
9 | 9 | #define MPUBLIC |
10 | 10 | #endif |
11 | 11 | |
12 | | #endif // MYTHEXP_H_ |
| 12 | #endif // MYTHEXP_H |
-
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 |
1 | 5 | #include <qobject.h> |
2 | 6 | #include <qapplication.h> |
3 | 7 | |
4 | | #include "mythobservable.h" |
5 | 8 | |
6 | 9 | MythObservable::MythObservable() |
7 | 10 | { |
-
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 |
3 | 3 | |
4 | 4 | #include <QList> |
5 | 5 | #include "mythevent.h" |
-
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" |
2 | 6 | |
| 7 | // Qt3 |
3 | 8 | #include <qapplication.h> |
4 | 9 | #include <qstring.h> |
5 | 10 | #include <unistd.h> |
6 | 11 | #include <stdlib.h> |
7 | 12 | |
| 13 | // Qt4 |
8 | 14 | #include <QByteArray> |
9 | 15 | #include <QMutex> |
10 | 16 | #include <QHostInfo> |
11 | 17 | |
12 | | #include "mythtimer.h" |
13 | | #include "mythsocket.h" |
14 | | #include "mythverbose.h" |
15 | | #include "compat.h" |
| 18 | // C++ standard library |
| 19 | #include <iostream> |
16 | 20 | |
17 | 21 | #ifdef USING_MINGW |
18 | 22 | #include <winsock2.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 |
3 | 3 | |
4 | 4 | #include <QTime> |
5 | 5 | #include "mythexp.h" |
-
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 |
1 | 5 | #include <QMutex> |
2 | 6 | #include <QStringList> |
3 | 7 | #include <QtDebug> |
4 | 8 | |
5 | | #include "mythverbose.h" |
6 | 9 | |
7 | 10 | const unsigned int GENERIC_EXIT_OK = 0; |
8 | 11 | const unsigned int GENERIC_EXIT_INVALID_CMDLINE = 252; |
-
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 |
3 | 3 | |
4 | 4 | #ifdef __cplusplus |
5 | 5 | # include <QDateTime> |
… |
… |
extern MPUBLIC unsigned int print_verbose_messages; |
113 | 113 | // 1. A non-locking one, used in C or Objective C src, or standalone libraries, |
114 | 114 | // 2. A mutex-locked one, which may deadlock, and |
115 | 115 | // 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, |
117 | 117 | // otherwise DEBUG determines the second or third |
118 | 118 | |
119 | 119 | |
120 | | #ifndef MYTHCONTEXT_H_ |
| 120 | #ifndef MYTHCONTEXT_H |
121 | 121 | #ifdef __cplusplus |
122 | 122 | #define VERBOSE(mask,args...) \ |
123 | 123 | do { \ |
… |
… |
extern MPUBLIC unsigned int print_verbose_messages; |
158 | 158 | } while (0) |
159 | 159 | #endif |
160 | 160 | |
161 | | #elif defined(DEBUG) // && MYTHCONTEXT_H_ |
| 161 | #elif defined(DEBUG) // && MYTHCONTEXT_H |
162 | 162 | |
163 | 163 | // The verbose_mutex lock is a recursive lock so it is possible (while |
164 | 164 | // not recommended) to use a VERBOSE macro within another VERBOSE macro. |
… |
… |
extern MPUBLIC unsigned int print_verbose_messages; |
179 | 179 | } \ |
180 | 180 | } while (0) |
181 | 181 | |
182 | | #else // MYTHCONTEXT_H_ && !DEBUG |
| 182 | #else // MYTHCONTEXT_H && !DEBUG |
183 | 183 | |
184 | 184 | // use a slower non-deadlockable version in release builds |
185 | 185 | |
… |
… |
extern MPUBLIC unsigned int print_verbose_messages; |
197 | 197 | } \ |
198 | 198 | } while (0) |
199 | 199 | |
200 | | #endif // MYTHCONTEXT_H_, DEBUG |
| 200 | #endif // MYTHCONTEXT_H, DEBUG |
201 | 201 | |
202 | 202 | |
203 | 203 | #ifdef __cplusplus |
-
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 |
3 | 3 | |
4 | 4 | #if (QT_VERSION < 0x040300) |
5 | 5 | #error You need Qt version >= 4.3.0 to compile MythTV. |
-
diff --git a/mythtv/libs/libmythdb/oldsettings.cpp b/mythtv/libs/libmythdb/oldsettings.cpp
index a8810a8..905e37c 100644
a
|
b
|
|
16 | 16 | #include <fstream> |
17 | 17 | #include <cstdlib> |
18 | 18 | #include <cstdio> |
19 | | #include <cstdlib> |
20 | 19 | #include <ctime> |
21 | 20 | #include <string> |
22 | 21 | #include <sys/time.h> |
-
diff --git a/mythtv/libs/libmythdb/qcodecs.cpp b/mythtv/libs/libmythdb/qcodecs.cpp
index 46904c6..68b7d33 100644
a
|
b
|
|
31 | 31 | Rik Hemsley (C) 2001. |
32 | 32 | */ |
33 | 33 | |
34 | | #include <stdio.h> |
| 34 | // MythTV |
| 35 | #include "qcodecs.h" |
| 36 | |
| 37 | // C/C++ standard library |
| 38 | #include <cstdio> |
35 | 39 | #include <string.h> |
36 | | #include <stdlib.h> |
| 40 | #include <cstdlib> |
37 | 41 | |
| 42 | // Qt |
38 | 43 | #include <QtCore/QIODevice> |
39 | 44 | #include <QtDebug> |
40 | 45 | |
41 | | #include "qcodecs.h" |
42 | | |
43 | 46 | const unsigned int QMD5_S11 = 7; |
44 | 47 | const unsigned int QMD5_S12 = 12; |
45 | 48 | const unsigned int QMD5_S13 = 17; |
-
diff --git a/mythtv/libs/libmythdb/qcodecs.h b/mythtv/libs/libmythdb/qcodecs.h
index 6cdba56..cb881b6 100644
a
|
b
|
|
31 | 31 | Rik Hemsley (C) 2001. |
32 | 32 | */ |
33 | 33 | |
34 | | #ifndef KCODECS_H |
35 | | #define KCODECS_H |
36 | | |
37 | | #define QBase64 QCodecs |
| 34 | #ifndef QCODECS_H |
| 35 | #define QCODECS_H |
38 | 36 | |
39 | 37 | #include <mythexp.h> |
| 38 | #include <QtGlobal> |
40 | 39 | |
41 | 40 | class QByteArray; |
42 | 41 | class QIODevice; |
… |
… |
private: |
471 | 470 | QMD5Private* d; |
472 | 471 | }; |
473 | 472 | |
| 473 | namespace QBase64 = QCodecs; |
474 | 474 | |
475 | | #endif // KCODECS_H |
| 475 | #endif // QCODECS_H |