quazip_global.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /**
  2. Copyright (C) 2005-2011 Sergey A. Tachenov
  3. This program is free software; you can redistribute it and/or modify it
  4. under the terms of the GNU Lesser General Public License as published by
  5. the Free Software Foundation; either version 2 of the License, or (at
  6. your option) any later version.
  7. This program is distributed in the hope that it will be useful, but
  8. WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
  10. General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public License
  12. along with this program; if not, write to the Free Software Foundation,
  13. Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  14. See COPYING file for the full LGPL text.
  15. Original ZIP package is copyrighted by Gilles Vollant, see
  16. quazip/(un)zip.h files for details, basically it's zlib license.
  17. */
  18. #ifndef QUAZIP_GLOBAL_H
  19. #define QUAZIP_GLOBAL_H
  20. #include <QtCore/qglobal.h>
  21. /**
  22. This is automatically defined when building a static library, but when
  23. including QuaZip sources directly into a project, QUAZIP_STATIC should
  24. be defined explicitly to avoid possible troubles with unnecessary
  25. importing/exporting.
  26. */
  27. #ifdef QUAZIP_STATIC
  28. #define QUAZIP_EXPORT
  29. #else
  30. /**
  31. * When building a DLL with MSVC, QUAZIP_BUILD must be defined.
  32. * qglobal.h takes care of defining Q_DECL_* correctly for msvc/gcc.
  33. */
  34. #if defined(QUAZIP_BUILD)
  35. #define QUAZIP_EXPORT Q_DECL_EXPORT
  36. #else
  37. #define QUAZIP_EXPORT Q_DECL_IMPORT
  38. #endif
  39. #endif // QUAZIP_STATIC
  40. #ifdef __GNUC__
  41. #define UNUSED __attribute__((__unused__))
  42. #else
  43. #define UNUSED
  44. #endif
  45. #endif // QUAZIP_GLOBAL_H