tinyWRAP_config.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 TINYWRAP_CONFIG_H
  23. #define TINYWRAP_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 TWRAP_UNDER_WINDOWS 1
  30. # if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP || WINAPI_FAMILY == WINAPI_FAMILY_APP)
  31. # define TWRAP_UNDER_WINDOWS_RT 1
  32. # endif
  33. #endif
  34. #if (TWRAP_UNDER_WINDOWS || defined(__SYMBIAN32__)) && defined(TINYWRAP_EXPORTS)
  35. # define TINYWRAP_API __declspec(dllexport)
  36. # define TINYWRAP_GEXTERN extern __declspec(dllexport)
  37. #elif (TWRAP_UNDER_WINDOWS || defined(__SYMBIAN32__)) && !defined(TINYWRAP_IMPORTS_IGNORE)
  38. # define TINYWRAP_API __declspec(dllimport)
  39. # define TINYWRAP_GEXTERN __declspec(dllimport)
  40. #else
  41. # define TINYWRAP_API
  42. # define TINYWRAP_GEXTERN extern
  43. #endif
  44. /* Guards against C++ name mangling
  45. */
  46. #ifdef __cplusplus
  47. # define TWRAP_BEGIN_DECLS extern "C" {
  48. # define TWRAP_END_DECLS }
  49. #else
  50. # define TWRAP_BEGIN_DECLS
  51. # define TWRAP_END_DECLS
  52. #endif
  53. /* Disable some well-known warnings
  54. */
  55. #ifdef _MSC_VER
  56. # define _CRT_SECURE_NO_WARNINGS
  57. #endif
  58. #include <stdint.h>
  59. #if HAVE_CONFIG_H
  60. #include "../config.h"
  61. #endif
  62. #endif // TINYWRAP_CONFIG_H