tinymsrp_config.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * Copyright (C) 2009 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. /**@file tinyMSRP_config.h
  23. * @brief Global configuration file.
  24. *
  25. * This file incude all your preferences or configuration. All specific configuration
  26. * must be defined in this file. You must include this file in all your header files.
  27. *
  28. * @author Mamadou Diop <diopmamadou [at) doubango (DOT) org>
  29. *
  30. */
  31. #ifndef _TINYMSRP_H_
  32. #define _TINYMSRP_H_
  33. #ifdef __SYMBIAN32__
  34. #undef _WIN32 /* Because of WINSCW */
  35. #endif
  36. // Windows (XP/Vista/7/CE and Windows Mobile) macro definition.
  37. #if defined(WIN32)|| defined(_WIN32) || defined(_WIN32_WCE)
  38. # define TMSRP_UNDER_WINDOWS 1
  39. # if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP || WINAPI_FAMILY == WINAPI_FAMILY_APP)
  40. # define TMSRP_UNDER_WINDOWS_RT 1
  41. # endif
  42. #endif
  43. /* Used on Windows and Symbian systems to export/import public functions and global variables.
  44. */
  45. #if !defined(__GNUC__) && defined(TINYMSRP_EXPORTS)
  46. # define TINYMSRP_API __declspec(dllexport)
  47. # define TINYMSRP_GEXTERN extern __declspec(dllexport)
  48. #elif !defined(__GNUC__) && !defined(TINYMSRP_IMPORTS_IGNORE)
  49. # define TINYMSRP_API __declspec(dllimport)
  50. # define TINYMSRP_GEXTERN __declspec(dllimport)
  51. #else
  52. # define TINYMSRP_API
  53. # define TINYMSRP_GEXTERN extern
  54. #endif
  55. /* Guards against C++ name mangling
  56. */
  57. #ifdef __cplusplus
  58. # define TMSRP_BEGIN_DECLS extern "C" {
  59. # define TMSRP_END_DECLS }
  60. #else
  61. # define TMSRP_BEGIN_DECLS
  62. # define TMSRP_END_DECLS
  63. #endif
  64. /* Disable some well-known warnings
  65. */
  66. #ifdef _MSC_VER
  67. # define _CRT_SECURE_NO_WARNINGS
  68. # pragma warning( disable : 4996 )
  69. #endif
  70. #include <stdint.h>
  71. #include <stddef.h>
  72. #if HAVE_CONFIG_H
  73. #include <config.h>
  74. #endif
  75. #endif /* _TINYMSRP_H_ */