tinysdp_config.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  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 TINYSDP_CONFIG_H
  23. #define TINYSDP_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 TSDP_UNDER_WINDOWS 1
  30. # if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP || WINAPI_FAMILY == WINAPI_FAMILY_APP)
  31. # define TSDP_UNDER_WINDOWS_RT 1
  32. # endif
  33. #endif
  34. // OS X or iOS
  35. #if defined(__APPLE__)
  36. # define TSDP_UNDER_APPLE 1
  37. # include <TargetConditionals.h>
  38. # include <Availability.h>
  39. #endif
  40. #if TARGET_OS_MAC
  41. # define TSDP_UNDER_MAC 1
  42. #endif
  43. #if TARGET_OS_IPHONE
  44. # define TSDP_UNDER_IPHONE 1
  45. #endif
  46. #if TARGET_IPHONE_SIMULATOR
  47. # define TSDP_UNDER_IPHONE_SIMULATOR 1
  48. #endif
  49. #if (TSDP_UNDER_WINDOWS || defined(__SYMBIAN32__)) && defined(TINYSDP_EXPORTS)
  50. # define TINYSDP_API __declspec(dllexport)
  51. # define TINYSDP_GEXTERN extern __declspec(dllexport)
  52. #elif (TSDP_UNDER_WINDOWS || defined(__SYMBIAN32__)) && !defined(TINYSDP_IMPORTS_IGNORE)
  53. # define TINYSDP_API __declspec(dllimport)
  54. # define TINYSDP_GEXTERN __declspec(dllimport)
  55. #else
  56. # define TINYSDP_API
  57. # define TINYSDP_GEXTERN extern
  58. #endif
  59. /* Guards against C++ name mangling
  60. */
  61. #ifdef __cplusplus
  62. # define TSDP_BEGIN_DECLS extern "C" {
  63. # define TSDP_END_DECLS }
  64. #else
  65. # define TSDP_BEGIN_DECLS
  66. # define TSDP_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 // TINYSDP_CONFIG_H