summaryrefslogtreecommitdiff
path: root/tools.h
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2017-05-22 20:21:30 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2017-05-22 20:21:30 +0200
commit37acfbd3720ff25da5104a92c7bb29b58a6ecf5a (patch)
treedc5b72d1fc0aa7727de5762a448f18816873d624 /tools.h
parente7cd3f0b33d991d10c540c4fd9d6bca66938784c (diff)
downloadvdr-37acfbd3720ff25da5104a92c7bb29b58a6ecf5a.tar.gz
vdr-37acfbd3720ff25da5104a92c7bb29b58a6ecf5a.tar.bz2
Fixed detecting the inclusion of STL header files in tools.h
Diffstat (limited to 'tools.h')
-rw-r--r--tools.h11
1 files changed, 6 insertions, 5 deletions
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