Commit 25930fef authored by Thomas Guillem's avatar Thomas Guillem

define __STDC_*_MACROS in vlc_fixups.h for pre C++11 hosts

parent 5e9dd354
...@@ -26,6 +26,20 @@ ...@@ -26,6 +26,20 @@
#ifndef LIBVLC_FIXUPS_H #ifndef LIBVLC_FIXUPS_H
# define LIBVLC_FIXUPS_H 1 # define LIBVLC_FIXUPS_H 1
/* C++11 says there's no need to define __STDC_*_MACROS when including
* inttypes.h and stdint.h. */
#if defined (__cplusplus) && !defined(HAVE_CXX11)
#ifndef __STDC_FORMAT_MACROS
#define __STDC_FORMAT_MACROS 1
#endif
#ifndef __STDC_CONSTANT_MACROS
#define __STDC_CONSTANT_MACROS 1
#endif
#ifndef __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS 1
#endif
#endif
#if !defined (HAVE_GMTIME_R) || !defined (HAVE_LOCALTIME_R) #if !defined (HAVE_GMTIME_R) || !defined (HAVE_LOCALTIME_R)
# include <time.h> /* time_t */ # include <time.h> /* time_t */
#endif #endif
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
# include "config.h" # include "config.h"
#endif #endif
#define __STDC_CONSTANT_MACROS 1
#define KDM_HELP_TEXT "KDM file" #define KDM_HELP_TEXT "KDM file"
#define KDM_HELP_LONG_TEXT "Path to Key Delivery Message XML file" #define KDM_HELP_LONG_TEXT "Path to Key Delivery Message XML file"
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#define __STDC_CONSTANT_MACROS 1
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
......
...@@ -30,8 +30,6 @@ ...@@ -30,8 +30,6 @@
# include "config.h" # include "config.h"
#endif #endif
#define __STDC_CONSTANT_MACROS 1
#define __STDC_FORMAT_MACROS 1
#define CFG_PREFIX "dshow-" #define CFG_PREFIX "dshow-"
#include <inttypes.h> #include <inttypes.h>
#include <list> #include <list>
......
...@@ -28,12 +28,6 @@ ...@@ -28,12 +28,6 @@
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
/* For inttypes.h
* Note: config.h may include inttypes.h, so make sure we define this option
* early enough. */
#define __STDC_CONSTANT_MACROS 1
#define __STDC_LIMIT_MACROS 1
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
......
...@@ -19,12 +19,6 @@ ...@@ -19,12 +19,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
/* config.h may include inttypes.h, so make sure we define that option
* early enough. */
#define __STDC_FORMAT_MACROS
#define __STDC_CONSTANT_MACROS
#define __STDC_LIMIT_MACROS
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
* along with this program; if not, write to the Free Software Foundation, * along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#define __STDC_CONSTANT_MACROS
#include "Streams.hpp" #include "Streams.hpp"
#include "StreamsType.hpp" #include "StreamsType.hpp"
#include "http/HTTPConnection.hpp" #include "http/HTTPConnection.hpp"
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
* along with this program; if not, write to the Free Software Foundation, * along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#define __STDC_CONSTANT_MACROS
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
......
...@@ -20,10 +20,6 @@ ...@@ -20,10 +20,6 @@
#ifndef SEGMENTINFORMATION_HPP #ifndef SEGMENTINFORMATION_HPP
#define SEGMENTINFORMATION_HPP #define SEGMENTINFORMATION_HPP
#ifndef __STDC_CONSTANT_MACROS
#define __STDC_CONSTANT_MACROS
#endif
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
* along with this program; if not, write to the Free Software Foundation, * along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#define __STDC_CONSTANT_MACROS
#include "SegmentTimeline.h" #include "SegmentTimeline.h"
......
...@@ -22,12 +22,6 @@ ...@@ -22,12 +22,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
/* config.h may include inttypes.h, so make sure we define that option
* early enough. */
#define __STDC_FORMAT_MACROS 1
#define __STDC_CONSTANT_MACROS 1
#define __STDC_LIMIT_MACROS 1
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#define __STDC_CONSTANT_MACROS 1
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
......
...@@ -20,8 +20,6 @@ ...@@ -20,8 +20,6 @@
#ifndef ATOMSREADER_HPP #ifndef ATOMSREADER_HPP
#define ATOMSREADER_HPP #define ATOMSREADER_HPP
#define __STDC_CONSTANT_MACROS
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
* along with this program; if not, write to the Free Software Foundation, * along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#define __STDC_CONSTANT_MACROS
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#define __STDC_CONSTANT_MACROS 1
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#include <sstream> #include <sstream>
#include <stack> #include <stack>
#define __STDC_CONSTANT_MACROS
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
......
...@@ -20,10 +20,6 @@ ...@@ -20,10 +20,6 @@
#ifndef TAGS_HPP #ifndef TAGS_HPP
#define TAGS_HPP #define TAGS_HPP
#ifndef __STDC_CONSTANT_MACROS
#define __STDC_CONSTANT_MACROS
#endif
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
......
...@@ -29,13 +29,6 @@ ...@@ -29,13 +29,6 @@
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
/* config.h may include inttypes.h, so make sure we define that option
* early enough. */
#define __STDC_FORMAT_MACROS 1
#define __STDC_CONSTANT_MACROS 1
#define __STDC_LIMIT_MACROS 1
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
......
...@@ -33,11 +33,6 @@ ...@@ -33,11 +33,6 @@
# include <config.h> # include <config.h>
#endif #endif
/* INT64_C and UINT64_C are only exposed to c++ if this is defined */
#ifndef __STDC_CONSTANT_MACROS
# define __STDC_CONSTANT_MACROS
#endif
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_input.h> #include <vlc_input.h>
#include <vlc_demux.h> #include <vlc_demux.h>
......
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#define __STDC_FORMAT_MACROS 1
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
......
...@@ -23,9 +23,6 @@ ...@@ -23,9 +23,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#define __STDC_FORMAT_MACROS 1
#define __STDC_CONSTANT_MACROS 1
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
......
...@@ -23,9 +23,6 @@ ...@@ -23,9 +23,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#define __STDC_FORMAT_MACROS 1
#define __STDC_CONSTANT_MACROS 1
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
......
...@@ -27,9 +27,6 @@ ...@@ -27,9 +27,6 @@
* - Remove static currentGroup * - Remove static currentGroup
*/ */
#define __STDC_FORMAT_MACROS 1
#define __STDC_CONSTANT_MACROS 1
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
......
...@@ -26,8 +26,6 @@ ...@@ -26,8 +26,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/ *****************************************************************************/
#define __STDC_CONSTANT_MACROS 1
#include "upnp.hpp" #include "upnp.hpp"
#include <vlc_access.h> #include <vlc_access.h>
......
...@@ -33,10 +33,6 @@ ...@@ -33,10 +33,6 @@
# include <poll.h> # include <poll.h>
#endif #endif
#ifndef __STDC_CONSTANT_MACROS
# define __STDC_CONSTANT_MACROS
#endif
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_plugin.h> #include <vlc_plugin.h>
#include <vlc_sout.h> #include <vlc_sout.h>
......
...@@ -12,8 +12,6 @@ ...@@ -12,8 +12,6 @@
# include "config.h" # include "config.h"
#endif #endif
#define __STDC_FORMAT_MACROS 1
#include "AtmoDefs.h" #include "AtmoDefs.h"
#include "AtmoLiveView.h" #include "AtmoLiveView.h"
#include "AtmoOutputFilter.h" #include "AtmoOutputFilter.h"
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
/***************************************************************************** /*****************************************************************************
* Preamble * Preamble
*****************************************************************************/ *****************************************************************************/
#define __STDC_FORMAT_MACROS 1
#include <stdlib.h> /* malloc(), free() */ #include <stdlib.h> /* malloc(), free() */
#include <string.h> #include <string.h>
#include <math.h> /* sin(), cos() */ #include <math.h> /* sin(), cos() */
......
...@@ -26,9 +26,6 @@ ...@@ -26,9 +26,6 @@
* TODO: test non stereo audio * TODO: test non stereo audio
*/ */
#define __STDC_FORMAT_MACROS
#define __STDC_CONSTANT_MACROS
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
......
...@@ -25,9 +25,6 @@ ...@@ -25,9 +25,6 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
#ifndef __STDC_CONSTANT_MACROS
# define __STDC_CONSTANT_MACROS
#endif
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_plugin.h> #include <vlc_plugin.h>
......
...@@ -28,9 +28,6 @@ ...@@ -28,9 +28,6 @@
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
# include "config.h" # include "config.h"
#endif #endif
#ifndef __STDC_CONSTANT_MACROS
# define __STDC_CONSTANT_MACROS
#endif
#include <vlc_common.h> #include <vlc_common.h>
#include <vlc_plugin.h> #include <vlc_plugin.h>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment