/*! \file piincludes.h
* \brief Global includes of PIP
*
* This file include all needed system headers, STL
* and declare many useful macros and functions
*/
/*
PIP - Platform Independent Primitives
Global includes
Copyright (C) 2014 Ivan Pelipenko peri4ko@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see .
*/
#ifndef PIINCLUDES_H
#define PIINCLUDES_H
//! Version of PIP in hex - 0x##(Major)##(Minor)##(Revision)
#define PIP_VERSION 0x000400
//! Major value of PIP version
#define PIP_VERSION_MAJOR (PIP_VERSION & 0xFF0000) >> 16
//! Minor value of PIP version
#define PIP_VERSION_MINOR (PIP_VERSION & 0xFF00) >> 8
//! Revision value of PIP version
#define PIP_VERSION_REVISION PIP_VERSION & 0xFF
//! Suffix of PIP version
#define PIP_VERSION_SUFFIX "_beta2"
#ifdef DOXYGEN
//! Macro is defined when compile-time debug is enabled
# define PIP_DEBUG
//! Macro is defined when host is any Windows
# define WINDOWS
//! Macro is defined when host is QNX
# define QNX
//! Macro is defined when host is FreeBSD
# define FREE_BSD
//! Macro is defined when host is Mac OS
# define MAC_OS
//! Macro is defined when host is Android
# define ANDROID
//! Macro is defined when host is any Linux
# define LINUX
//! Macro is defined when compiler is GCC or MinGW
# define CC_GCC
//! Macro is defined when PIP is decided that host is support language
# define HAS_LOCALE
//! Macro is defined when compiler is Visual Studio
# define CC_VC
//! Macro is defined when compiler is unknown
# define CC_OTHER
//! Macro is defined when PIP use "rt" library for timers implementation
# define PIP_TIMER_RT
//! Define this macro to use STL implementation of containers, else PIP implementation will be used
# define PIP_CONTAINERS_STL
#endif
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
# define WINDOWS
# define ARCH_BITS_32
#endif
#if defined(WIN64) || defined(_WIN64) || defined(__WIN64__)
# define WINDOWS
# define ARCH_BITS_64
#endif
#if defined(__QNX__) || defined(__QNXNTO__)
# define QNX
#endif
#ifdef __FreeBSD__
# define FREE_BSD
#endif
#if defined(__APPLE__) || defined(__MACH__)
# define MAC_OS
#endif
#if defined(__ANDROID__) || defined(_ANDROID_) || defined(ANDROID)
# ifndef ANDROID
# define ANDROID
# endif
#endif
#ifndef WINDOWS
# ifndef QNX
# ifndef FREE_BSD
# ifndef MAC_OS
# ifndef ANDROID
# define LINUX
# endif
# endif
# endif
# endif
#endif
#ifndef WINDOWS
# if defined(__LP64__) || defined(_LP64_) || defined(LP64)
# define ARCH_BITS_64
# else
# define ARCH_BITS_32
# endif
#endif
#ifdef __GNUC__
# define CC_GCC
# define CC_GCC_VERSION ((__GNUC__ << 8) | __GNUC_MINOR__)
# if CC_GCC_VERSION > 0x025F // > 2.95
# ifdef LINUX
# define HAS_LOCALE
# endif
# pragma GCC diagnostic ignored "-Wformat"
# pragma GCC diagnostic ignored "-Wformat-extra-args"
# pragma GCC diagnostic ignored "-Wstrict-aliasing"
# endif
# ifdef ANDROID
# pragma GCC diagnostic ignored "-Wunused-parameter"
# pragma GCC diagnostic ignored "-Wextra"
# pragma GCC diagnostic ignored "-Wliteral-suffix"
# endif
# define DEPRECATED __attribute__((deprecated))
#elif defined(_MSC_VER)
# define CC_VC
# pragma warning(disable: 4018)
# pragma warning(disable: 4061)
# pragma warning(disable: 4100)
# pragma warning(disable: 4239)
# pragma warning(disable: 4242)
# pragma warning(disable: 4244)
# pragma warning(disable: 4251)
# pragma warning(disable: 4365)
# pragma warning(disable: 4512)
# pragma warning(disable: 4668)
# pragma warning(disable: 4710)
# pragma warning(disable: 4800)
# pragma warning(disable: 4820)
# pragma warning(disable: 4986)
# pragma warning(disable: 4996)
# define DEPRECATED
# ifdef ARCH_BITS_32
typedef long ssize_t;
# else
typedef long long ssize_t;
# endif
#else
# define CC_OTHER
# define DEPRECATED
#endif
#ifdef WINDOWS
# ifdef CC_GCC
# define typeof __typeof
# endif
#else
# define typeof __typeof__
#endif
#include "pip_export.h"
#if defined(DOXYGEN) || defined(CC_GCC) || defined(PICODE)
# undef PIP_EXPORT
# define PIP_EXPORT
#endif
#include
#ifdef CC_GCC
# include
#endif
#include
#include
#ifndef QNX
# include
# include
# include
#else
# include
# include
#endif
#include
#include
#include
#include
#include
#include
#include
#include
#include
//#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include