Ap4Config.h
Go to the documentation of this file.00001 /***************************************************************** 00002 | 00003 | AP4 - Target Platform and Compiler Configuration 00004 | 00005 | Copyright 2002-2008 Axiomatic Systems, LLC 00006 | 00007 | 00008 | This file is part of Bento4/AP4 (MP4 Atom Processing Library). 00009 | 00010 | Unless you have obtained Bento4 under a difference license, 00011 | this version of Bento4 is Bento4|GPL. 00012 | Bento4|GPL is free software; you can redistribute it and/or modify 00013 | it under the terms of the GNU General Public License as published by 00014 | the Free Software Foundation; either version 2, or (at your option) 00015 | any later version. 00016 | 00017 | Bento4|GPL is distributed in the hope that it will be useful, 00018 | but WITHOUT ANY WARRANTY; without even the implied warranty of 00019 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00020 | GNU General Public License for more details. 00021 | 00022 | You should have received a copy of the GNU General Public License 00023 | along with Bento4|GPL; see the file COPYING. If not, write to the 00024 | Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 00025 | 02111-1307, USA. 00026 | 00027 ****************************************************************/ 00032 #ifndef _AP4_CONFIG_H_ 00033 #define _AP4_CONFIG_H_ 00034 00035 /*---------------------------------------------------------------------- 00036 | defaults 00037 +---------------------------------------------------------------------*/ 00038 #define AP4_CONFIG_HAVE_STDIO_H 00039 #define AP4_CONFIG_HAVE_ASSERT_H 00040 #define AP4_CONFIG_HAVE_STRING_H 00041 #define AP4_CONFIG_HAVE_SNPRINTF 00042 #define AP4_CONFIG_HAVE_VSNPRINTF 00043 #define AP4_CONFIG_HAVE_INT64 00044 00045 /*---------------------------------------------------------------------- 00046 | byte order 00047 +---------------------------------------------------------------------*/ 00048 // define AP4_PLATFORM_BYTE_ORDER to one of these two choices 00049 #define AP4_PLATFORM_BYTE_ORDER_BIG_ENDIAN 0 00050 #define AP4_PLATFORM_BYTE_ORDER_LITTLE_ENDIAN 1 00051 00052 #if !defined(AP4_PLATFORM_BYTE_ORDER) 00053 #if defined(__ppc__) 00054 #define AP4_PLATFORM_BYTE_ORDER AP4_PLATFORM_BYTE_ORDER_BIG_ENDIAN 00055 #elif defined(__i386__) || defined(__x86_64__) || defined(__arm__) 00056 #define AP4_PLATFORM_BYTE_ORDER AP4_PLATFORM_BYTE_ORDER_LITTLE_ENDIAN 00057 #endif 00058 #endif 00059 00060 /*---------------------------------------------------------------------- 00061 | standard C++ runtime 00062 +---------------------------------------------------------------------*/ 00063 #define APT_CONFIG_HAVE_NEW_H 00064 00065 /*---------------------------------------------------------------------- 00066 | platform specifics 00067 +---------------------------------------------------------------------*/ 00068 00069 /* Microsoft Platforms */ 00070 #if defined(_MSC_VER) 00071 #define AP4_CONFIG_INT64_TYPE __int64 00072 #if (_MSC_VER >= 1400) && !defined(_WIN32_WCE) 00073 #define AP4_CONFIG_HAVE_FOPEN_S 00074 #define AP4_snprintf(s,c,f,...) _snprintf_s(s,c,_TRUNCATE,f,__VA_ARGS__) 00075 #define AP4_vsnprintf(s,c,f,a) _vsnprintf_s(s,c,_TRUNCATE,f,a) 00076 #define fileno _fileno 00077 #define AP4_fseek _fseeki64 00078 #define AP4_ftell _ftelli64 00079 #else 00080 #define AP4_snprintf _snprintf 00081 #define AP4_vsnprintf _vsnprintf 00082 #endif 00083 #if defined(_WIN32_WCE) 00084 #define AP4_fseek fseek 00085 #define AP4_ftell ftell 00086 #endif 00087 #if defined(_DEBUG) 00088 #define _CRTDBG_MAP_ALLOC 00089 #endif 00090 #endif 00091 00092 /* Cygwin */ 00093 #if defined(__CYGWIN__) 00094 #define AP4_fseek fseek 00095 #define AP4_ftell ftell 00096 #endif 00097 00098 /* Symbian */ 00099 #if defined(__SYMBIAN32__) 00100 #undef APT_CONFIG_HAVE_NEW_H 00101 #include "e32std.h" 00106 #define AP4_PLATFORM_BYTE_ORDER AP4_PLATFORM_BYTE_ORDER_LITTLE_ENDIAN 00107 #define AP4_fseek fseek 00108 #define AP4_ftell ftell 00109 #define explicit 00110 #endif 00111 00112 /* Android */ 00113 #if defined(ANDROID) 00114 #define AP4_CONFIG_NO_RTTI 00115 #define AP4_CONFIG_NO_EXCEPTIONS 00116 #endif 00117 00118 /*---------------------------------------------------------------------- 00119 | defaults 00120 +---------------------------------------------------------------------*/ 00121 #if !defined(AP4_CONFIG_INT64_TYPE) 00122 #define AP4_CONFIG_INT64_TYPE long long 00123 #endif 00124 00125 #if !defined(AP4_fseek) 00126 #define AP4_fseek fseeko 00127 #endif 00128 #if !defined(AP4_ftell) 00129 #define AP4_ftell ftello 00130 #endif 00131 00132 /* some compilers (ex: MSVC 8) deprecate those, so we rename them */ 00133 #if !defined(AP4_snprintf) 00134 #define AP4_snprintf snprintf 00135 #endif 00136 #if !defined(AP4_vsnprintf) 00137 #define AP4_vsnprintf vsnprintf 00138 #endif 00139 00140 #endif // _AP4_CONFIG_H_
Generated on Thu May 13 16:36:31 2010 for Bento4 MP4 SDK by
