diff options
Diffstat (limited to 'tools.h')
-rw-r--r-- | tools.h | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -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 |