summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--autoptr.h2
-rw-r--r--cache.h7
-rw-r--r--epg_events.cpp15
-rw-r--r--epg_events.h19
-rw-r--r--epgsearch.cpp11
-rw-r--r--epgsearch.h4
-rw-r--r--epgsearch/services.h7
-rw-r--r--filecache.cpp4
-rw-r--r--filecache.h8
-rw-r--r--grab.cpp8
-rw-r--r--grab.h1
-rw-r--r--i18n.cpp2
-rw-r--r--i18n.h2
-rw-r--r--live.cpp8
-rw-r--r--live.h12
-rw-r--r--livefeatures.cpp2
-rw-r--r--livefeatures.h4
-rw-r--r--md5.cpp5
-rw-r--r--osd_status.cpp5
-rw-r--r--osd_status.h4
-rw-r--r--pages/channels_widget.ecpp7
-rw-r--r--pages/content.ecpp7
-rw-r--r--pages/edit_recording.ecpp16
-rw-r--r--pages/edit_searchtimer.ecpp17
-rw-r--r--pages/edit_timer.ecpp34
-rw-r--r--pages/edit_user.ecpp9
-rw-r--r--pages/epginfo.ecpp16
-rw-r--r--pages/error.ecpp4
-rw-r--r--pages/event_widget.ecpp8
-rw-r--r--pages/ffw_recording.ecpp9
-rw-r--r--pages/ibox.ecpp19
-rw-r--r--pages/keypress.ecpp4
-rw-r--r--pages/login.ecpp6
-rw-r--r--pages/menu.ecpp10
-rw-r--r--pages/multischedule.ecpp19
-rw-r--r--pages/osd.ecpp12
-rw-r--r--pages/page_exit.eh2
-rw-r--r--pages/page_init.eh6
-rw-r--r--pages/pageelems.ecpp19
-rw-r--r--pages/pause_recording.ecpp9
-rw-r--r--pages/play_recording.ecpp12
-rw-r--r--pages/recordings.ecpp21
-rw-r--r--pages/recstream.ecpp12
-rw-r--r--pages/remote.ecpp13
-rw-r--r--pages/rwd_recording.ecpp9
-rw-r--r--pages/schedule.ecpp16
-rw-r--r--pages/screenshot.ecpp6
-rw-r--r--pages/searchepg.ecpp14
-rw-r--r--pages/searchresults.ecpp12
-rw-r--r--pages/searchtimers.ecpp10
-rw-r--r--pages/setup.ecpp11
-rw-r--r--pages/stop_recording.ecpp9
-rw-r--r--pages/switch_channel.ecpp10
-rw-r--r--pages/timerconflicts.ecpp14
-rw-r--r--pages/timers.ecpp18
-rw-r--r--pages/tooltip.ecpp3
-rw-r--r--pages/users.ecpp7
-rw-r--r--pages/vlc.ecpp11
-rw-r--r--pages/whats_on.ecpp16
-rw-r--r--pages/xmlresponse.ecpp4
-rw-r--r--preload.cpp5
-rw-r--r--recman.cpp15
-rw-r--r--recman.h7
-rw-r--r--setup.cpp24
-rw-r--r--setup.h5
-rw-r--r--status.cpp2
-rw-r--r--tasks.cpp14
-rw-r--r--tasks.h3
-rw-r--r--thread.cpp9
-rw-r--r--thread.h4
-rw-r--r--timerconflict.cpp12
-rw-r--r--timerconflict.h6
-rw-r--r--timers.cpp14
-rw-r--r--timers.h6
-rw-r--r--tntconfig.cpp22
-rw-r--r--tntconfig.h5
-rw-r--r--tools.cpp21
-rw-r--r--tools.h13
-rw-r--r--users.cpp5
-rw-r--r--users.h6
80 files changed, 335 insertions, 454 deletions
diff --git a/autoptr.h b/autoptr.h
index 3349367..4dc0263 100644
--- a/autoptr.h
+++ b/autoptr.h
@@ -5,6 +5,8 @@
+ __GNUC_MINOR__ * 100 \
+ __GNUC_PATCHLEVEL__)
+# include <memory>
+
#if GCC_VERSION > 50000
# define AUTO_PTR std::unique_ptr
#else
diff --git a/cache.h b/cache.h
index 88fbd60..b69bd62 100644
--- a/cache.h
+++ b/cache.h
@@ -1,14 +1,11 @@
#ifndef VGSTOOLS_CACHE_H
#define VGSTOOLS_CACHE_H
+#include "stdext.h"
+
#include <cassert>
-#include <algorithm>
-#include <ctime>
-#include <functional>
#include <list>
#include <map>
-#include <utility>
-#include "stdext.h"
/* Interface for TValue:
* size_t weight()
diff --git a/epg_events.cpp b/epg_events.cpp
index fabf033..e4bfde7 100644
--- a/epg_events.cpp
+++ b/epg_events.cpp
@@ -1,15 +1,16 @@
-#include <time.h>
-#include <glob.h>
-#include <algorithm>
-#include <assert.h>
-#include <vdr/player.h>
+
+#include "epg_events.h"
#include "tools.h"
#include "recman.h"
-
-#include "epg_events.h"
#include "setup.h"
+// STL headers need to be before VDR tools.h (included by <vdr/player.h>)
+#include <glob.h>
+#include <cassert>
+
+#include <vdr/player.h>
+
using namespace std;
namespace vdrlive
diff --git a/epg_events.h b/epg_events.h
index 0729ad2..ebd583b 100644
--- a/epg_events.h
+++ b/epg_events.h
@@ -1,17 +1,15 @@
-#ifndef VDR_LIVE_WHATS_ON_H
-#define VDR_LIVE_WHATS_ON_H
+#ifndef VDR_LIVE_EPG_EVENTS_H
+#define VDR_LIVE_EPG_EVENTS_H
-#include <ctime>
+#include "stdext.h"
+
+// STL headers need to be before VDR tools.h (included by <vdr/channels.h>)
+#include <string>
#include <list>
-#include <vdr/plugin.h>
#include <vdr/channels.h>
#include <vdr/epg.h>
-#include <vdr/config.h>
-#include <vdr/i18n.h>
-
-#include "live.h"
-#include "stdext.h"
+#include <vdr/recording.h>
namespace vdrlive
{
@@ -252,5 +250,4 @@ namespace vdrlive
}; // namespace vdrlive
-#endif // VDR_LIVE_WHATS_ON_H
-
+#endif // VDR_LIVE_EPG_EVENTS_H
diff --git a/epgsearch.cpp b/epgsearch.cpp
index b157ea0..48e7fbf 100644
--- a/epgsearch.cpp
+++ b/epgsearch.cpp
@@ -1,14 +1,13 @@
-#include <vector>
-#include <algorithm>
-#include <vdr/channels.h>
-#include <vdr/plugin.h>
-#include <iomanip>
-#include "epgsearch/services.h"
+
#include "epgsearch.h"
+
+#include "epgsearch/services.h"
#include "exception.h"
#include "livefeatures.h"
#include "tools.h"
+#include <iomanip>
+
namespace vdrlive {
using namespace std;
diff --git a/epgsearch.h b/epgsearch.h
index 95d7387..c5f81e6 100644
--- a/epgsearch.h
+++ b/epgsearch.h
@@ -1,13 +1,15 @@
#ifndef VDR_LIVE_EPGSEARCH_H
#define VDR_LIVE_EPGSEARCH_H
+// STL headers need to be before VDR tools.h (included by <vdr/channels.h>)
#include <vector>
#include <list>
#include <set>
#include <string>
+#include <algorithm>
+
#include <vdr/channels.h>
#include <vdr/epg.h>
-#include "tools.h"
namespace vdrlive {
diff --git a/epgsearch/services.h b/epgsearch/services.h
index e7f80dd..fee274e 100644
--- a/epgsearch/services.h
+++ b/epgsearch/services.h
@@ -24,12 +24,15 @@ The project's page is at http://winni.vdr-developer.org/epgsearch
#ifndef EPGSEARCHSERVICES_INC
#define EPGSEARCHSERVICES_INC
+#include "../autoptr.h"
+
+// STL headers need to be before VDR tools.h (included by <vdr/channels.h>)
#include <string>
#include <list>
-#include <memory>
#include <set>
+
#include <vdr/osdbase.h>
-#include "../autoptr.h"
+
// Data structure for service "Epgsearch-search-v1.0"
struct Epgsearch_search_v1_0
diff --git a/filecache.cpp b/filecache.cpp
index 1ecb60f..a9c7c11 100644
--- a/filecache.cpp
+++ b/filecache.cpp
@@ -1,8 +1,10 @@
+
+#include "filecache.h"
+
#include <algorithm>
#include <fstream>
#include <istream>
#include <sys/stat.h>
-#include "filecache.h"
namespace vdrlive {
diff --git a/filecache.h b/filecache.h
index 6833193..25679c0 100644
--- a/filecache.h
+++ b/filecache.h
@@ -1,13 +1,15 @@
#ifndef VDR_LIVE_FILECACHE_H
#define VDR_LIVE_FILECACHE_H
+#include "cache.h"
+
+// STL headers need to be before VDR tools.h (included by <vdr/tools.h>)
#include <limits>
-#include <numeric>
#include <string>
+#include <ctime>
#include <vector>
+
#include <vdr/thread.h>
-#include <vdr/tools.h>
-#include "cache.h"
namespace vdrlive {
diff --git a/grab.cpp b/grab.cpp
index a86f3e9..cf8cf2c 100644
--- a/grab.cpp
+++ b/grab.cpp
@@ -1,8 +1,10 @@
-#include <cstdlib>
-#include <vdr/device.h>
-#include <vdr/tools.h>
+
#include "grab.h"
+#include "tasks.h"
+
+#include <vdr/device.h>
+
namespace vdrlive {
using namespace std;
diff --git a/grab.h b/grab.h
index f1c3aed..3895e9d 100644
--- a/grab.h
+++ b/grab.h
@@ -2,7 +2,6 @@
#define VDR_LIVE_GRAB_H
#include "stdext.h"
-#include "tasks.h"
#include "autoptr.h"
namespace vdrlive {
diff --git a/i18n.cpp b/i18n.cpp
index 5c01b0c..0e74a9b 100644
--- a/i18n.cpp
+++ b/i18n.cpp
@@ -7,6 +7,8 @@
#include "i18n.h"
+#include <vdr/tools.h>
+
namespace vdrlive
{
diff --git a/i18n.h b/i18n.h
index e584d17..7e8cba9 100644
--- a/i18n.h
+++ b/i18n.h
@@ -2,8 +2,6 @@
#define VDR_LIVE_I18N_H
#include <string>
-#include <vdr/config.h>
-#include <vdr/i18n.h>
namespace vdrlive {
diff --git a/live.cpp b/live.cpp
index 232965a..d948f7d 100644
--- a/live.cpp
+++ b/live.cpp
@@ -4,17 +4,11 @@
* See the README file for copyright information and how to reach the author.
*/
-// To get rid of the swap definition in vdr/tools.h
-#define __STL_CONFIG_H
-
-#include <vdr/config.h>
-#include <vdr/plugin.h>
-#include "i18n.h"
#include "live.h"
+
#include "setup.h"
#include "status.h"
#include "tasks.h"
-#include "thread.h"
#include "timers.h"
#include "preload.h"
#include "users.h"
diff --git a/live.h b/live.h
index 93e441d..bf874be 100644
--- a/live.h
+++ b/live.h
@@ -1,12 +1,16 @@
#ifndef VDR_LIVE_LIVE_H
#define VDR_LIVE_LIVE_H
-#include <memory>
+#include "thread.h"
+
+// STL headers need to be before VDR tools.h (included by <vdr/plugin.h>)
#include <string>
-#include <vdr/config.h>
+
+#ifndef __STL_CONFIG_H
+// To get rid of the swap definition in vdr/tools.h
+# define __STL_CONFIG_H
+#endif
#include <vdr/plugin.h>
-#include "thread.h"
-#include "autoptr.h"
namespace vdrlive {
diff --git a/livefeatures.cpp b/livefeatures.cpp
index 94aa4cc..edc4e92 100644
--- a/livefeatures.cpp
+++ b/livefeatures.cpp
@@ -1,4 +1,6 @@
+
#include "livefeatures.h"
+
#include "tools.h"
namespace vdrlive {
diff --git a/livefeatures.h b/livefeatures.h
index 8c6f361..98f2d8a 100644
--- a/livefeatures.h
+++ b/livefeatures.h
@@ -1,13 +1,13 @@
#ifndef VDR_LIVE_FEATURES_H
#define VDR_LIVE_FEATURES_H
+// STL headers need to be before VDR tools.h (included by <vdr/channels.h>)
#include <string>
+
#include <vdr/plugin.h>
namespace vdrlive {
-//LiveFeatures<EpgsearchFeature>().Available();
-
class SplitVersion
{
public:
diff --git a/md5.cpp b/md5.cpp
index 7befb44..9bdbefa 100644
--- a/md5.cpp
+++ b/md5.cpp
@@ -33,12 +33,11 @@
// documentation and/or software.
/////////////////////////////////////////////////////////////////////////
+#include "md5.h"
+
#include <assert.h>
#include <memory.h>
#include <stdio.h>
-#include <string.h>
-#include "md5.h"
-
static unsigned char PADDING[64] =
{
diff --git a/osd_status.cpp b/osd_status.cpp
index a6791ab..90e6257 100644
--- a/osd_status.cpp
+++ b/osd_status.cpp
@@ -1,7 +1,8 @@
-#include <string>
-#include <sstream>
+
#include "osd_status.h"
+#include <sstream>
+
namespace vdrlive {
OsdStatusMonitor::OsdStatusMonitor():title(),message(),red(),green(),yellow(),blue(),text(),selected(-1),lastUpdate(0){
diff --git a/osd_status.h b/osd_status.h
index f84b1ef..3c86d45 100644
--- a/osd_status.h
+++ b/osd_status.h
@@ -1,9 +1,11 @@
#ifndef VDR_LIVE_OSD_STATUS_H
#define VDR_LIVE_OSD_STATUS_H
+// STL headers need to be before VDR tools.h (included by <vdr/status.h>)
#include <string>
+
#include <vdr/status.h>
-#include <time.h>
+
namespace vdrlive {
diff --git a/pages/channels_widget.ecpp b/pages/channels_widget.ecpp
index d4c06b4..c71506d 100644
--- a/pages/channels_widget.ecpp
+++ b/pages/channels_widget.ecpp
@@ -1,8 +1,7 @@
<%pre>
-#include <vdr/channels.h>
-#include "exception.h"
-#include "setup.h"
-#include "tools.h"
+
+#include <exception.h>
+#include <setup.h>
using namespace vdrlive;
diff --git a/pages/content.ecpp b/pages/content.ecpp
index cde092f..28f43c1 100644
--- a/pages/content.ecpp
+++ b/pages/content.ecpp
@@ -1,9 +1,6 @@
<%pre>
-#include <string>
-#include <tnt/httperror.h>
-#include <tnt/httpheader.h>
-#include "filecache.h"
-#include "setup.h"
+
+#include <filecache.h>
using namespace std;
using namespace vdrlive;
diff --git a/pages/edit_recording.ecpp b/pages/edit_recording.ecpp
index a810908..e3e3deb 100644
--- a/pages/edit_recording.ecpp
+++ b/pages/edit_recording.ecpp
@@ -1,15 +1,11 @@
<%pre>
+
+#include <tools.h>
+#include <recman.h>
+#include <setup.h>
+#include <users.h>
+
#include <vdr/recording.h>
-#include <vdr/config.h>
-#include <vdr/i18n.h>
-#include "exception.h"
-#include "tools.h"
-#include "epg_events.h"
-#include "recman.h"
-#include "setup.h"
-#include "i18n.h"
-#include "livefeatures.h"
-#include "users.h"
using namespace std;
using namespace vdrlive;
diff --git a/pages/edit_searchtimer.ecpp b/pages/edit_searchtimer.ecpp
index a17b9d8..a81a15a 100644
--- a/pages/edit_searchtimer.ecpp
+++ b/pages/edit_searchtimer.ecpp
@@ -1,16 +1,11 @@
<%pre>
-#include <memory>
-#include <vdr/channels.h>
-#include <vdr/config.h>
-#include <vdr/epg.h>
-#include <vdr/i18n.h>
+
+#include <tools.h>
+#include <epgsearch.h>
+#include <setup.h>
+#include <users.h>
+
#include <iomanip>
-#include "exception.h"
-#include "tools.h"
-#include "epgsearch.h"
-#include "setup.h"
-#include "i18n.h"
-#include "users.h"
using namespace std;
using namespace vdrlive;
diff --git a/pages/edit_timer.ecpp b/pages/edit_timer.ecpp
index ecc8c6e..d080ee5 100644
--- a/pages/edit_timer.ecpp
+++ b/pages/edit_timer.ecpp
@@ -1,24 +1,16 @@
<%pre>
-// To get rid of the swap definition in vdr/tools.h
-#define __STL_CONFIG_H
+#include <tools.h>
+#include <timers.h>
+#include <setup.h>
+#include <epg_events.h>
+#include <timerconflict.h>
+#include <livefeatures.h>
+#include <epgsearch.h>
+#include <users.h>
+#include <autoptr.h>
-#include <memory>
-#include <vdr/channels.h>
-#include <vdr/config.h>
-#include <vdr/epg.h>
-#include <vdr/i18n.h>
-#include "exception.h"
-#include "tools.h"
-#include "timers.h"
-#include "setup.h"
-#include "epg_events.h"
-#include "timerconflict.h"
-#include "i18n.h"
-#include "livefeatures.h"
-#include "epgsearch.h"
-#include "users.h"
-#include "autoptr.h"
+#include <vdr/timers.h>
using namespace std;
using namespace vdrlive;
@@ -226,15 +218,15 @@ cTimer* timer;
</tr>
<%cpp>
if ( LiveFeatures< features::epgsearch >().Recent() ) {
- RecordingDirs recordingdirs(true);
+ RecordingDirs recordingdirs(true);
</%cpp>
<tr>
<td class="label leftcol"><div class="withmargin"><$ tr("Directory" ) $>:</div></td>
<td class="rightcol"><select name="directory" size="1" id="directory" style="margin-top: 5px">
<option/>
<%cpp>
- for (RecordingDirs::iterator rdir = recordingdirs.begin(); rdir != recordingdirs.end(); ++rdir) {
- std::string dir = *rdir;
+ for (RecordingDirs::iterator rdir = recordingdirs.begin(); rdir != recordingdirs.end(); ++rdir) {
+ std::string dir = *rdir;
</%cpp>
<option value="<$ dir $>"
% if (*rdir == directory) {
diff --git a/pages/edit_user.ecpp b/pages/edit_user.ecpp
index e1d977c..ac7ba86 100644
--- a/pages/edit_user.ecpp
+++ b/pages/edit_user.ecpp
@@ -1,9 +1,8 @@
<%pre>
-#include "exception.h"
-#include "tools.h"
-#include "users.h"
-#include "livefeatures.h"
-#include "setup.h"
+
+#include <users.h>
+#include <livefeatures.h>
+#include <setup.h>
using namespace std;
using namespace vdrlive;
diff --git a/pages/epginfo.ecpp b/pages/epginfo.ecpp
index 77d2f91..91e72f9 100644
--- a/pages/epginfo.ecpp
+++ b/pages/epginfo.ecpp
@@ -1,13 +1,11 @@
<%pre>
-#include <sys/stat.h>
-#include <vdr/tools.h>
-
-#include "stdext.h"
-#include "exception.h"
-#include "setup.h"
-#include "tools.h"
-#include "epg_events.h"
-#include "recman.h"
+
+#include <stdext.h>
+#include <exception.h>
+#include <setup.h>
+#include <tools.h>
+#include <epg_events.h>
+#include <recman.h>
namespace vdrlive {
class SchedulesLock
diff --git a/pages/error.ecpp b/pages/error.ecpp
index df24dd4..ed68b89 100644
--- a/pages/error.ecpp
+++ b/pages/error.ecpp
@@ -1,6 +1,6 @@
<%pre>
-#include <vdr/i18n.h>
-#include "setup.h"
+
+#include <setup.h>
using namespace vdrlive;
diff --git a/pages/event_widget.ecpp b/pages/event_widget.ecpp
index b4a80cb..db8538d 100644
--- a/pages/event_widget.ecpp
+++ b/pages/event_widget.ecpp
@@ -1,10 +1,6 @@
<%pre>
-#include <vdr/plugin.h>
-#include <vdr/channels.h>
-#include <vdr/epg.h>
-#include <vdr/config.h>
-#include <vdr/i18n.h>
-#include "tools.h"
+
+#include <setup.h>
using namespace vdrlive;
diff --git a/pages/ffw_recording.ecpp b/pages/ffw_recording.ecpp
index 5b2d8bc..9d746f1 100644
--- a/pages/ffw_recording.ecpp
+++ b/pages/ffw_recording.ecpp
@@ -1,10 +1,7 @@
<%pre>
-#include <string>
-#include <vdr/recording.h>
-#include "exception.h"
-#include "setup.h"
-#include "tasks.h"
-#include "tools.h"
+
+#include <setup.h>
+#include <tasks.h>
using namespace std;
using namespace vdrlive;
diff --git a/pages/ibox.ecpp b/pages/ibox.ecpp
index 5e714b0..947b746 100644
--- a/pages/ibox.ecpp
+++ b/pages/ibox.ecpp
@@ -1,17 +1,12 @@
<%pre>
-#include <vdr/plugin.h>
-#include <vdr/config.h>
-#include <vdr/recording.h>
-#include <vdr/channels.h>
+
+#include <setup.h>
+#include <tools.h>
+#include <epg_events.h>
+#include <recman.h>
+#include <timerconflict.h>
+
#include <vdr/menu.h>
-#include <vdr/device.h>
-
-#include "exception.h"
-#include "setup.h"
-#include "tools.h"
-#include "epg_events.h"
-#include "recman.h"
-#include "timerconflict.h"
using namespace vdrlive;
using namespace std;
diff --git a/pages/keypress.ecpp b/pages/keypress.ecpp
index efcb1a3..16ddd4f 100644
--- a/pages/keypress.ecpp
+++ b/pages/keypress.ecpp
@@ -1,6 +1,8 @@
<%pre>
+
+#include <setup.h>
+
#include <vdr/remote.h>
-#include "setup.h"
using namespace vdrlive;
diff --git a/pages/login.ecpp b/pages/login.ecpp
index a49f1fa..f7e6a17 100644
--- a/pages/login.ecpp
+++ b/pages/login.ecpp
@@ -1,7 +1,7 @@
<%pre>
-#include "tools.h"
-#include "setup.h"
-#include "users.h"
+
+#include <setup.h>
+#include <users.h>
using namespace std;
using namespace vdrlive;
diff --git a/pages/menu.ecpp b/pages/menu.ecpp
index 74ff1b9..6251ec7 100644
--- a/pages/menu.ecpp
+++ b/pages/menu.ecpp
@@ -1,12 +1,8 @@
<%pre>
-#include <string>
-#include <vdr/plugin.h>
-#include <vdr/config.h>
-#include "livefeatures.h"
-#include "setup.h"
-#include "i18n.h"
-#include "timerconflict.h"
+#include <livefeatures.h>
+#include <setup.h>
+#include <timerconflict.h>
using namespace std;
using namespace vdrlive;
diff --git a/pages/multischedule.ecpp b/pages/multischedule.ecpp
index f84287a..22a3f07 100644
--- a/pages/multischedule.ecpp
+++ b/pages/multischedule.ecpp
@@ -1,17 +1,10 @@
<%pre>
-#include <list>
-#include <vdr/plugin.h>
-#include <vdr/channels.h>
-#include <vdr/epg.h>
-#include <vdr/config.h>
-#include <vdr/device.h>
-#include "exception.h"
-#include "livefeatures.h"
-#include "setup.h"
-#include "tools.h"
-#include "timers.h"
-#include "epg_events.h"
-#include "i18n.h"
+
+#include <livefeatures.h>
+#include <setup.h>
+#include <tools.h>
+#include <timers.h>
+#include <epg_events.h>
using namespace std;
using namespace vdrlive;
diff --git a/pages/osd.ecpp b/pages/osd.ecpp
index b7cf24a..1a8aba7 100644
--- a/pages/osd.ecpp
+++ b/pages/osd.ecpp
@@ -1,13 +1,7 @@
<%pre>
-#include <locale>
-#include <vdr/i18n.h>
-#include <vdr/keys.h>
-#include <vdr/device.h>
-#include "grab.h"
-#include "setup.h"
-#include "tools.h"
-#include "users.h"
-#include "osd_status.h"
+
+#include <setup.h>
+#include <osd_status.h>
using namespace std;
using namespace vdrlive;
diff --git a/pages/page_exit.eh b/pages/page_exit.eh
index 319260e..fb83055 100644
--- a/pages/page_exit.eh
+++ b/pages/page_exit.eh
@@ -1,6 +1,6 @@
<# do not add to Makefile #>
<%pre>
-#include "exception.h"
+#include <exception.h>
</%pre>
<%cpp>
spoint.commit();
diff --git a/pages/page_init.eh b/pages/page_init.eh
index 5a367df..da4374e 100644
--- a/pages/page_init.eh
+++ b/pages/page_init.eh
@@ -1,9 +1,9 @@
<%pre>
// do not add to Makefile
// and do not write a ecpp comment into this file. It must produce no
-// html output not even a empty line.
+// html output not even an empty line.
#include <tnt/savepoint.h>
-#include "exception.h"
+#include <exception.h>
</%pre>
<%request scope="global">
std::string pageTitle;
@@ -12,4 +12,4 @@ std::string pageTitle;
try {
reply.setHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT");
tnt::Savepoint spoint( reply );
-</%cpp> \ No newline at end of file
+</%cpp>
diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp
index bbb8f38..1f96399 100644
--- a/pages/pageelems.ecpp
+++ b/pages/pageelems.ecpp
@@ -1,17 +1,12 @@
<%pre>
-#include <string>
-#include <vdr/menu.h>
-#include <vdr/epg.h>
-#include "exception.h"
-#include "livefeatures.h"
-#include "tntfeatures.h"
-#include "i18n.h"
-#include "setup.h"
-#include "timers.h"
-#include "tools.h"
-#include "epg_events.h"
-#include "gen_version_suffix.h"
+#include <livefeatures.h>
+#include <setup.h>
+#include <timers.h>
+#include <tools.h>
+#include <epg_events.h>
+#include <gen_version_suffix.h>
+//
using namespace std;
using namespace vdrlive;
diff --git a/pages/pause_recording.ecpp b/pages/pause_recording.ecpp
index 1208a42..00ea269 100644
--- a/pages/pause_recording.ecpp
+++ b/pages/pause_recording.ecpp
@@ -1,10 +1,7 @@
<%pre>
-#include <string>
-#include <vdr/recording.h>
-#include "exception.h"
-#include "setup.h"
-#include "tasks.h"
-#include "tools.h"
+
+#include <setup.h>
+#include <tasks.h>
using namespace std;
using namespace vdrlive;
diff --git a/pages/play_recording.ecpp b/pages/play_recording.ecpp
index 1f018de..6ecb7db 100644
--- a/pages/play_recording.ecpp
+++ b/pages/play_recording.ecpp
@@ -1,11 +1,9 @@
<%pre>
-#include <string>
-#include <vdr/recording.h>
-#include "exception.h"
-#include "setup.h"
-#include "tasks.h"
-#include "tools.h"
-#include "users.h"
+
+#include <setup.h>
+#include <tasks.h>
+#include <users.h>
+#include <exception.h>
using namespace std;
using namespace vdrlive;
diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp
index 1693e2a..615fb7c 100644
--- a/pages/recordings.ecpp
+++ b/pages/recordings.ecpp
@@ -1,25 +1,18 @@
<%pre>
-#include <string>
+
+#include <setup.h>
+#include <tasks.h>
+#include <tools.h>
+#include <users.h>
+#include <recman.h>
+#include <tntconfig.h>
#ifdef HAVE_LIBPCRECPP
#include <pcrecpp.h>
#endif
-#include <vdr/plugin.h>
-#include <vdr/config.h>
#include <vdr/videodir.h>
-#include "exception.h"
-#include "epg_events.h"
-
-#include "setup.h"
-#include "tasks.h"
-#include "tools.h"
-#include "i18n.h"
-#include "users.h"
-
-#include "recman.h"
-
#define MB_PER_MINUTE 25.75 // this is just an estimate!
using namespace vdrlive;
diff --git a/pages/recstream.ecpp b/pages/recstream.ecpp
index 61a48e1..5e7614b 100644
--- a/pages/recstream.ecpp
+++ b/pages/recstream.ecpp
@@ -1,14 +1,6 @@
<%pre>
-#include <string>
-#include <iostream>
-#include <fstream>
-#include <algorithm>
-#include <tnt/httperror.h>
-#include <tnt/httpheader.h>
-#include <vdr/recording.h>
-#include "tntfeatures.h"
-#include "setup.h"
-#include "recman.h"
+
+#include <recman.h>
using namespace std;
using namespace vdrlive;
diff --git a/pages/remote.ecpp b/pages/remote.ecpp
index d76b208..0c46f69 100644
--- a/pages/remote.ecpp
+++ b/pages/remote.ecpp
@@ -1,12 +1,9 @@
<%pre>
-#include <locale>
-#include <vdr/i18n.h>
-#include <vdr/keys.h>
-#include <vdr/device.h>
-#include "grab.h"
-#include "setup.h"
-#include "tools.h"
-#include "users.h"
+
+#include <grab.h>
+#include <setup.h>
+#include <tools.h>
+#include <users.h>
using namespace std;
using namespace vdrlive;
diff --git a/pages/rwd_recording.ecpp b/pages/rwd_recording.ecpp
index a0ce569..d568cf3 100644
--- a/pages/rwd_recording.ecpp
+++ b/pages/rwd_recording.ecpp
@@ -1,10 +1,7 @@
<%pre>
-#include <string>
-#include <vdr/recording.h>
-#include "exception.h"
-#include "setup.h"
-#include "tasks.h"
-#include "tools.h"
+
+#include <setup.h>
+#include <tasks.h>
using namespace std;
using namespace vdrlive;
diff --git a/pages/schedule.ecpp b/pages/schedule.ecpp
index 96d9427..c5e5979 100644
--- a/pages/schedule.ecpp
+++ b/pages/schedule.ecpp
@@ -1,15 +1,9 @@
<%pre>
-#include <vdr/plugin.h>
-#include <vdr/channels.h>
-#include <vdr/epg.h>
-#include <vdr/config.h>
-#include <vdr/device.h>
-#include "exception.h"
-#include "livefeatures.h"
-#include "setup.h"
-#include "tools.h"
-#include "epg_events.h"
-#include "i18n.h"
+
+#include <livefeatures.h>
+#include <setup.h>
+#include <tools.h>
+#include <epg_events.h>
using namespace std;
using namespace vdrlive;
diff --git a/pages/screenshot.ecpp b/pages/screenshot.ecpp
index c80c1c8..fbdca02 100644
--- a/pages/screenshot.ecpp
+++ b/pages/screenshot.ecpp
@@ -1,7 +1,7 @@
<%pre>
-#include <vdr/config.h>
-#include "setup.h"
-#include "grab.h"
+
+#include <setup.h>
+#include <grab.h>
using namespace vdrlive;
diff --git a/pages/searchepg.ecpp b/pages/searchepg.ecpp
index 18e8f2e..9d9c79a 100644
--- a/pages/searchepg.ecpp
+++ b/pages/searchepg.ecpp
@@ -1,14 +1,8 @@
<%pre>
-#include <memory>
-#include <vdr/channels.h>
-#include <vdr/config.h>
-#include <vdr/epg.h>
-#include <vdr/i18n.h>
-#include <iomanip>
-#include "exception.h"
-#include "tools.h"
-#include "epgsearch.h"
-#include "setup.h"
+
+#include <tools.h>
+#include <epgsearch.h>
+#include <setup.h>
using namespace std;
using namespace vdrlive;
diff --git a/pages/searchresults.ecpp b/pages/searchresults.ecpp
index 695a7cd..8970f37 100644
--- a/pages/searchresults.ecpp
+++ b/pages/searchresults.ecpp
@@ -1,11 +1,9 @@
<%pre>
-#include <vdr/channels.h>
-#include <vdr/i18n.h>
-#include <vdr/epg.h>
-#include "epgsearch.h"
-#include "tools.h"
-#include "setup.h"
-#include "epg_events.h"
+
+#include <epgsearch.h>
+#include <tools.h>
+#include <setup.h>
+#include <epg_events.h>
using namespace vdrlive;
using namespace std;
diff --git a/pages/searchtimers.ecpp b/pages/searchtimers.ecpp
index dc8bc53..0ed3acc 100644
--- a/pages/searchtimers.ecpp
+++ b/pages/searchtimers.ecpp
@@ -1,10 +1,8 @@
<%pre>
-#include <vdr/channels.h>
-#include <vdr/i18n.h>
-#include "epgsearch.h"
-#include "tools.h"
-#include "setup.h"
-#include "users.h"
+
+#include <epgsearch.h>
+#include <setup.h>
+#include <users.h>
using namespace vdrlive;
using namespace std;
diff --git a/pages/setup.ecpp b/pages/setup.ecpp
index 264839b..b87b0db 100644
--- a/pages/setup.ecpp
+++ b/pages/setup.ecpp
@@ -1,10 +1,9 @@
<%pre>
-#include <sys/stat.h>
-#include <vdr/tools.h>
-#include "setup.h"
-#include "tools.h"
-#include "users.h"
-#include "i18n.h"
+
+#include <setup.h>
+#include <tools.h>
+#include <users.h>
+#include <live.h>
using namespace vdrlive;
using namespace std;
diff --git a/pages/stop_recording.ecpp b/pages/stop_recording.ecpp
index 869beb0..00be32f 100644
--- a/pages/stop_recording.ecpp
+++ b/pages/stop_recording.ecpp
@@ -1,10 +1,7 @@
<%pre>
-#include <string>
-#include <vdr/recording.h>
-#include "exception.h"
-#include "setup.h"
-#include "tasks.h"
-#include "tools.h"
+
+#include <setup.h>
+#include <tasks.h>
using namespace std;
using namespace vdrlive;
diff --git a/pages/switch_channel.ecpp b/pages/switch_channel.ecpp
index 2cffefc..79a6466 100644
--- a/pages/switch_channel.ecpp
+++ b/pages/switch_channel.ecpp
@@ -1,9 +1,9 @@
<%pre>
-#include <vdr/channels.h>
-#include "exception.h"
-#include "tasks.h"
-#include "tools.h"
-#include "users.h"
+
+#include <exception.h>
+#include <tasks.h>
+#include <tools.h>
+#include <users.h>
using namespace std;
using namespace vdrlive;
diff --git a/pages/timerconflicts.ecpp b/pages/timerconflicts.ecpp
index b6c34f0..61e7338 100644
--- a/pages/timerconflicts.ecpp
+++ b/pages/timerconflicts.ecpp
@@ -1,12 +1,10 @@
<%pre>
-#include <vdr/channels.h>
-#include <vdr/i18n.h>
-#include "timerconflict.h"
-#include "tools.h"
-#include "setup.h"
-#include "epg_events.h"
-#include "timers.h"
-#include "i18n.h"
+
+#include <timerconflict.h>
+#include <tools.h>
+#include <setup.h>
+#include <epg_events.h>
+#include <timers.h>
using namespace vdrlive;
using namespace std;
diff --git a/pages/timers.ecpp b/pages/timers.ecpp
index 9f5632c..771a907 100644
--- a/pages/timers.ecpp
+++ b/pages/timers.ecpp
@@ -1,14 +1,12 @@
<%pre>
-#include <set>
-#include <vdr/i18n.h>
-#include "timers.h"
-#include "tools.h"
-#include "setup.h"
-#include "i18n.h"
-#include "epg_events.h"
-#include "timerconflict.h"
-#include "livefeatures.h"
-#include "users.h"
+
+#include <timers.h>
+#include <tools.h>
+#include <setup.h>
+#include <epg_events.h>
+#include <timerconflict.h>
+#include <livefeatures.h>
+#include <users.h>
using namespace std;
using namespace vdrlive;
diff --git a/pages/tooltip.ecpp b/pages/tooltip.ecpp
index e7ddaa6..ed1a31a 100644
--- a/pages/tooltip.ecpp
+++ b/pages/tooltip.ecpp
@@ -1,5 +1,6 @@
<%pre>
-#include "setup.h"
+
+#include <setup.h>
using namespace vdrlive;
diff --git a/pages/users.ecpp b/pages/users.ecpp
index 9e00602..f8bc546 100644
--- a/pages/users.ecpp
+++ b/pages/users.ecpp
@@ -1,8 +1,7 @@
<%pre>
-#include <vdr/channels.h>
-#include <vdr/i18n.h>
-#include "users.h"
-#include "setup.h"
+
+#include <users.h>
+#include <setup.h>
using namespace vdrlive;
using namespace std;
diff --git a/pages/vlc.ecpp b/pages/vlc.ecpp
index 59baa72..39cfb67 100644
--- a/pages/vlc.ecpp
+++ b/pages/vlc.ecpp
@@ -1,11 +1,8 @@
<%pre>
-#include <vdr/channels.h>
-#include <vdr/i18n.h>
-#include <vdr/keys.h>
-#include "setup.h"
-#include "tools.h"
-#include "users.h"
-#include "tntfeatures.h"
+
+#include <setup.h>
+#include <tools.h>
+#include <users.h>
using namespace std;
using namespace vdrlive;
diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp
index 444b845..bc58687 100644
--- a/pages/whats_on.ecpp
+++ b/pages/whats_on.ecpp
@@ -1,14 +1,10 @@
<%pre>
-#include <vdr/plugin.h>
-#include <vdr/channels.h>
-#include <vdr/epg.h>
-#include <vdr/config.h>
-#include <vdr/i18n.h>
-#include "livefeatures.h"
-#include "setup.h"
-#include "tools.h"
-#include "epg_events.h"
-#include "epgsearch.h"
+
+#include <livefeatures.h>
+#include <setup.h>
+#include <tools.h>
+#include <epg_events.h>
+#include <epgsearch.h>
using namespace std;
using namespace vdrlive;
diff --git a/pages/xmlresponse.ecpp b/pages/xmlresponse.ecpp
index bf0a6c1..40eca86 100644
--- a/pages/xmlresponse.ecpp
+++ b/pages/xmlresponse.ecpp
@@ -1,6 +1,6 @@
<%pre>
-#include <string>
-#include "i18n.h"
+
+#include <i18n.h>
using namespace std;
using namespace vdrlive;
diff --git a/preload.cpp b/preload.cpp
index 10e066e..3c24955 100644
--- a/preload.cpp
+++ b/preload.cpp
@@ -1,10 +1,9 @@
-#include <string>
-#include <vdr/tools.h>
+#include "preload.h"
#include "filecache.h"
-#include "preload.h"
+#include <vdr/tools.h>
using namespace std;
diff --git a/recman.cpp b/recman.cpp
index 2da3bc4..082bf61 100644
--- a/recman.cpp
+++ b/recman.cpp
@@ -1,15 +1,14 @@
-#include <unistd.h>
-#include <string>
-#include <sstream>
+
+#include "recman.h"
+
+#include "tools.h"
+
+// STL headers need to be before VDR tools.h (included by <vdr/videodir.h>)
#include <fstream>
#include <stack>
#include <algorithm>
-#include "stdext.h"
-#include "tools.h"
-
-#include "epg_events.h"
-#include "recman.h"
+#include <vdr/videodir.h>
#define INDEXFILESUFFIX "/index.vdr"
#define LENGTHFILESUFFIX "/length.vdr"
diff --git a/recman.h b/recman.h
index 0ff60f7..32981ae 100644
--- a/recman.h
+++ b/recman.h
@@ -1,12 +1,15 @@
#ifndef VDR_LIVE_RECORDINGS_H
#define VDR_LIVE_RECORDINGS_H
-#include <ctime>
+#include "stdext.h"
+
+// STL headers need to be before VDR tools.h (included by <vdr/recording.h>)
#include <map>
+#include <string>
#include <vector>
#include <list>
+
#include <vdr/recording.h>
-#include "stdext.h"
namespace vdrlive {
diff --git a/setup.cpp b/setup.cpp
index 00d496f..a77d215 100644
--- a/setup.cpp
+++ b/setup.cpp
@@ -1,25 +1,21 @@
-#include <cerrno>
-#include <cstdlib>
-#include <cstring>
+
+#include "setup.h"
+
+#include "tools.h"
+
+// STL headers need to be before VDR tools.h (included by <vdr/plugin.h>)
+#include <getopt.h>
#include <algorithm>
-#include <functional>
#include <iostream>
-#include <sstream>
#include <bitset>
-#include <getopt.h>
-#include <stdint.h>
-#include <unistd.h>
-#include <string>
+
+#include <vdr/plugin.h>
+
#ifdef __FreeBSD__
#include <sys/socket.h>
#include <netinet/in.h>
#endif
#include <arpa/inet.h>
-#include <vdr/tools.h>
-#include <vdr/menuitems.h>
-#include <vdr/plugin.h>
-#include "setup.h"
-#include "tools.h"
namespace vdrlive {
diff --git a/setup.h b/setup.h
index 8da36ae..55baba8 100644
--- a/setup.h
+++ b/setup.h
@@ -1,12 +1,11 @@
#ifndef VDR_LIVE_SETUP_H
#define VDR_LIVE_SETUP_H
+// STL headers need to be before VDR tools.h (included by <vdr/menuitems.h>)
#include <list>
#include <limits>
-#include <numeric>
#include <string>
-#include "live.h"
-#include "tntfeatures.h"
+
#include <vdr/menuitems.h>
#define LIVEVERSION "2.3.1"
diff --git a/status.cpp b/status.cpp
index acc60fe..47b451e 100644
--- a/status.cpp
+++ b/status.cpp
@@ -1,4 +1,6 @@
+
#include "status.h"
+
#include "timers.h"
namespace vdrlive {
diff --git a/tasks.cpp b/tasks.cpp
index c8b3c44..dfa0baf 100644
--- a/tasks.cpp
+++ b/tasks.cpp
@@ -1,15 +1,13 @@
-#include <algorithm>
-#include <vdr/channels.h>
-#include <vdr/i18n.h>
-#include <vdr/menu.h>
-#include <vdr/recording.h>
+
+#include "tasks.h"
#include "stdext.h"
-#include "exception.h"
#include "recman.h"
-#include "tools.h"
-#include "tasks.h"
+// STL headers need to be before VDR tools.h (included by <vdr/menu.h>)
+#include <algorithm>
+
+#include <vdr/menu.h>
namespace vdrlive {
diff --git a/tasks.h b/tasks.h
index 787be96..af6dedd 100644
--- a/tasks.h
+++ b/tasks.h
@@ -1,9 +1,10 @@
#ifndef VDR_LIVE_TASKS_H
#define VDR_LIVE_TASKS_H
-#include <memory>
+// STL headers need to be before VDR tools.h (included by <vdr/channels.h>)
#include <string>
#include <vector>
+
#include <vdr/channels.h>
#include <vdr/thread.h>
diff --git a/thread.cpp b/thread.cpp
index 972b155..5189c5f 100644
--- a/thread.cpp
+++ b/thread.cpp
@@ -1,11 +1,10 @@
-#include <cstdlib>
-#include <iostream>
-#include <stdexcept>
-#include <vdr/tools.h>
-#include <tnt/tntnet.h>
+
#include "thread.h"
+
#include "tntconfig.h"
+#include <vdr/tools.h>
+
namespace vdrlive {
using namespace std;
diff --git a/thread.h b/thread.h
index 10f873a..cbe0e9c 100644
--- a/thread.h
+++ b/thread.h
@@ -1,10 +1,8 @@
#ifndef VDR_LIVE_THREAD_H
#define VDR_LIVE_THREAD_H
-#include <memory>
-#include <vdr/thread.h>
#include "autoptr.h"
-
+#include <vdr/thread.h>
namespace tnt { class Tntnet; }
diff --git a/timerconflict.cpp b/timerconflict.cpp
index 01f473a..e2140db 100644
--- a/timerconflict.cpp
+++ b/timerconflict.cpp
@@ -1,15 +1,13 @@
-#include <time.h>
-#include <vector>
-
-#include <vdr/plugin.h>
+#include "timerconflict.h"
#include "tools.h"
-#include "exception.h"
-#include "epgsearch.h"
#include "epgsearch/services.h"
-#include "timerconflict.h"
+// STL headers need to be before VDR tools.h (included by <vdr/plugin.h>)
+#include <vector>
+
+#include <vdr/plugin.h>
namespace vdrlive {
diff --git a/timerconflict.h b/timerconflict.h
index 0e60420..ed1f15e 100644
--- a/timerconflict.h
+++ b/timerconflict.h
@@ -1,10 +1,12 @@
#ifndef VDR_LIVE_TIMERCONFLICT_H
#define VDR_LIVE_TIMERCONFLICT_H
-#include <list>
-
#include "stdext.h"
+#include <list>
+#include <string>
+#include <time.h>
+
namespace vdrlive {
// classes for timer conflict interface
diff --git a/timers.cpp b/timers.cpp
index 2690d6f..30ccc41 100644
--- a/timers.cpp
+++ b/timers.cpp
@@ -1,12 +1,16 @@
-#include <memory>
-#include <sstream>
-#include <vector>
-#include "exception.h"
+
#include "timers.h"
+
+#include "exception.h"
#include "tools.h"
-#include "i18n.h"
#include "autoptr.h"
+// STL headers need to be before VDR tools.h (included by <vdr/plugin.h>)
+#include <sstream>
+
+#include <vdr/plugin.h>
+#include <vdr/menu.h>
+
static bool operator<( cTimer const& left, cTimer const& right )
{
return left.Compare( right ) < 0;
diff --git a/timers.h b/timers.h
index 44dec10..1952524 100644
--- a/timers.h
+++ b/timers.h
@@ -1,13 +1,11 @@
#ifndef VDR_LIVE_TIMERS_H
#define VDR_LIVE_TIMERS_H
+// STL headers need to be before VDR tools.h (included by <vdr/timers.h>)
#include <list>
#include <string>
-#include <vdr/channels.h>
-#include <vdr/menu.h>
+
#include <vdr/timers.h>
-#include <vdr/thread.h>
-#include "live.h"
namespace vdrlive {
diff --git a/tntconfig.cpp b/tntconfig.cpp
index 123ee78..6d4c6e9 100644
--- a/tntconfig.cpp
+++ b/tntconfig.cpp
@@ -1,24 +1,16 @@
-#include <cerrno>
-#include <cstring>
-#include <fstream>
-#include <sstream>
-#include <stdexcept>
-#include "tntfeatures.h"
+
+#include "tntconfig.h"
+
+#include "i18n.h"
+#include "live.h"
+#include "setup.h"
+
#if TNT_LOG_SERINFO
#include <cxxtools/log.h>
#include <cxxtools/xml/xmldeserializer.h>
#else
#include <cxxtools/loginit.h>
#endif
-#include <tnt/sessionscope.h>
-#include <tnt/httpreply.h>
-#include <vdr/config.h>
-#include <vdr/plugin.h>
-#include <vdr/videodir.h>
-#include "i18n.h"
-#include "live.h"
-#include "setup.h"
-#include "tntconfig.h"
namespace vdrlive {
diff --git a/tntconfig.h b/tntconfig.h
index 118a6e5..2169245 100644
--- a/tntconfig.h
+++ b/tntconfig.h
@@ -1,11 +1,10 @@
#ifndef VDR_LIVE_TNTCONFIG_H
#define VDR_LIVE_TNTCONFIG_H
-#include <string>
-#include <tnt/tntnet.h>
-#include <vdr/config.h>
#include "tntfeatures.h"
+#include <tnt/tntnet.h>
+
namespace vdrlive {
class TntConfig
diff --git a/tools.cpp b/tools.cpp
index ddfacd0..dd0842f 100644
--- a/tools.cpp
+++ b/tools.cpp
@@ -1,17 +1,16 @@
-#include <algorithm>
-#include <stdexcept>
-#include <iomanip>
-#include <tnt/ecpp.h>
-#include <tnt/htmlescostream.h>
-#include <tnt/httprequest.h>
-#include <tnt/httpreply.h>
-#include <vdr/recording.h>
-#include "exception.h"
-#include "live.h"
-#include "setup.h"
+
#include "tools.h"
+
#include "md5.h"
+#include <tnt/ecpp.h>
+#include <tnt/htmlescostream.h>
+
+// STL headers need to be before VDR tools.h (included by <vdr/recording.h>)
+#include <iomanip>
+
+#include <vdr/recording.h>
+#include <vdr/videodir.h>
using namespace std;
using namespace tnt;
diff --git a/tools.h b/tools.h
index 1672e84..40a47ec 100644
--- a/tools.h
+++ b/tools.h
@@ -1,18 +1,17 @@
#ifndef VDR_LIVE_TOOLS_H
#define VDR_LIVE_TOOLS_H
-#include <ctime>
+// STL headers need to be before VDR tools.h (included by <vdr/channels.h>)
#include <istream>
-#include <locale>
-#include <ostream>
#include <sstream>
#include <stdexcept>
-#include <string>
#include <vector>
+
+#ifndef __STL_CONFIG_H
+// To get rid of the swap definition in vdr/tools.h
+# define __STL_CONFIG_H
+#endif
#include <vdr/channels.h>
-#include <vdr/thread.h>
-#include <vdr/videodir.h>
-#include <vdr/tools.h>
std::istream& operator>>( std::istream& is, tChannelID& ret );
diff --git a/users.cpp b/users.cpp
index c82756c..2109854 100644
--- a/users.cpp
+++ b/users.cpp
@@ -5,11 +5,12 @@
*/
#include "users.h"
-#include <iostream>
-#include <sstream>
+
#include "tools.h"
#include "setup.h"
+#include <sstream>
+
namespace vdrlive {
using namespace std;
diff --git a/users.h b/users.h
index fe4a0b0..40d87a1 100644
--- a/users.h
+++ b/users.h
@@ -1,11 +1,11 @@
#ifndef VDR_LIVE_USERS_H
#define VDR_LIVE_USERS_H
+// STL headers need to be before VDR tools.h (included by <vdr/channels.h>)
#include <string>
-#include <vdr/plugin.h>
+
#include <vdr/tools.h>
-#include <iostream>
-#include <sstream>
+#include <vdr/config.h>
namespace vdrlive {