tinydav_config.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. * Copyright (C) 2010-2011 Mamadou Diop.
  3. *
  4. * Contact: Mamadou Diop <diopmamadou(at)doubango.org>
  5. *
  6. * This file is part of Open Source Doubango Framework.
  7. *
  8. * DOUBANGO is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * DOUBANGO is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with DOUBANGO.
  20. *
  21. */
  22. #ifndef TINYDAV_CONFIG_H
  23. #define TINYDAV_CONFIG_H
  24. #ifdef __SYMBIAN32__
  25. #undef _WIN32 /* Because of WINSCW */
  26. #endif
  27. // Windows (XP/Vista/7/CE and Windows Mobile) macro definition
  28. #if defined(WIN32)|| defined(_WIN32) || defined(_WIN32_WCE)
  29. # define TDAV_UNDER_WINDOWS 1
  30. # if defined(_WIN32_WCE) || defined(UNDER_CE)
  31. # define TDAV_UNDER_WINDOWS_CE 1
  32. # endif
  33. # if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP || WINAPI_FAMILY == WINAPI_FAMILY_APP)
  34. # define TDAV_UNDER_WINDOWS_RT 1
  35. # if WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
  36. # define TDAV_UNDER_WINDOWS_PHONE 1
  37. # endif
  38. # endif
  39. #endif
  40. // OS X or iOS
  41. #if defined(__APPLE__)
  42. # define TDAV_UNDER_APPLE 1
  43. # include <TargetConditionals.h>
  44. # include <Availability.h>
  45. #endif
  46. #if TARGET_OS_MAC
  47. # define TDAV_UNDER_MAC 1
  48. #endif
  49. #if TARGET_OS_IPHONE
  50. # define TDAV_UNDER_IPHONE 1
  51. #endif
  52. #if TARGET_IPHONE_SIMULATOR
  53. # define TDAV_UNDER_IPHONE_SIMULATOR 1
  54. #endif
  55. // x86
  56. #if TDAV_UNDER_WINDOWS || defined(__x86_64__) || defined(__x86__) || defined(__i386__)
  57. # define TDAV_UNDER_X86 1
  58. #endif
  59. // Mobile
  60. #if defined(_WIN32_WCE) || defined(__ANDROID__) || defined(ANDROID) || TDAV_UNDER_IPHONE || TDAV_UNDER_IPHONE_SIMULATOR || TDAV_UNDER_WINDOWS_PHONE
  61. # define TDAV_UNDER_MOBILE 1
  62. #endif
  63. #if (TDAV_UNDER_WINDOWS || defined(__SYMBIAN32__)) && defined(TINYDAV_EXPORTS)
  64. # define TINYDAV_API __declspec(dllexport)
  65. # define TINYDAV_GEXTERN extern __declspec(dllexport)
  66. #elif (TDAV_UNDER_WINDOWS || defined(__SYMBIAN32__)) && !defined(TINYDAV_IMPORTS_IGNORE)
  67. # define TINYDAV_API __declspec(dllimport)
  68. # define TINYDAV_GEXTERN __declspec(dllimport)
  69. #else
  70. # define TINYDAV_API
  71. # define TINYDAV_GEXTERN extern
  72. #endif
  73. /* Guards against C++ name mangling */
  74. #ifdef __cplusplus
  75. # define TDAV_BEGIN_DECLS extern "C" {
  76. # define TDAV_END_DECLS }
  77. #else
  78. # define TDAV_BEGIN_DECLS
  79. # define TDAV_END_DECLS
  80. #endif
  81. #ifdef _MSC_VER
  82. #if HAVE_FFMPEG // FFMPeg warnings (treated as errors)
  83. # pragma warning (disable:4244)
  84. #endif
  85. # if !defined(__cplusplus)
  86. # define inline __inline
  87. # endif
  88. # if !defined(_CRT_SECURE_NO_WARNINGS)
  89. # define _CRT_SECURE_NO_WARNINGS
  90. # endif /* _CRT_SECURE_NO_WARNINGS */
  91. #endif
  92. /* Detecting C99 compilers
  93. */
  94. #if (__STDC_VERSION__ == 199901L) && !defined(__C99__)
  95. # define __C99__
  96. #endif
  97. #include <stdint.h>
  98. #ifdef __SYMBIAN32__
  99. #include <stdlib.h>
  100. #endif
  101. #if HAVE_CONFIG_H
  102. #include <config.h>
  103. #endif
  104. #endif // TINYDAV_CONFIG_H