summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS2
-rw-r--r--HISTORY9
-rw-r--r--tools.h11
3 files changed, 9 insertions, 13 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index c7f54d4c..140ae533 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -3423,7 +3423,7 @@ Jasmin Jessich <jasmin@anw.at>
for writing the ddci2 plugin and for valuable input and help with testing and
debugging MTD support
for fixing selecting delivery system names in case of undefined indexes
- for adding the macro VDR_NO_STL_PROTOTYPES to tools.h
+ for fixing detecting the inclusion of STL header files in tools.h
Martin Schirrmacher <schirrmie@gmail.com>
for suggesting to provide a way for skin plugins to get informed about the currently
diff --git a/HISTORY b/HISTORY
index aee5047b..ab1a20ff 100644
--- a/HISTORY
+++ b/HISTORY
@@ -9035,13 +9035,6 @@ Video Disk Recorder Revision History
- No longer setting a new timer's remote host name if "SVDRP peering" is turned off.
- Fixed a double deletion of a cTimer in case HandleRemoteModifications() returned
false (thanks to Johann Friedrichs).
-- Added the macro VDR_NO_STL_PROTOTYPES to tools.h (thanks to Jasmin Jessich). For
- some reason the STL developers decided to remove the macro __STL_CONFIG_H, so VDR
- can no longer automatically determine whether an STL header file has been included.
- If you use the STL and get error messages regarding template functions defined in
- VDR's tools.h, you can insert
- #define VDR_NO_STL_PROTOTYPES
- before including tools.h.
- Removed TsGetContinuityCounter() from remux.h, using TsContinuityCounter() instead.
- Fixed setting the local machine's SVDRP host name (was overwritten if setup.conf
contained an empty string). The SVDRP host name is now only written to setup.conf
@@ -9060,3 +9053,5 @@ Video Disk Recorder Revision History
the respective commands with an '@' and inserting '@echo XX $@' (where XX is one
of the character combinations listed above) before the command.
The newplugin script has also been modified accordingly.
+- Fixed detecting the inclusion of STL header files in tools.h (thanks to Jasmin
+ Jessich).
diff --git a/tools.h b/tools.h
index 5eec6753..6ff70318 100644
--- a/tools.h
+++ b/tools.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: tools.h 4.9 2017/05/21 09:33:12 kls Exp $
+ * $Id: tools.h 4.10 2017/05/22 20:21:08 kls Exp $
*/
#ifndef __TOOLS_H
@@ -51,13 +51,14 @@ template<class T> inline void DELETENULL(T *&p) { T *q = p; p = NULL; delete q;
#define CHECK(s) { if ((s) < 0) LOG_ERROR; } // used for 'ioctl()' calls
#define FATALERRNO (errno && errno != EAGAIN && errno != EINTR)
-#ifdef __STL_CONFIG_H // this used to work with older versions of STL, but they removed this macro in newer versions
-#define VDR_NO_STL_PROTOTYPES
-#endif
-#ifndef VDR_NO_STL_PROTOTYPES // in case some plugin needs to use the STL
+#ifndef _STL_ALGOBASE_H // in case some plugin needs to use the STL
template<class T> inline T min(T a, T b) { return a <= b ? a : b; }
template<class T> inline T max(T a, T b) { return a >= b ? a : b; }
+#endif
+#ifndef __STL_CONFIG_H // in case some plugin needs to use the STL
template<class T> inline int sgn(T a) { return a < 0 ? -1 : a > 0 ? 1 : 0; }
+#endif
+#ifndef _MOVE_H // in case some plugin needs to use the STL
template<class T> inline void swap(T &a, T &b) { T t = a; a = b; b = t; }
#endif