00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00036 #ifndef LIBEBML_CONFIG_H
00037 #define LIBEBML_CONFIG_H
00038
00039 #if defined(__linux__)
00040 #include <endian.h>
00041 #if __BYTE_ORDER == __LITTLE_ENDIAN
00042 #undef WORDS_BIGENDIAN
00043 #elif __BYTE_ORDER == __BIG_ENDIAN
00044 #define WORDS_BIGENDIAN 1
00045 #endif
00046 #else
00047
00048 #if !defined(WORDS_BIGENDIAN)
00049 #if (defined (__arm__) && ! defined (__ARMEB__)) || defined (__i386__) || defined (__i860__) || defined (__ns32000__) || defined (__vax__) || defined (__amd64__) || defined (__x86_64__)
00050 #undef WORDS_BIGENDIAN
00051 #elif defined (__sparc__) || defined (__alpha__) || defined (__PPC__) || defined (__mips__) || defined (__ppc__) || defined (__BIG_ENDIAN__)
00052 #define WORDS_BIGENDIAN 1
00053 #else
00054
00055 #undef WORDS_BIGENDIAN // for my testing platform (x86)
00056 #endif
00057 #endif // not autoconf
00058 #endif
00059
00060 #define LIBEBML_NAMESPACE libebml
00061 #if defined(NO_NAMESPACE) // for older GCC
00062 # define START_LIBEBML_NAMESPACE
00063 # define END_LIBEBML_NAMESPACE
00064 #else // NO_NAMESPACE
00065 # define START_LIBEBML_NAMESPACE namespace LIBEBML_NAMESPACE {
00066 # define END_LIBEBML_NAMESPACE };
00067 #endif // NO_NAMESPACE
00068
00069
00070
00071
00072 #if defined(_WIN32)||defined(WIN32)
00073
00074 # if defined(EBML_DLL)
00075 # if defined(EBML_DLL_EXPORT)
00076 # define EBML_DLL_API __declspec(dllexport)
00077 # else // EBML_DLL_EXPORT
00078 # define EBML_DLL_API __declspec(dllimport)
00079 # endif // EBML_DLL_EXPORT
00080 # else // EBML_DLL
00081 # define EBML_DLL_API
00082 # endif // EBML_DLL
00083
00084 # ifdef _MSC_VER
00085 # pragma warning(disable:4786) // length of internal identifiers
00086 # endif // _MSC_VER
00087 #else
00088 # define EBML_DLL_API
00089 #endif // WIN32 || _WIN32
00090
00091
00092 #ifndef countof
00093 #define countof(x) (sizeof(x)/sizeof(x[0]))
00094 #endif
00095
00096
00097
00098
00099 #if (defined(DEBUG)||defined(_DEBUG))&&!defined(LIBEBML_DEBUG)
00100 #define LIBEBML_DEBUG
00101 #endif
00102
00103
00104 #ifndef __TIMESTAMP__
00105 #define __TIMESTAMP__ __DATE__ " " __TIME__
00106 #endif
00107
00108 #ifdef __GNUC__
00109 #define EBML_PRETTYLONGINT(c) (c ## ll)
00110 #else // __GNUC__
00111 #define EBML_PRETTYLONGINT(c) (c)
00112 #endif // __GNUC__
00113
00114 #if __BORLANDC__ >= 0x0581 //Borland C++ Builder 2006 preview
00115 #include <stdlib.h>
00116 #include <memory.h>
00117 #endif //__BORLANDC__
00118
00119 #endif // LIBEBML_CONFIG_H