1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

Added the macro VDR_NO_STL_PROTOTYPES to tools.h

This commit is contained in:
Klaus Schmidinger 2017-05-21 09:37:45 +02:00
parent 0b9870959b
commit 82813f48c4
3 changed files with 14 additions and 3 deletions

View File

@ -3423,6 +3423,7 @@ Jasmin Jessich <jasmin@anw.at>
for writing the ddci2 plugin and for valuable input and help with testing and for writing the ddci2 plugin and for valuable input and help with testing and
debugging MTD support debugging MTD support
for fixing selecting delivery system names in case of undefined indexes for fixing selecting delivery system names in case of undefined indexes
for adding the macro VDR_NO_STL_PROTOTYPES to tools.h
Martin Schirrmacher <schirrmie@gmail.com> Martin Schirrmacher <schirrmie@gmail.com>
for suggesting to provide a way for skin plugins to get informed about the currently for suggesting to provide a way for skin plugins to get informed about the currently

View File

@ -8991,7 +8991,7 @@ Video Disk Recorder Revision History
current channel is listed. current channel is listed.
- Fixed a possible crash when pulling the CAM while decrypting a channel with MTD. - Fixed a possible crash when pulling the CAM while decrypting a channel with MTD.
2017-05-20: Version 2.3.5 2017-05-21: Version 2.3.5
- CAMs are now sent a generated EIT packet that contains a single 'present event' for - CAMs are now sent a generated EIT packet that contains a single 'present event' for
the current SID, in order to avoid any parental rating dialogs. the current SID, in order to avoid any parental rating dialogs.
@ -9035,3 +9035,10 @@ Video Disk Recorder Revision History
- No longer setting a new timer's remote host name if "SVDRP peering" is turned off. - 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 - Fixed a double deletion of a cTimer in case HandleRemoteModifications() returned
false (thanks to Johann Friedrichs). 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.

View File

@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and * See the main source file 'vdr.c' for copyright information and
* how to reach the author. * how to reach the author.
* *
* $Id: tools.h 4.8 2017/05/09 08:37:23 kls Exp $ * $Id: tools.h 4.9 2017/05/21 09:33:12 kls Exp $
*/ */
#ifndef __TOOLS_H #ifndef __TOOLS_H
@ -51,7 +51,10 @@ 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 CHECK(s) { if ((s) < 0) LOG_ERROR; } // used for 'ioctl()' calls
#define FATALERRNO (errno && errno != EAGAIN && errno != EINTR) #define FATALERRNO (errno && errno != EAGAIN && errno != EINTR)
#ifndef __STL_CONFIG_H // in case some plugin needs to use the STL #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
template<class T> inline T min(T a, T b) { return a <= b ? a : b; } 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; } template<class T> inline T max(T a, T b) { return a >= b ? a : b; }
template<class T> inline int sgn(T a) { return a < 0 ? -1 : a > 0 ? 1 : 0; } template<class T> inline int sgn(T a) { return a < 0 ? -1 : a > 0 ? 1 : 0; }