Merge pull request #3128 from Carbenium/int-type-macros
Consolidate __STDC_FORMAT_MACROS and __STDC_CONSTANT_MACROS definitionpull/3134/head
commit
2ee097c5f2
|
@ -61,12 +61,12 @@ endif(NOT HOST_OS)
|
|||
set (CMAKE_CXX_STANDARD 11)
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
# Default CLFAGS and CXXFLAGS:
|
||||
set(CMAKE_C_FLAGS_RELEASE "-Wall -D__STDC_CONSTANT_MACROS -O2")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -D__STDC_CONSTANT_MACROS -O2")
|
||||
set(CMAKE_C_FLAGS_DEBUG "-Wall -D__STDC_CONSTANT_MACROS -g")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -D__STDC_CONSTANT_MACROS -g")
|
||||
set(CMAKE_C_FLAGS_OPTIMISED "-Wall -D__STDC_CONSTANT_MACROS -O3")
|
||||
set(CMAKE_CXX_FLAGS_OPTIMISED "-Wall -D__STDC_CONSTANT_MACROS -O3")
|
||||
set(CMAKE_C_FLAGS_RELEASE "-Wall -O2")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-Wall -O2")
|
||||
set(CMAKE_C_FLAGS_DEBUG "-Wall -g")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-Wall -g")
|
||||
set(CMAKE_C_FLAGS_OPTIMISED "-Wall -O3")
|
||||
set(CMAKE_CXX_FLAGS_OPTIMISED "-Wall -O3")
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
|
||||
set (CMAKE_CXX_STANDARD 11)
|
||||
|
|
|
@ -15,7 +15,6 @@ DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
|||
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
|
||||
|
||||
CFLAGS = -Wall
|
||||
CPPFLAGS = -D__STDC_CONSTANT_MACROS
|
||||
CXXFLAGS = -DHAVE_LIBCRYPTO
|
||||
|
||||
ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
|
||||
|
|
|
@ -19,6 +19,15 @@
|
|||
#ifndef ZONEMINDER_SRC_ZM_DEFINE_H_
|
||||
#define ZONEMINDER_SRC_ZM_DEFINE_H_
|
||||
|
||||
// These macros have not been adopted by the C++11 standard.
|
||||
// However glibc 2.17 (CentOS 7) still depends on them to provide the macros which are guarded by these defines.
|
||||
#if !defined(__STDC_FORMAT_MACROS)
|
||||
# define __STDC_FORMAT_MACROS
|
||||
#endif
|
||||
#if !defined(__STDC_CONSTANT_MACROS)
|
||||
# define __STDC_CONSTANT_MACROS
|
||||
#endif
|
||||
|
||||
#include <cinttypes>
|
||||
|
||||
typedef std::int64_t int64;
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#ifndef ZM_EVENT_H
|
||||
#define ZM_EVENT_H
|
||||
|
||||
#include "zm_define.h"
|
||||
#include "zm_storage.h"
|
||||
#include <map>
|
||||
#include <queue>
|
||||
|
|
|
@ -20,10 +20,11 @@
|
|||
#ifndef ZM_EVENTSTREAM_H
|
||||
#define ZM_EVENTSTREAM_H
|
||||
|
||||
#include "zm_stream.h"
|
||||
#include "zm_define.h"
|
||||
#include "zm_ffmpeg_input.h"
|
||||
#include "zm_monitor.h"
|
||||
#include "zm_storage.h"
|
||||
#include "zm_stream.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef ZM_FFMPEG_INPUT_H
|
||||
#define ZM_FFMPEG_INPUT_H
|
||||
|
||||
#include "zm_define.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#ifndef ZM_MONITOR_H
|
||||
#define ZM_MONITOR_H
|
||||
|
||||
#include "zm_define.h"
|
||||
#include "zm_event.h"
|
||||
#include "zm_image.h"
|
||||
#include "zm_packet.h"
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#define ZM_RTSP_SERVER_DEVICE_SOURCE_H
|
||||
|
||||
#include "zm_config.h"
|
||||
#include "zm_define.h"
|
||||
#include "zm_monitor.h"
|
||||
#include <list>
|
||||
#include <string>
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
//
|
||||
|
||||
#define __STDC_FORMAT_MACROS 1
|
||||
#include "zm_videostore.h"
|
||||
|
||||
#include "zm_logger.h"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define ZM_VIDEOSTORE_H
|
||||
|
||||
#include "zm_config.h"
|
||||
#include "zm_define.h"
|
||||
#include "zm_ffmpeg.h"
|
||||
#include "zm_swscale.h"
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
//
|
||||
|
||||
#define __STDC_FORMAT_MACROS 1
|
||||
#include "zm_zone.h"
|
||||
|
||||
#include "zm_fifo.h"
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
|
||||
#include "zm_box.h"
|
||||
#include "zm_coord.h"
|
||||
#include "zm_define.h"
|
||||
#include "zm_config.h"
|
||||
#include "zm_poly.h"
|
||||
#include "zm_rgb.h"
|
||||
|
|
10
src/zmc.cpp
10
src/zmc.cpp
|
@ -64,16 +64,6 @@ possible, this should run at more or less constant speed.
|
|||
#include <getopt.h>
|
||||
#include <iostream>
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
#include <limits.h>
|
||||
#else
|
||||
#include <values.h>
|
||||
#endif
|
||||
|
||||
#if !defined(MAXINT)
|
||||
#define MAXINT INT_MAX
|
||||
#endif
|
||||
|
||||
void Usage() {
|
||||
fprintf(stderr, "zmc -d <device_path> or -r <proto> -H <host> -P <port> -p <path> or -f <file_path> or -m <monitor_id>\n");
|
||||
|
||||
|
|
Loading…
Reference in New Issue