platform.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*!
  2. Temelia - platform dependent macros.
  3. Copyright (C) 2008, 2009 Ceata (http://cod.ceata.org/proiecte/temelia).
  4. @author Dascalu Laurentiu
  5. This program is free software; you can redistribute it and
  6. modify it under the terms of the GNU General Public License
  7. as published by the Free Software Foundation; either version 3
  8. of the License, or (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  16. */
  17. #ifndef PLATFORM_H_
  18. #define PLATFORM_H_
  19. #ifdef _WIN32
  20. #define CONST const
  21. #define RESTRICT _restrict
  22. #define INLINE _inline
  23. #ifdef DLL_IMPORTS
  24. #define DECLSPEC __declspec(dllimport)
  25. #else
  26. #define DECLSPEC __declspec(dllexport)
  27. #endif
  28. #else
  29. #define CONST __const
  30. #define RESTRICT __restrict
  31. #define INLINE inline
  32. #define DECLSPEC
  33. #endif
  34. #endif /* PLATFORM_H */