tinymedia_config.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. /*
  2. * Copyright (C) 2010-2011 Mamadou Diop.
  3. *
  4. * Contact: Mamadou Diop <diopmamadou(at)doubango[dot]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 TINYMEDIA_CONFIG_H
  23. #define TINYMEDIA_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 TMEDIA_UNDER_WINDOWS 1
  30. # if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP || WINAPI_FAMILY == WINAPI_FAMILY_APP)
  31. # define TMEDIA_UNDER_WINDOWS_RT 1
  32. # endif
  33. #endif
  34. // OS X or iOS
  35. #if defined(__APPLE__)
  36. # define TMEDIA_UNDER_APPLE 1
  37. # include <TargetConditionals.h>
  38. # include <Availability.h>
  39. #endif
  40. #if TARGET_OS_MAC
  41. # define TMEDIA_UNDER_MAC 1
  42. #endif
  43. #if TARGET_OS_IPHONE
  44. # define TMEDIA_UNDER_IPHONE 1
  45. #endif
  46. #if TARGET_IPHONE_SIMULATOR
  47. # define TMEDIA_UNDER_IPHONE_SIMULATOR 1
  48. #endif
  49. #if (TMEDIA_UNDER_WINDOWS || defined(__SYMBIAN32__)) && defined(TINYMEDIA_EXPORTS)
  50. # define TINYMEDIA_API __declspec(dllexport)
  51. # define TINYMEDIA_GEXTERN extern __declspec(dllexport)
  52. #elif (TMEDIA_UNDER_WINDOWS || defined(__SYMBIAN32__)) && !defined(TINYMEDIA_IMPORTS_IGNORE)
  53. # define TINYMEDIA_API __declspec(dllimport)
  54. # define TINYMEDIA_GEXTERN __declspec(dllimport)
  55. #else
  56. # define TINYMEDIA_API
  57. # define TINYMEDIA_GEXTERN extern
  58. #endif
  59. /* Guards against C++ name mangling
  60. */
  61. #ifdef __cplusplus
  62. # define TMEDIA_BEGIN_DECLS extern "C" {
  63. # define TMEDIA_END_DECLS }
  64. #else
  65. # define TMEDIA_BEGIN_DECLS
  66. # define TMEDIA_END_DECLS
  67. #endif
  68. /* Disable some well-known warnings
  69. */
  70. #ifdef _MSC_VER
  71. # if !defined(_CRT_SECURE_NO_WARNINGS)
  72. # define _CRT_SECURE_NO_WARNINGS
  73. # endif /* _CRT_SECURE_NO_WARNINGS */
  74. #endif
  75. /* Detecting C99 compilers
  76. */
  77. #if (__STDC_VERSION__ == 199901L) && !defined(__C99__)
  78. # define __C99__
  79. #endif
  80. #include <stdint.h>
  81. #ifdef __SYMBIAN32__
  82. #include <stdlib.h>
  83. #endif
  84. #if HAVE_CONFIG_H
  85. #include <config.h>
  86. #endif
  87. #endif // TINYMEDIA_CONFIG_H