defs.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. ///////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (C) 2010-2011 Artyom Beilis (Tonkikh) <artyomtnk@yahoo.com>
  4. //
  5. // Distributed under:
  6. //
  7. // the Boost Software License, Version 1.0.
  8. // (See accompanying file LICENSE_1_0.txt or copy at
  9. // http://www.boost.org/LICENSE_1_0.txt)
  10. //
  11. // or (at your opinion) under:
  12. //
  13. // The MIT License
  14. // (See accompanying file MIT.txt or a copy at
  15. // http://www.opensource.org/licenses/mit-license.php)
  16. //
  17. ///////////////////////////////////////////////////////////////////////////////
  18. #ifndef CPPDB_DEFS_H
  19. #define CPPDB_DEFS_H
  20. #if defined(WIN32) || defined(_WIN32) || defined(__WIN32) || defined(__CYGWIN__)
  21. # if defined(DLL_EXPORT) || defined(CPPDB_EXPORTS) || defined(CPPDB_DRIVER_EXPORTS)
  22. # ifdef CPPDB_SOURCE
  23. # define CPPDB_API __declspec(dllexport)
  24. # else
  25. # define CPPDB_API __declspec(dllimport)
  26. # endif
  27. # endif
  28. # if defined(DLL_EXPORT) || defined(CPPDB_DRIVER_EXPORTS)
  29. # ifdef CPPDB_DRIVER_SOURCE
  30. # define CPPDB_DRIVER_API __declspec(dllexport)
  31. # else
  32. # define CPPDB_DRIVER_API __declspec(dllimport)
  33. # endif
  34. # endif
  35. #endif
  36. #ifndef CPPDB_API
  37. # define CPPDB_API
  38. #endif
  39. #ifndef CPPDB_DRIVER_API
  40. # define CPPDB_DRIVER_API
  41. #endif
  42. #endif