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 @@
#ifndef LIBVLC_FIXUPS_H
# 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)
# include <time.h> /* time_t */
#endif
......
......@@ -40,7 +40,6 @@
# include "config.h"
#endif
#define __STDC_CONSTANT_MACROS 1
#define KDM_HELP_TEXT "KDM file"
#define KDM_HELP_LONG_TEXT "Path to Key Delivery Message XML file"
......
......@@ -22,8 +22,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#define __STDC_CONSTANT_MACROS 1
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
......
......@@ -30,8 +30,6 @@
# include "config.h"
#endif
#define __STDC_CONSTANT_MACROS 1
#define __STDC_FORMAT_MACROS 1
#define CFG_PREFIX "dshow-"
#include <inttypes.h>
#include <list>
......
......@@ -28,12 +28,6 @@
* 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
# include "config.h"
#endif
......
......@@ -19,12 +19,6 @@
* 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
# include "config.h"
#endif
......
......@@ -17,7 +17,6 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#define __STDC_CONSTANT_MACROS
#include "Streams.hpp"
#include "StreamsType.hpp"
#include "http/HTTPConnection.hpp"
......
......@@ -21,7 +21,6 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#define __STDC_CONSTANT_MACROS
#ifdef HAVE_CONFIG_H
# include "config.h"
......
......@@ -20,10 +20,6 @@
#ifndef SEGMENTINFORMATION_HPP
#define SEGMENTINFORMATION_HPP
#ifndef __STDC_CONSTANT_MACROS
#define __STDC_CONSTANT_MACROS
#endif
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
......
......@@ -20,7 +20,6 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#define __STDC_CONSTANT_MACROS
#include "SegmentTimeline.h"
......
......@@ -22,12 +22,6 @@
* 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
# include "config.h"
#endif
......
......@@ -25,7 +25,6 @@
/*****************************************************************************
* Preamble
*****************************************************************************/
#define __STDC_CONSTANT_MACROS 1
#ifdef HAVE_CONFIG_H
# include "config.h"
......
......@@ -20,8 +20,6 @@
#ifndef ATOMSREADER_HPP
#define ATOMSREADER_HPP
#define __STDC_CONSTANT_MACROS
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
......
......@@ -21,7 +21,6 @@
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#define __STDC_CONSTANT_MACROS
#ifdef HAVE_CONFIG_H
# include "config.h"
......
......@@ -21,7 +21,6 @@
/*****************************************************************************
* Preamble
*****************************************************************************/
#define __STDC_CONSTANT_MACROS 1
#ifdef HAVE_CONFIG_H
# include "config.h"
......
......@@ -21,7 +21,6 @@
#include <sstream>
#include <stack>
#define __STDC_CONSTANT_MACROS
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
......
......@@ -20,10 +20,6 @@
#ifndef TAGS_HPP
#define TAGS_HPP
#ifndef __STDC_CONSTANT_MACROS
#define __STDC_CONSTANT_MACROS
#endif
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
......
......@@ -29,13 +29,6 @@
* 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
# include "config.h"
#endif
......
......@@ -33,11 +33,6 @@
# include <config.h>
#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_input.h>
#include <vlc_demux.h>
......
......@@ -23,8 +23,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#define __STDC_FORMAT_MACROS 1
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
......
......@@ -23,9 +23,6 @@
* 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
# include "config.h"
#endif
......
......@@ -23,9 +23,6 @@
* 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
# include "config.h"
#endif
......
......@@ -27,9 +27,6 @@
* - Remove static currentGroup
*/
#define __STDC_FORMAT_MACROS 1
#define __STDC_CONSTANT_MACROS 1
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
......
......@@ -26,8 +26,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#define __STDC_CONSTANT_MACROS 1
#include "upnp.hpp"
#include <vlc_access.h>
......
......@@ -33,10 +33,6 @@
# include <poll.h>
#endif
#ifndef __STDC_CONSTANT_MACROS
# define __STDC_CONSTANT_MACROS
#endif
#include <vlc_common.h>
#include <vlc_plugin.h>
#include <vlc_sout.h>
......
......@@ -12,8 +12,6 @@
# include "config.h"
#endif
#define __STDC_FORMAT_MACROS 1
#include "AtmoDefs.h"
#include "AtmoLiveView.h"
#include "AtmoOutputFilter.h"
......
......@@ -28,7 +28,6 @@
/*****************************************************************************
* Preamble
*****************************************************************************/
#define __STDC_FORMAT_MACROS 1
#include <stdlib.h> /* malloc(), free() */
#include <string.h>
#include <math.h> /* sin(), cos() */
......
......@@ -26,9 +26,6 @@
* TODO: test non stereo audio
*/
#define __STDC_FORMAT_MACROS
#define __STDC_CONSTANT_MACROS
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
......
......@@ -25,9 +25,6 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#ifndef __STDC_CONSTANT_MACROS
# define __STDC_CONSTANT_MACROS
#endif
#include <vlc_common.h>
#include <vlc_plugin.h>
......
......@@ -28,9 +28,6 @@
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#ifndef __STDC_CONSTANT_MACROS
# define __STDC_CONSTANT_MACROS
#endif
#include <vlc_common.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